Buscar

Este contenido no está disponible en el idioma seleccionado.

13.9. Single-application Mode

download PDF
Single-application mode is a modified shell which reconfigures the shell into an interactive kiosk. The administrator locks down some behavior to make the standard desktop more restrictive for the user, letting them focus on selected features.
Set up single-application mode for a wide range of functions in a number of fields (from communication to entertainment or education) and use it as a self-serve machine, event manager, registration point, etc.

Procedure 13.9. Set Up Single-application Mode

  1. Create the following files with the following content:
    • /usr/bin/redhat-kiosk
      
      #!/bin/sh
      
      if [ ! -e ~/.local/bin/redhat-kiosk ]; then
          mkdir -p ~/.local/bin ~/.config
          cat > ~/.local/bin/redhat-kiosk << EOF
      #!/bin/sh
      # This script is located in ~/.local/bin.
      # It's provided as an example script to show how
      # the kiosk session works.  At the moment, the script
      # just starts a text editor open to itself, but it
      # should get customized to instead start a full screen
      # application designed for the kiosk deployment.
      # The "while true" bit just makes sure the application gets
      # restarted if it dies for whatever reason.
      
      while true; do
          gedit ~/.local/bin/redhat-kiosk
      done
      
      EOF
      
          chmod +x ~/.local/bin/redhat-kiosk
          touch ~/.config/gnome-initial-setup-done
      fi
      
      exec ~/.local/bin/redhat-kiosk "$@"
      

      Important

      The /usr/bin/redhat-kiosk file must be executable.
      Replace the gedit ~/.local/bin/redhat-kiosk code by the commands that you want to execute in the kiosk session. This example launches a full-screen application designed for the kiosk deployment named http://mine-kios-web-app:
      [...]
      while true; do
          firefox --kiosk http://mine-kios-web-app
      done
      [...]
      
    • /usr/share/applications/com.redhat.Kiosk.Script.desktop
      [Desktop Entry]
      Name=Kiosk
      Type=Application
      Exec=redhat-kiosk
      
    • /usr/share/applications/com.redhat.Kiosk.WindowManager.desktop
      [Desktop Entry]
      Type=Application
      Name=Mutter
      Comment=Window manager
      Exec=/usr/bin/mutter
      Categories=GNOME;GTK;Core;
      OnlyShowIn=GNOME;
      NoDisplay=true
      X-GNOME-Autostart-Phase=DisplayServer
      X-GNOME-Provides=windowmanager;
      X-GNOME-Autostart-Notify=true
      X-GNOME-AutoRestart=false
      X-GNOME-HiddenUnderSystemd=true
      
    • /usr/share/gnome-session/sessions/redhat-kiosk.session
      [GNOME Session]
      Name=Kiosk
      RequiredComponents=com.redhat.Kiosk.WindowManager;com.redhat.Kiosk.Script;
      
    • /usr/share/xsessions/com.redhat.Kiosk.desktop
      [Desktop Entry]
      Name=Kiosk
      Comment=Kiosk mode
      Exec=/usr/bin/gnome-session --session=redhat-kiosk
      DesktopNames=Red-Hat-Kiosk;GNOME;
      
  2. Restart the GDM service:
    systemctl restart gdm.service
  3. Create a separate user for the kiosk session and select Kiosk as the session type for the user of the kiosk session.
    Selecting the kiosk session

    Figure 13.1. Selecting the kiosk session

By starting the Kiosk session, the user launches a full screen application designed for the kiosk deployment.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.