rvp
Ahhhh gotcha.
So then, can you give me an example as to why someone would not want to turn on DontVTSwitch
?
secondly, please remind me how to compile runsafe.c
?
I'm getting some errors when I try to compile it with gcc
~ $ gcc -o runsafe runsafe.c
runsafe.c: In function ‘main’:
runsafe.c:43:2: error: ‘pid_tpid’ undeclared (first use in this function); did you mean ‘pid_t’?
pid_tpid = -1;
^~~~~~~~
pid_t
runsafe.c:43:2: note: each undeclared identifier is reported only once for each function it appears in
runsafe.c:51:10: error: ‘pid’ undeclared (first use in this function); did you mean ‘pipe’?
switch (pid = fork()) {
^~~
pipe
runsafe.c:72:24: error: expected ‘)’ before ‘;’ token
killpg(pid, SIGTERM); /* kill pgrp stragglers */
^
runsafe.c:74:2: error: expected expression before ‘}’ token
}
^
Thanks!
Edit:
I just realised that I cant disable the ability to switch to TTY otherwise I wont be able to get back to my desktop after my laptop sleeps/hibernates
I set powerd
LidSwitch action that allows me to put my laptop into hibernation after closing the lid and the only way to resume my session again after opening the laptop is to first switch to another TTYctrl-alt-F4
then back to my desktop ctrl-alt-F5
Any other solution here or is it now just a tradeoff?