Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-12-06 01:31:37

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 818

is there a command to logout xfce cleanly?

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

#2 2019-12-06 13:59:21

castaway
Member
From: L America
Registered: 2019-12-06
Posts: 6

Re: is there a command to logout xfce cleanly?

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

#3 2019-12-06 20:59:27

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 818

Re: is there a command to logout xfce cleanly?

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

#4 2019-12-07 01:13:25

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 818

Re: is there a command to logout xfce cleanly?

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

#5 2019-12-07 01:23:07

castaway
Member
From: L America
Registered: 2019-12-06
Posts: 6

Re: is there a command to logout xfce cleanly?

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

Board footer

Powered by FluxBB