You are not logged in.
is there a shell command that can logout my xfce session cleanly, even if it is a complicated one such as finding a certain process and sending a certain signal to it, as opposed to killing every process? i'd like to be able to do this from a process of the same user that does not have any environment variables from xfce or x set in it, such as my named background sessions, or a text console, etc.
Offline
I use this command/function in my ~/.bashrc
## Kill user
#SIGKILL = 9 , SIGTERM = 15
ku() { sudo pkill -15 -u "${1}";}
# Refs: https://askubuntu.com/questions/967078/ … r-on-17-10
# https://www.linux.org/threads/kill-comm … nals.8881/
So actually, I used SIGTERM 9, but after studying your question a bit, I decided SIGTERM 15 may be more suitable.
It indeed logs me out from XFCE when I invoke this from a TTY as root user.
Last edited by castaway (2019-12-06 14:06:11)
Offline
does pkill avoid killing itself when run as the user so it can finish sending the signal to all processes?
and i have found that SIGTERM (15) causes not-yet-saved config changes to not be written. a softer logout signal is apparently needed.
Offline
there is a button in the "Action Button" plugin to do a logout. it leaves the background processes running. i'd like to know what this does. i do want to do just this much of a logout and leave the background processes running.
Offline
I think you should use Tmux or GNU Screen to be able to do that. A terminal multiplexer can detach sessions (that is running processes) from virtual terminals (like XTerm) and keep them running if even if you accidentally close them or, in this case, logs out from XFCE non-interactively.
You can then re-attach to any of the running sessions.
Last edited by castaway (2019-12-07 01:27:36)
Offline
[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 527.98 KiB (Peak: 529.27 KiB) ]