I have replaced initscripts by udev and limited the number of login shells to spawn to 3
I start my openbox-session via xinit.
But X starts at tty2 and blocks one of the login shells.
WIth initscripts it starts at tty4... and i can access the login shell at tty2
How can i set that the Xserver doesnt start at a tty where a login shell already started?
if i log out of the openbox session and start the xserver again... it starts on tty4
seems like it spawns before login shell 2 and 3.....
Last edited by xinit (2012-08-16 15:16:46)
Systemd starts tty ondemand. So when you login first time, you only have tty1. So obviously, xserver starts on tty(1+1).
I don't know if there's a way to make x start on another tty (may be tty7, as it always did, at least for me, with 6 shells), i'll follow this thread, waiting for someone who knows how to achieve that!
you can pass vtXX as argument to start X on a given tty (here tty4)
# # ~/.bash_profile # if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then if ! [ -e /tmp/.X11-unix/X0 ]; then exec nohup xinit openbox -- vt4 > .xlog & vlock else echo "X server 0 is already running." fi fi
# # ~/.xinitrc # numlockx & case $1 in gnome) exec ck-launch-session gnome-session;; openbox) exec ck-launch-session dbus-launch openbox-session;; esac
But this always starts X at tty4... and not just after the last login shell.
Last edited by xinit (2012-08-16 11:00:21)
Well, as far as i know, the easiest method is to spawn 6 tty (or 3 in your case) during bootup, just like /etc/inittab did. In this way, x will start on tty7 (4) .
Last edited by nierro (2012-08-16 11:29:10)
thanks for the answers
just to summarize:
by default just one login shell spawns - if you start a xserver it uses the next free tty (tty2).
logind.conf (NAutoVTs) defines the number of login shells on demand, which start when you try to access them.
otherwise if you spawn several login shells at startup via firstname.lastname@example.org ... email@example.com the xserver starts at tty7 and the login shells are running in the background.
to force the xserver to start on a specific tty you can add the option vtX, where X defines the number