gnome-session-quit
Log out or shut down GNOME session
SYNOPSIS
gnome-session-quit [OPTIONS]
PARAMETERS
--logout
Log out the current session.
--power-off
Shut down the system.
--reboot
Restart the system.
--force
Force quit even if some applications are still running. This may cause loss of data.
--no-prompt
Quit without confirmation dialog.
--help
Show help options.
--version
Show the program's version number and exit.
DESCRIPTION
The gnome-session-quit
command gracefully terminates the current GNOME session.
It presents a dialog allowing the user to either log out, shut down, or restart the system. If the --no-prompt
option is used, it will proceed without a confirmation dialog. By default without --no-prompt, a dialog is shown to confirm the logout/shutdown request. The gnome-session-quit
command uses the D-Bus interface to interact with the session manager.
This command is a user-level tool that provides a convenient way to end a GNOME session from the command line, or other programs. It integrates well with the GNOME desktop environment, providing a consistent and user-friendly experience.
Note that the user must have appropriate privileges to perform shutdown or reboot operations.
CAVEATS
Using the --force
option can lead to data loss if applications haven't saved their data. Ensure you have saved any important work before using it.
D-BUS INTERACTION
gnome-session-quit
relies on D-Bus for communication with the GNOME session manager. This allows for a consistent and reliable way to end the session and handle potential conflicts with running applications.
EXIT CODES
gnome-session-quit
typically returns an exit code of 0 on success. Non-zero exit codes usually indicate an error, such as a failure to communicate with the session manager or insufficient permissions.
HISTORY
gnome-session-quit
is part of the GNOME desktop environment and has been included since the advent of GNOME. It is designed to provide a standard way for users to quit their GNOME session, offering various options like logout, shutdown, and reboot, all integrated through D-Bus communication.
SEE ALSO
gnome-session(1), shutdown(8), reboot(8)