I would like to make a debian system where you can only open one GUI program at boot, no other graphical interface, no minimize, or any X apart from that program, is there a way to do it on debian if possible, or any other custom distro? I just want to boot open the program and allow the user to only see and use that program.
-
2Running a single application is called a kiosk; use this word in your searches, including [here](http://unix.stackexchange.com/questions/tagged/kiosk). – Gilles 'SO- stop being evil' Jan 28 '12 at 22:08
-
I recently was struggling with similar problem and I posted a solution - not debian based, but would work exactly the same way with debian. http://unix.stackexchange.com/questions/344374/how-to-configure-kiosk-with-wayland-xorg Beauty is - only 2 key combinations work (to reboot or to shutdown), system is fast and only has access to browser, normal text input and mouse. No other apps. – r0berts Feb 14 '17 at 15:07
2 Answers
I've done that with Ubuntu (Debian based), though I think the technique applies for other distros too. I'll just summarize the steps here together with some explanation, see "Run Linux with a bare window manager" for the scripts.
Add a custom session by creating a file at
/usr/share/xsessions/metacity-session.desktop. This file tells the login manager about your session.Create the file to be executed by the session added in (1)
/usr/local/bin/metacity-sessionCreate the user-specific config file
~/.metacity-session. This file will be executed by the file added in (2). The content should be the program you want to run, followed by an ampersand, for examplefirefox &Optionally make the user auto-login and make the custom session the default session for the user.
Here I use Metacity as the window manager for its simplicity, you can use Compiz if you want to.
There are tools to lock down the system. A search yields tools such as sabayon and pessulus. I haven't used any of them to give a recommendation.
There are also distros specialized on kiosk mode, the most promising seems to be Fedora Kiosk Mode, though it's not Debian based.
-
[Webconverger](http://webconverger.org/) looks interesting in the *specialized distro* department, and is Debian-based. – sr_ Nov 08 '12 at 11:56
-
1The `Run Linux with a bare window manager` link now uses a different definition of bare than you intended! – Peter M Apr 08 '14 at 13:05
-
-
@PeterM my old blog, it died 3 replaced with in archive.org link until I bring it back – phunehehe Aug 24 '15 at 09:57
I know this is a little old but I've written a simple how to on this that works on PCs and the Raspberry PI:
Creating a Debian Chromium Kiosk (PC or Raspberry PI)
download and install debian
- PC x64 or i386 : download "standard" iso from debian.org
- raspberry pi 2/3 : download "raspbian lite" from raspberryip.org
- use Win32DiskImager to write img to SD card
after install use apt to install packages
apt install --no-install-recommends xorg openbox lightdm chromium pulseaudio- on raspberry pi chromium package is chromium-browser
- installing packages is slow on raspberry, get a FAST SD card (class 10 or better)
configure lightdm for autologin
- edit
/etc/lightdm/lightdm.confgoto[SeatDefaults]section, uncommentautologin-user[SeatDefaults] autologin-user={USER} {USER}is defined during debian installer for PC{USER}is 'pi' for raspberry pi
- edit
configure openbox to start chromium automatically
- edit
/etc/xdg/openbox/autostartor create~/.config/openbox/autostartand add these lines:xset -dpms xset s off chromium --kiosk http://google.com - change google.com to whatever you need
- the xset commands disable screen savers
- on raspberry pi chromium is chromium-browser
- edit
to auto connect to Wifi
edit /etc/network/interfacesand write:auto wlan0 iface wlan0 inet dhcp wpa-ssid {ssid} wpa-psk {password}- replace
{ssid}and{password}with your respective WiFi SSID and password
- 69,900
- 13
- 192
- 292
- 171
- 1
- 2
-
1You can also modify `xserver-command` on `/etc/lightdm/lightdm.conf` if you want hide mouse cursor. `xserver-command=X -bs -core -nocursor` – EFernandes Oct 11 '18 at 15:34