Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To disable the normal logout action on Ubuntu Desktop, set GNOME’s disable-log-out dconf key to true. For a system-wide policy that users cannot undo, add the setting to the system dconf database, lock the key, and run sudo dconf update. If users must not escape the restriction by switching accounts, lock down user switching as well.

What does disabling logout on Ubuntu Desktop do?

Ubuntu Desktop uses GNOME’s boolean dconf key /org/gnome/desktop/lockdown/disable-log-out to control the normal logout action. Its default is false; setting it to true disables that action for users covered by the policy. Canonical’s ADSys policy reference lists the key as supported on Ubuntu 22.04, 24.04, 25.10, and 26.04 in its current stable documentation.

This is a session-interface restriction, not a replacement for account security, physical access controls, or a complete kiosk security design. It is intended for managed setups such as unmanned kiosks and public internet terminals where the active GNOME session should remain available.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I disable logout system-wide?

Use the system dconf database to apply the setting across users, then add a lock so covered users cannot change the key back in their own settings. You need administrator privileges to create the files under /etc/dconf and update the database.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  1. Create or edit /etc/dconf/profile/user so it contains these lines:

    user-db:user
    system-db:local

    This profile tells dconf to use the user database and the system database named local.

  2. Create /etc/dconf/db/local.d/00-logout with the policy settings:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    [org/gnome/desktop/lockdown]
    # Prevent the user from logging out
    disable-log-out=true
    
    # Recommended for managed or kiosk deployments
    disable-user-switching=true

    The first setting disables the normal logout action. The second is recommended when the goal is to keep a managed session in place rather than simply remove one way to leave it.

  3. Create /etc/dconf/db/local.d/locks/lockdown with the keys that users must not change:

    Rank #2
    Sale
    Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
    • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
    • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
    • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
    • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
    • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
    # Lock user logout
    /org/gnome/desktop/lockdown/disable-log-out
    
    # Lock user switching
    /org/gnome/desktop/lockdown/disable-user-switching

    Locking is what makes these system settings resistant to changes made from a user’s own settings.

  4. Build the updated system dconf database:

    sudo dconf update

    Run this after creating or changing the profile, keyfile, or lock file.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Restart the computer or begin a fresh session so the system-wide settings take effect. Then verify the expected behavior using an account covered by the policy.

Should I disable user switching too?

Yes, if the requirement is that users must not leave the managed session and enter another account. GNOME warns that users can evade the logout lockdown by switching to a different user. Set disable-user-switching=true and lock its key alongside the logout key to close that documented route.

If the aim is only to remove the usual logout action from an otherwise ordinary desktop, you may choose to leave switching available—but understand that it weakens the restriction. Before disabling both options, arrange a separate administrator recovery route; otherwise, routine maintenance or recovery at the machine may be harder.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

What is the difference between a dconf setting and a locked policy?

A setting in a user’s own dconf database is user-changeable. A system dconf value combined with a lock file is the appropriate GNOME-documented approach for system-wide enforcement.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach Scope Can the covered user change it? User switching route
User-level preference One user’s settings Yes; it is not locked by a system lock file Not addressed by the logout key alone
System dconf value without a lock System database, as configured in the profile The setting is not locked against user changes Remains available unless separately disabled
System dconf value with lock files Users covered by the system dconf database No, for the keys that are locked Remains available unless its key is also set and locked

For a controlled terminal, configure and lock both keys. The system database applies according to the dconf profile; it should not be described as a universal restriction on every kind of account or session on the machine.

Does this stop automatic logout after inactivity?

No. Disabling GNOME’s normal logout action is separate from configuring what happens to an idle session. GNOME documents idle-session behavior through org.gnome.settings-daemon.plugins.power/sleep-inactive-*-type. Treat that as a separate policy decision: automatically ending an idle session can cause unsaved data to be lost.

Do not assume that changing the logout lockdown key changes power or inactivity behavior. If an unattended device needs a particular idle response, assess that setting separately and consider what happens to open work before applying it.

How should I deploy this on a kiosk or managed terminal?

Apply the policy to a test account and check both the expected user experience and the administrator’s ability to recover the session. A hidden or disabled logout action can keep a public session available, but the setting alone does not secure the device against other forms of access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
  • Confirm the requirement: Decide whether you only need the normal logout action unavailable, or whether switching accounts must also be blocked.
  • Choose policy scope: Use the system dconf database for a managed, system-wide policy rather than relying on an individual user’s preference.
  • Lock only deliberate restrictions: Add the relevant keys to the locks file so users cannot reverse those settings themselves.
  • Plan administrator recovery: Establish how an authorized administrator can access and maintain the computer before restricting both logout and switching.
  • Test the actual deployment: Start a fresh session after updating dconf, then test the normal user flow on the account and desktop environment that will be used.

GNOME identifies kiosks and public internet access terminals as intended use cases, but its guidance does not quantify a security benefit. Treat this as one part of a managed deployment, not as proof that the device is protected from every bypass or physical-access risk.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What should I check if the logout option still appears?

Check the configuration chain in order: dconf profile, system keyfile, lock file, database update, and session refresh. A missing or misnamed path at any point can prevent the intended policy from taking effect.

  1. Confirm /etc/dconf/profile/user includes system-db:local exactly, matching the database name used in the next file path.

  2. Confirm the keyfile is at /etc/dconf/db/local.d/00-logout and the section header is [org/gnome/desktop/lockdown].

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Check that disable-log-out=true is spelled with the hyphens shown and is under that section.

    Best Value
    Sale
    Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
    • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
    • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
    • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
    • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
    • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
  4. If users must not change the policy, confirm the matching absolute key path appears in /etc/dconf/db/local.d/locks/lockdown.

  5. Run sudo dconf update again after any edits, then test in a fresh session or after restarting the system.

  6. If switching accounts is still possible, verify that disable-user-switching=true is present and its key is also locked.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test with the account and session covered by the system profile; checking only the administrator account may not represent the configured user experience.

Frequently Asked Questions

Can I disable logout for just one Ubuntu user?

The steps here configure the system dconf database, so they are intended for users covered by that system profile. A per-user preference is a different, user-changeable approach; the documented system-wide lockdown uses a system database and lock files.

Does disabling logout also prevent shutting down Ubuntu?

The documented key controls GNOME’s logout action, not a general shutdown policy. The cited guidance does not establish that this setting disables shutdown controls, so do not rely on it for that purpose.

Will this setting end an existing session immediately?

The documented procedure says to restart or begin a fresh session for system-wide settings to take effect. It does not specify that applying the policy forcibly terminates a session that is already running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does the logout lockdown affect SSH sessions?

The key is a GNOME desktop lockdown setting for the normal graphical logout action. The cited documentation does not establish any effect on command-line or remote SSH sessions.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.