I have a working automatic login to a virtual console after boot.
Now I want the X server to start automatically, instead of typing
This worked before, but after switching to systemd, X would not start itself.
According to the wiki page, I edited my
# # ~/.bash_profile # [[ -f ~/.bashrc ]] && . ~/.bashrc [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
But X won´t start (executing
startx manually works).
The wiki also notes:
X must always be run on the same tty where the login occurred, to preserve the logind session. This is handled by the default /etc/X11/xinit/xserverrc.
But I am not sure how to handle this.
#!/bin/sh if [ -z "$XDG_VTNR" ]; then exec /usr/bin/X -nolisten tcp "$@" else exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR fi
What am I doing wrong?
#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # Keyboard layout setxkbmap -layout de nodeadkeys # Set the cursor xsetroot -cursor_name left_ptr # Autostart tint2 & #Taskbar /usr/lib/notification-daemon-1.0/notification-daemon & #Notifications numlockx & #activate numlock case "$1" in openbox) exec ck-launch-session openbox-session ;; xmonad) exec ck-launch-session xmonad ;; *) #default exec ck-launch-session xmonad ;; esac
I don´t have a
~/.Xresources file and I didn´t need one before. Is it important?