13.9. Single-application Mode
Procedure 13.9. Set Up Single-application Mode
- Lock down settings to prevent printing, terminal access, and so on. See:
- Configure automatic login in the
/etc/gdm/custom.conffile for the user.
- Create a new user with a name, which follows typical naming conventions (no space or special characters, do not start with a digit or a dash). Also, make sure the user name matches with the related names, such as when referring to a session. A good example is kiosk-user.
- Create a session with a name matching your user name (for example, for our kiosk-user, kiosk is a good match) by writing a
/usr/share/xsessions/kiosk.desktopfile and setting the Exec line to be:
Exec=gnome-session --session kiosk
- Set the default session for kiosk-user by adding the following line to the
- Define the kiosk session by writing a custom session definition, containing the following line:
RequiredComponents=kiosk-app;gnome-settings-daemon;kiosk-shell;This creates a session that runs three programs: kiosk-app (a sample application),
gnome-settings-daemon(standard component in the GNOME session), and kiosk-shell (which is a customized version of gnome-shell).
- Create a desktop file for
/usr/share/applications/kiosk-shell.desktop, which will contain:
- Create a mode definition called
/usr/share/gnome-shell/modes/kiosk.json. This is a small json file defining the available
GNOME ShellUI. (Look at classic.json and initial-setup.json in the same directory as the starting point.)