Difference between revisions of "GUI application in kiosk mode on Ubuntu"

From Notes_Wiki
(Created page with "= Ubuntu Kiosk Mode Configuration Guide = This document explains how to configure '''Kiosk Mode''' on Ubuntu for a dedicated user account. Kiosk mode restricts system access and allows a user to operate only a single application (browser/app) in a secured environment. == Purpose == This setup is required for: * Preventing desktop access * Restricting keyboard shortcuts * Blocking access to other apps * Auto-launching a specific application * Auto-login into a kiosk...")
 
(No difference)

Latest revision as of 10:03, 15 November 2025

Ubuntu Kiosk Mode Configuration Guide

This document explains how to configure Kiosk Mode on Ubuntu for a dedicated user account. Kiosk mode restricts system access and allows a user to operate only a single application (browser/app) in a secured environment.

Purpose

This setup is required for:

  • Preventing desktop access
  • Restricting keyboard shortcuts
  • Blocking access to other apps
  • Auto-launching a specific application
  • Auto-login into a kiosk user account

1. Create Kiosk User

Run the following command:

sudo adduser kioskuser

Set a password when prompted.

2. Enable Auto Login for Kiosk User

Edit the GDM configuration file:

sudo nano /etc/gdm3/custom.conf

Add or uncomment the following lines:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=kioskuser

Save and exit, then reboot to apply changes.

3. Create Autostart Directory

Login as the kioskuser, then run:

mkdir -p ~/.config/autostart

4. Auto-Launch Application (Example: Firefox Kiosk Mode)

Create an autostart entry:

nano ~/.config/autostart/firefox-kiosk.desktop

Paste the following:

[Desktop Entry]
Type=Application
Exec=firefox --kiosk https://your-website.com
Hidden=false
X-GNOME-Autostart-enabled=true
Name=Firefox Kiosk

Save and exit.

This ensures Firefox launches automatically in fullscreen kiosk mode.

5. Lock Down the Desktop Environment

Run these commands as kioskuser (not root):

Disable window switching (Alt+Tab):

gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]"

Disable close window shortcut (Alt+F4):

gsettings set org.gnome.desktop.wm.keybindings close "[]"

Disable Super/Windows key:

gsettings set org.gnome.mutter overlay-key ""

Hide desktop icons & prevent right-click:

gsettings set org.gnome.desktop.background show-desktop-icons false

Auto-hide Dock:

gsettings set org.gnome.shell.extensions.dash-to-dock autohide true

Prevent dock from appearing when an app is open:

gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed false


6. Verify Kiosk Mode

Login as kioskuser and check:

  • Alt+Tab does nothing
  • Alt+F4 does nothing
  • No desktop icons
  • Dock is hidden
  • App starts automatically
  • User cannot exit application

This confirms that kiosk mode is active.

7. Exit Kiosk Mode (Admin Only)

If you need to revert settings:

Press Ctrl + Alt + F3 Login as the admin user and edit:

sudo nano /etc/gdm3/custom.conf

Set:

AutomaticLoginEnable=false

Reboot into normal mode.

8. Notes

  • Kiosk user should not have sudo permissions.
  • This method works on Ubuntu 20.04, 22.04, and 24.04.
  • Any GUI app can be used instead of Firefox.