Terminals will not start with a console login

I’ve just installed ArchLabs under QEMU/KVM using the archlabs-2019.10.29.iso and terminals open & close again with this error printed:

/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server

This happens because ~/.profile has this line:

[ $XDG_VTNR -eq 1 ] && exec startx

But $XDG_VTNR is also “1” in the X session.

To fix it I changed the line to:

[ $(tty) = /dev/tty1 ] && exec startx

Which allows terminals in X to run normallly (tty in X returns /dev/pts/1).

To reproduce this problem install with a console login and mksh as the default shell.


Yea this has been fixed for some but it’s the installer that generates the profile for login. You’d have to update the installer before running. It’s not even just mksh it’s any shell with xinit login. Will look into just building a new iso.