How to logout a user from a desktop session without terminating his processes via a command line?

334 Views Asked by At

I am making MYSELF a restraint of sitting at the laptop by using crontab and time.conf for me not to be able to log into the system at specific hours. Yet the options the internet provides is by using 'skill -KILL -u user' which terminates ALL the processes of the session. Yet I want to just be kicked out to the login window, because I don't want all my works to be lost. In another words, I am looking for a terminal command that will "switch user", not "logout". I am using the latest Xubuntu.

1

There are 1 best solutions below

1
art3miy On

I have found a solution: $ dm-tool switch-to-greeter