If you are using Lubuntu it is no wonder that this doesn't work, this advice is meant for systems that run Gnome 3.
|
works eveywhere
# pkill -KILL -u username
|
Quote:
|
Of course, there is still the option to kill the X-server: ctrl + alt + backspace.
This brings you right to the login screen. |
Bash script to create a logout command
Quote:
1. Create a new file called "logout". In it, place the following: !# /usr/bin/bash loginctl terminate-user $(whoami) 2. Save the file to your hoke directory for now. 3. Mark the file as executable: sudo chmod +X logout If all went well, when you do an ls -l you should see that the file now has execute permissions. 4. The final step is to move the file to the /usr/bin folder: sudo mv ~/logout /usr/bin/logout You should now be able to simply type logout from any terminal to completely logout. How this works: The command in the bash script simply calls the loginctl command and feeds it the name of the currently-logged-in user. This creates a single-word command to logout without having to specify your user name.It just works, no matter which terminal, window manager or linux distro you use. Cheers, -=Cameron |
All times are GMT -5. The time now is 10:55 AM. |