This article explains the steps to turn on or off the logout prompt on Ubuntu Linux.
By default, when you click the logout command button on the system menu, it prompts you to confirm that you want to log out of your sessions.
This is a good practice, and it’s there so that you don’t accidentally log out of your account session and lose your unsaved changes.
Ubuntu Linux allows users to change this gnome-session setting. When you turn it off, gnome-session will not prompt you before logging out of your session. However, if enabled, you will always get a prompt to confirm before signing out of your session.
Turn on or off log out prompt on Ubuntu Linux
As described above, you will always get a prompt to confirm you wish to log out of your session on Ubuntu Linux.
Ubuntu Linux allows you to change your gnome-session settings so that you don’t get a prompt each time you want to log out, and the steps below show you how.
First, open the Terminal app in Ubuntu Linux.
You can do that by pressing the Super key (or Windows key) to show the Overview screen. Then use the search box to search for ‘Terminal. ‘
Select the Terminal app to launch.
Alternatively, press the keyboard shortcut (CTRL + ALT + T) on your keyboard to launch the Terminal app.
When the Terminal app opens, type the commands below to disable the logout prompt on Ubuntu Linux.
gsettings set org.gnome.SessionManager logout-prompt false
To reverse and enable the logout prompt again, run the commands below.
gsettings reset org.gnome.SessionManager logout-prompt
Disable or enable the logout prompt using the Dconf Editor
You can also use Dconf Editor to make typical system changes if you can’t use the command Terminal app.
If you are familiar with Windows, you know about Windows Registry Editor.
Ubuntu Linux doesn’t have a registry database to configure hidden system settings. Howerver, Ubuntu Linux uses the Dconf Editor tool to change low-level system configurations and settings.
You can call it a Ubuntu Linux Registry Editor because it provides similar functionality without a massive Windows system database.
To use Dconf Editor, you must first install it since it doesn’t come with Ubuntu Linux.
Read the post below to learn how to install software on Ubuntu Linux.
How to add or remove software on Ubuntu Linux
In the Ubuntu Software app, search for Dconf Editor to install.
After installing and launching the Dconf Editor app, navigate to the path below:
org -> gnome -> gnome-session
On the logout-prompt Dconf settings on the list, toggle the button to the On position to enable.
To disable it, toggle the button back to the Off position.
Once disabled, you should not see the logout prompt when you wish to log out. However, if enabled, you will always see the logout prompt whenever you wish to log out.
That should do it!
This post showed you how to turn on or off the logout prompt on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.