2 ms·
This way a malicious user with physical access to your machine can easily get around your locked desktop by switching to tty1. It would be better to fork the x
by dromenkoning 10y ago
This way a malicious user with physical access to your machine can easily get around your locked desktop by switching to tty1.
It would be better to fork the xinit proces to the background and exit the tty after:
echo 'xcompmgr &\nexec cwm' > ~/.xinitrc && xinit & && exit
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- yebyen 10y agoxinit & && exit I don't mean to ask a silly question, but what exactly is this meant to do? (What might it do that plain old `xinit & exit` doesn't do?) && is a binary op meant to execute the following command if the return code of the preceding command is success (0) & is another shell builtin that sends the command preceding it to the background, and lets the shell continue with whatever comes next... So, at first I read your edit and thought "Oh, this will exit the shell unless X can't be started" ... but exit should be running before X ever gets around to returning, no? I just read the man page for my favorite shell, and it says the return code for `&` is always 0. So it's clear that `& &&` will work, but I don't see anything suggesting it will do anything that `&` alone won't do. Just want to know if you know something I don't, and I figure there's no better place to learn a new shell thing than on a HN thread about BSD OS.
- dromenkoning 10y agoNothing special going on here; my syntax is based on me not knowing the particulars of `&`. I'll try to remember using yours in the future as it's more elegant. Thanks for the reply.