起動時に1つのGUIプログラムしか開けない、他のグラフィカルインターフェイスがない、最小化できない、またはそのプログラムとは別のXであるdebianシステムを作成したいのですが、可能であればdebianでそれを行う方法などがあります。カスタムディストリビューション?プログラムを起動して起動し、ユーザーにそのプログラムの表示と使用のみを許可したいだけです。
私はUbuntu(Debianベース)でそれを行いましたが、このテクニックは他のディストリビューションにも適用できると思います。ここでは、手順をいくつかの説明と一緒に要約します。スクリプトについては、「 ベアウィンドウマネージャーでLinuxを実行 」を参照してください。
/usr/share/xsessions/metacity-session.desktop
にファイルを作成して、カスタムセッションを追加します。このファイルは、ログインマネージャーにセッションについて通知します。/usr/local/bin/metacity-session
ユーザー固有の設定ファイル~/.metacity-session
を作成します。このファイルは(2)で追加したファイルで実行されます。コンテンツは、実行するプログラムの後にアンパサンドを続ける必要があります。たとえば、
firefox &
必要に応じて、ユーザーを自動ログインし、カスタムセッションをユーザーのデフォルトセッションにします。
ここでは、簡単にするためにMetacityをウィンドウマネージャーとして使用しています。必要に応じてCompizを使用できます。
システムをロックダウンするツールがあります。検索により、 sabayon および pessulus などのツールが生成されます。私はそれらのどれも推奨を与えるために使用していません。
Debianベースではないが、キオスクモードに特化したディストリビューションもあり、最も有望なのは Fedoraキオスクモード のようです。
私はこれが少し古いことを知っていますが、PCと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.conf goto [SeatDefaults] section, uncomment "autologin-user"
[SeatDefaults]
autologin-user={USER}
- {USER} is defined during debian installer for PC
- {USER} is 'pi' for Raspberry Pi
- configure openbox to start chromium automatically
- edit /etc/xdg/openbox/autostart or create ~/.config/openbox/autostart and 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
- to auto connect to Wifi
- edit /etc/network/interfaces and write:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid {ssid}
wpa-psk {password}
- replace {ssid} and {password} with your respective WiFi SSID and password