How to Enable or Disable Logout Prompt on Ubuntu Linux

This article explains the steps you can take to turn on or off the logout prompt on Ubuntu Linux.

By default, when you click the log out 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. 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.

Ubuntu Linux activities overview Terminal search
Ubuntu Linux activities overview Terminal search

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 log-out 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 common system changes if you can’t use the command Terminal app.

If you are familiar with Windows, then 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, but without a massive database that is in the Windows system.

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.

ubuntu linux decon editor install
ubuntu Linux decon editor 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, simply toggle the button back to the Off position.

Ubuntu Linux turn on or off log out prompt
Ubuntu Linux turn on or off log out prompt

Once disabled, you should not see the logout prompt when you wish to log out. If enabled, you will always see the logout prompt every time you wish to log out.

Ubuntu Linux logout prompt
Ubuntu Linux logout prompt

That should do it!

Conclusion:

This post showed you how to turn on or off the logout prompt on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.