I’m trying to learn how to set up gnome-shell kiosk mode, both for my personal knowledge and also to contribute to gnome-user-docs and improve this doc page (see this issue).
Setup
I’d like to set up a kiosk mode for a deejay user who can run only one application (Lollypop or Rythmbox).
I’ll try to follow what seems to be the most logical order:
-
Create a dedicated user, let’s call it
deejay
. -
Assign to that user a specific session called
kiosk
(yet to be defined) by adding this line to/var/lib/AccountsService/users/deejay
:XSession=kiosk
-
Create a launchable for the new session in the file
/usr/share/xsessions/kiosk.desktop
:
[Desktop Entry]
Name=kiosk
Exec=gnome-session --session kiosk
- Define the kiosk session in
/usr/share/gnome-sessions/kiosk.session
. This is mostly copied from gnome.session just as a starting point:
[GNOME Session]
Name=kiosk
RequiredComponents=kiosk-shell;org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.UsbProtection;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
- The kiosk-shell of above RequiredComponents is a launchable you must create as
/usr/share/applications/kiosk-shell.desktop
and it will contain the call to gnome-shell kiosk mode:
[Desktop Entry]
Exec=gnome-shell --mode=kiosk
- Create the kiosk mode definition in
/usr/share/gnome-shell/modes/kiosk.json
to define the available gnome-shell user interface. Here’s what I tried:
{
"parentMode": "user",
"panel": { "left": ["activities", "appMenu"],
"center": [],
"right": ["aggregateMenu"]
}
}
I’ve based this on what I read in gnome-shell source. But I’m just guessing and going ahead with trials&errors.
Test is failing
When I try to switch to deejay user I get the error “Something went wrong” and I’m redirected to login screen. Where can I get more information about the error? journalctl -b0 /usr/bin/gnome-shell
doesn’t seem to show useful information, at least for me.
Do you have any idea of what I might be doing wrong?