Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 21. Restricting the session to a single application
You can start the GNOME session in single-application mode, also known as kiosk mode. In this session, GNOME displays only a full-screen window of the application that you have selected.
21.1. Single-application mode Copier lienLien copié sur presse-papiers!
Single-application mode is a modified GNOME session that reconfigures the Mutter window manager into an interactive kiosk. This session locks down certain behavior to make the standard desktop more restrictive. The user can interact only with a single application selected by the administrator.
You can set up single-application mode for several use cases, such as:
- In the communication, entertainment, or education fields
- As a self-serve machine
- As an event manager
- As a registration point
The gnome-session-kiosk-session package provides the single-application mode configuration and sessions in RHEL 8.
21.2. Enabling single-application mode Copier lienLien copié sur presse-papiers!
This procedure installs and enables single-application mode, which restricts the GNOME session to a single application.
Procedure
Install the
gnome-session-kiosk-sessionpackage:yum install gnome-session-kiosk-session
# yum install gnome-session-kiosk-sessionCopy to Clipboard Copied! Toggle word wrap Toggle overflow As the user that will open the single-application session, create the
/home/user/.local/bin/redhat-kioskfile:mkdir -p ~/.local/bin touch ~/.local/bin/redhat-kiosk
[user]$ mkdir -p ~/.local/bin [user]$ touch ~/.local/bin/redhat-kioskCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/home/user/.local/bin/redhat-kioskfile and enter the executable name of the application that you want to launch in single-application mode.For example, to launch the Firefox browser in single-application mode, enter the following content:
#!/bin/sh while true; do firefox --kiosk https://example.org done#!/bin/sh while true; do firefox --kiosk https://example.org doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
while trueloop ensures that the application restarts if it terminates for any reason.Make the file executable:
chmod +x ~/.local/bin/redhat-kiosk
[user]$ chmod +x ~/.local/bin/redhat-kioskCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you created the file or its containing directories as a different user than the single-application user, such as
root, ensure that the file has the correct permissions:chown -R user:group ~user/.local
# chown -R user:group ~user/.localCopy to Clipboard Copied! Toggle word wrap Toggle overflow - At the GNOME login screen, select the Kiosk session from the gear button menu and log in as the single-application user.