if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then
read -s -n 1 -t 0.25 key
[[ $? -eq 142 ]] && exec xinit -- vt1 -nolisten tcp
fi
But I will also frequently hit a key to prevent this from running to be able to work in the tty - then I use 'xinit -- vt1' and if/when I exit that session I'm also back at a workting tty.
]]>$ type s
s is aliased to `startx -- -keeptty > ~/temp/.xorg-vt$XDG_VTNR-$(date +"%Y-%m-%d-%H:%M:%S").log 2>&1; reset'
Works for me ...
]]>xorg-server has now the ability to run without root rights with
the help of systemd-logind. xserver will fail to run if not launched
from the same virtual terminal as was used to log in.
Without root rights, log files will be in ~/.local/share/xorg/ directory.
Old behavior can be restored through Xorg.wrap config file.
See Xorg.wrap man page (man xorg.wrap).
that we had when we have upgraded xorg-server. For some reason, you are not on a physical console when you use an alias. I guess that it will work if you "restore the old behavior". Even if I am right, it is strange that using an alias or running the command directly can make a difference. What happens if you use a shell script instead of an alias?
]]> Backtrace:
[ 12121.882] (EE) 0: /usr/bin/Xorg.bin (xorg_backtrace+0x56) [0x593a46]
[ 12121.882] (EE) 1: /usr/bin/Xorg.bin (0x400000+0x197b99) [0x597b99]
[ 12121.882] (EE) 2: /usr/lib/libc.so.6 (0x7f9dfcf5a000+0x339f0) [0x7f9dfcf8d9f0]
[ 12121.882] (EE)
[ 12121.882] (EE) Segmentation fault at address 0x0
[ 12121.882] (EE)
Fatal server error:
[ 12121.882] (EE) Caught signal 11 (Segmentation fault). Server aborting
I use 64bit arch and xfce4
]]>What exactly do you mean? What kind of trouble? Why would explaining require a reboot??
Sorry, I'd forgotten that this happened---I don't reboot too frequently.
Upon exiting dwm, I'll be issued a repeating sequence of---and I'm paraphrasing; I don't know where this is logged (Where is this logged?)---"sending KILL to all processes", "waiting on X", "could not close X", which doesn't appear to ever end.
Sorry I can't give a clearer picture. I can post that log if you know where it is. Meanwhile, I'll pay a bit more attention next time I replicate the issue, which is only an issue (for me) when I'm playing around with dwm patches.
]]>...Fix for me:
Jasonwryan, does the rootless X server give you trouble when quitting, say, dwm?^{1} ...I'd elaborate but it would require a whole bunch of mindless rigmarole (reboot included).
--
1. I know that you use dwm.
EDIT; I should've read more that the first 7 posts in the thread.
]]>karol wrote:Does anyone else get a broken console after quiting X?
Yes. It's not broken, the standard streams have just been redirected. Personally I consider this a bug: if a program opts to redirect standard streams, that's fine, but it should reset them when it's done.
If you put "exec" before startx in your alias, killing X (or exiting your WM) logs you out from the console, if you prefer. You can also return to a usable console by typing "reset".
Re redirection, I've come up with a more complex solution that filters duplicate lines and compresses the log if it gets too large:
should prevent 20 GB logs if things go AWOL.
edit: meh, blocks redirection after the first awk.
]]>If you start a couple X servers this way you should specify something other than just ~/.xorg.log as the log. What would be the best filename?
alias s="startx -- -keeptty > ~/.xorg-vt$XDG_VTNR-$(date +"%Y-%m-%d-%H:%M:%S").log 2>&1"
$ type s s is aliased to `startx -- -keeptty > ~/.xorg-vt1-2014-09-05-21:14:06.log 2>&1'
You want single quotes instead of double quotes when defining the alias, so the expansions are done later.
Personally I'd just use +%s as the date format.
Does anyone else get a broken console after quiting X?
Yes. It's not broken, the standard streams have just been redirected. Personally I consider this a bug: if a program opts to redirect standard streams, that's fine, but it should reset them when it's done.
]]>alias s="startx -- -keeptty > ~/.xorg-vt$XDG_VTNR-$(date +"%Y-%m-%d-%H:%M:%S").log 2>&1"
$ type s
s is aliased to `startx -- -keeptty > ~/.xorg-vt1-2014-09-05-21:14:06.log 2>&1'
I think it's time to properly fix https://wiki.archlinux.org/index.php/Start_X_at_Login
Does anyone else get a broken console after quiting X? Pressing 'Enter' produces a new prompt but on the same line etc. I have to blindly type 'exit' and re-log to get a usable console.
]]>