Change SSH TTY session type to X11 at console?
0
votes
1
answer
2072
views
I have a Debian 12 VM that and when I boot it remotely the user session is a TTY, can I have it launch an X11 session at the console end?
### Attempt A ###
- KDE is installed
- I have selected plasma-x11 as my default session
manager
- I have changed the default display manager to sddm
loginctl
SESSION UID USER SEAT TTY
3 1000 user1 pts/0
1 sessions listed.
loginctl show-session 3 -p Type
Type=tty
update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/startxfce4 50 auto mode
* 1 /usr/bin/startplasma-x11 40 manual mode
2 /usr/bin/startxfce4 50 manual mode
3 /usr/bin/xfce4-session 40 manual mode
Press to keep the current choice[*], or type selection number: 1
cat /etc/X11/default-display-manager
/usr/sbin/sddm
ls /usr/share/xsessions
lightdm-xsession.desktop plasma.desktop xfce.desktop
but my user keeps login into a TTY session. How can I solve it?
### Attempt B ###
- I have tried starting the display-manager.service
systemctl start display-manager.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to start 'lightdm.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ====
loginctl show-session 22 -p Type
Type=tty
but it started lightdm instead of sddm even though I set x-session-manager to /usr/bin/startplasma-x11, and the session is still type=tty.
### Attempt C ###
- I have manually started sddm
- I have tried startx, startplasma-x11 and startkde, but to no avail.
systemctl start sddm.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to start 'sddm.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ====
startx
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
^Cxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2
Couldn't get a file descriptor referring to the console.
startkde
zsh: command not found: startkde
startplasma-x11
$DISPLAY is not set or cannot connect to the X server.
As a result, an x11 session has been started for the sddm user instead of changing my user's session to X11.
loginctl
SESSION UID USER SEAT TTY
22 1000 user1 pts/0
24 111 sddm seat0
2 sessions listed.
When I have a regular X11 session, it's my user's session, not the session for the display manager user.
### Attempt D ###
- I have tried startX with root privileges and detaching it, so it doesn't block the terminal.
doas startx &
2446
+ suspended (tty output) doas startx
but it doesn't work.
Asked by Centaro
(33 rep)
Dec 5, 2023, 03:31 PM
Last activity: Jun 12, 2025, 08:02 PM
Last activity: Jun 12, 2025, 08:02 PM