Command line to log out without displaying a confirmation dialog
Posted: Thu Sep 29, 2022 5:23 am
Is there a command line that logs a user out without first displaying the logout confirmation dialog?
I'm aware of these commands,
* lxde-logout
* lxsession-logout
but (a) both of these programs display a logout confirmation dialog, and (b) these programs' manual pages don't provide (or don't document) an option that disables/bypasses the logout confirmation dialog.
As a software developer, I sometimes need to repeatedly log out and log back in to test changes to software (e.g., login scripts, logout scripts), and I'd like to be able to log out without having to go through the logout confirmation dialog: it's an unwanted and unneeded extra step for me.
Ultimately, I'd like to create an XDG desktop file that places a "Logout" icon on the user's desktop. Clicking on the desktop iconlogs out the user without displaying the confirmation dialog.
(NB: I know how to create the desktop file. What I don't know is the command line I should use to end the current login session without displaying a logout confirmation dialog.)
I'm aware of these commands,
* lxde-logout
* lxsession-logout
but (a) both of these programs display a logout confirmation dialog, and (b) these programs' manual pages don't provide (or don't document) an option that disables/bypasses the logout confirmation dialog.
As a software developer, I sometimes need to repeatedly log out and log back in to test changes to software (e.g., login scripts, logout scripts), and I'd like to be able to log out without having to go through the logout confirmation dialog: it's an unwanted and unneeded extra step for me.
Ultimately, I'd like to create an XDG desktop file that places a "Logout" icon on the user's desktop. Clicking on the desktop iconlogs out the user without displaying the confirmation dialog.
(NB: I know how to create the desktop file. What I don't know is the command line I should use to end the current login session without displaying a logout confirmation dialog.)