You are not logged in.
I am running X server by typing 'startx' after login into my tty. I also have Ctrtl+Alt+Backspace shortcut to kill X server. So, if anyone comes to my PC and sees my i3lock, they can press this combination, kill my X server, and see tty with me being logged in, then just type startx and have access to my system.
Is there a way to somehow either:
a) Lock or exit from tty where I started X server (it starts in the same tty, so I don't know if other advice I found on the internet can help) after starting it - I know about vlock, but people say it's locking everything, and hybernation, sleep and other things stop working.
b) Prevent this combination when i3lock script is running - I wouldn't want this because if my X hangs on lockscreen I couldn't kill it without rebooting
Thanks in advance.
Offline
Start X from your shell profile and include a logout command:
# startx if on tty1
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startx -- vt1 -keeptty &>/dev/null
logout
fi
Offline
Start X from your shell profile and include a logout command
Hi, sorry for such late reply, can you please point me to wiki article that will tell me or just tell me where do I put this piece of code?
Offline
the first result if I searched for "startx" in the wiki:
Startx#Autostart_X_at_login
Offline
There should be no need for an explicit `logout` command if one properly uses `exec startx` rather than just `startx`.
While automating this in a shell profile is handy, that seems completely orthogonal to the question at hand. OP, instead of running `startx` from your tty, just use `exec startx` and the problem will be solved: if anyone uses Ctrl-Alt-Del from your lock screen, X may quit, but then they'll be dropped back to your logged out tty with a prompt for a username/password.
Last edited by Trilby (2017-12-03 11:59:59)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline