new topic: custom shell modes
@matthiasc
Submitted by Matthias Clasen Link to original bug (#726268)
Description
This may be too complex for a single-page topic, but we should explain how one can set up a kiosk-like single-application system with gnome-shell. There are a few aspects to this:
-
Lock down settings to prevent e.g. printing, terminal access, etc (already covered elsewhere)
-
Configure automatic login in /etc/gdm/custom.conf (already covered elsewhere) for a user
-
Set the default session for that user by adding a line
XSession=kiosk
to the file /var/lib/AccountsService/users/kiosk-user (assuming kiosk-user is the account you are using)
- Create the kiosk session by writing the desktop file /usr/share/xsessions/kiosk.desktop and setting the Exec line to be:
Exec=gnome-session --session kiosk
- Define the kiosk session by writing a custom session definition, ie a file /usr/share/gnome-session/sessions/kiosk.session, which has a line:
RequiredComponents=kiosk-app;gnome-settings-daemon;kiosk-shell;
This makes it so that you are launching your kiosk application, gnome-settings-daemon and gnome-shell in a custom configuration
- Create a desktop file for the kiosk-shell, /usr/share/applications/kiosk-shell.desktop, which will have a line like this:
Exec=gnome-shell --mode=kiosk
and a mode definition for gnome-shell called /usr/share/gnome-shell/modes/kiosk.json. This is a small json file defining the available gnome-shell UI. It is best to look at classic.json and initial-setup.json (in the same directory) as starting points