When I upgraded from greetd 0.9.0 to 0.10.0, my default session (the
Xfce session, which runs `startxfce4`) failed to start, while `startx`
with `startxfce4` in ~/.xinitrc works. This is independent of the
greeter, i.e. it happens with all of them.
I tracked it down to commit 68fff8d3d2763b2a6ea06cd41aa4c7b6cbc7cbfa,
where the environment variable `XDG_VTNR` is hidden from the user
session. I confirmed that this is the case by compiling greetd 0.10.0
from source with `XDG_VTNR` not removed (i.e. removed it from the
variable `cleared_env` in line 225 of `greetd/src/session/worker.rs`),
and trying out `startxfce4`.
Could you re-enable `XDG_VTNR`?
For reference, here is the `startxfce4` script:
https://gitlab.xfce.org/xfce/xfce4-session/-/blob/master/scripts/startxfce4.in
Ugh. It appears that Xorg tries to just pick its own VT if not
explicitly specified, rather than being sensible and just using the
current one.
I reverted part of this change in master, which should fix your issue.