How to direct login to a desktop session and avoid sddm


(tom) #1

salve

  1. create .xinitrc if not exist and make it executable with minimal two lines
#!/bin/sh
<some other command>
<if you want>
exec /usr/bin/startkde
  1. create .xserverrc if not exist and make it executable
#!/bin/sh

exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR
  1. create .bash_profile if not exist and make it executable
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  exec startx
logout
fi
  1. disable sddm.service
sudo systemctl disable sddm.service 

…next boot you can login without sddm overhead
you can easily re enable or start sddm.service if you want

https://wiki.archlinux.org/index.php/.xinitrc

if you want autologin:

  1. copy
sudo cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@tty1.service
  1. edit autologin.service
    from
ExecStart=-/sbin/agetty --noclear %I

to

ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM -a <USERNAME> %I 38400

Important upgrades to groups of packages include linux, graphics, sound, qt5 and more
Important upgrades to groups of packages include linux, graphics, sound, qt5 and more
(Neofytos Kolokotronis) #2

What happens if one simply uninstalls sddm?


(tom) #3

without a proper .xinitrc and .xserverrc? after “startx” Xserver will be started and immediately terminated because there is nothing to serve and you cant start plasma session with sddm and work only on TTY is possible


(brli) #4

IIRC startkde takes care of dbus calling and so on while directly executed in a tty login session.

If that is the case, just put startkde in .xprofile or .bash_profile may do the trick also, without the overhead?


(tom) #5

this was new for me but it is true it works :slight_smile: