trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: January 2018

Re: [trinity-users] Session logout from script

From: "Dr. Nikolaus Klepp" <office@...>
Date: Wed, 17 Jan 2018 08:48:02 +0100
Am Mittwoch, 17. Januar 2018 schrieb Roel Wagenaar:
> Is there a method to logout from a session from a script?
> 
> Now at 23.00 my desktop does a tdm-trinity stop, followed by a shutdown, I would
> like to logout first an then stop trinity.
> 

You could do the following, depending on what you want to achieve:

Just perform logout, if TDE is configured to shutdown after logout, it will turn off the computer (in most cases), but you will have to run it some minutes before shutdown:

	$ dcop ksmserver ksmserver logout

If you want to ensure the session is saved, you can do something like:

	$ dcop ksmserver ksmserver saveCurrentSession
	$ ksmserver ksmserver logout
	# sleep 10; poweroff

You do not need to explictly stop tdm, initiating a system shutdown will do that for you.

Nik



-- 
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...