Ubuntu Server 16.04.02 with Splash Screen and Kiosk mode

Ubuntu Server 16.04.02 with Splash Screen and Kiosk mode

Chrome を使用して、キオスク モードで Ubuntu Server 16.04.02 を設定しようとしています。動作はしますが、ブート メッセージを表示する代わりにスプラッシュ スクリーンを設定することができません。

これまでの作業

Chrome キオスクを作成する手順

  1. OpenSSHサーバーを搭載したUbuntu Server 16.04.02をインストールしました
  2. アップデート:sudo apt update && sudo apt upgrade -y
  3. ディスプレイサーバー + Windows マネージャー:sudo apt install xorg openbox -y

    注: openbox をインストールしようとしましたが、--no-install-recommends画面の半分 (右側) が黒くなりました。

  4. グーグルクローム

    sudo add-apt-repository 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main'
    wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
    sudo apt update && sudo apt install google-chrome-stable -y
    
  5. 「キオスク」ユーザーを作成します。sudo adduser kiosk
  6. Chrome の起動スクリプト:

    sudo tee -a /home/kiosk/startchrome.sh <<EOF
    #!/bin/bash
    
    # Turn off DPMS (Display Power Management Signaling)
    xset -dpms
    
    # Disable screen saver blanking
    xset s off
    
    # Start OpenBox
    openbox-session &
    
    # Make sure Chrome is always started - restart if needed
    while true; do
      rm -rf ~/.{config,cache}/google-chrome/
      google-chrome --ignore-certificate-errors --kiosk --no-first-run --disable-infobars --disable-session-crashed-bubble --disable-translate         'http://localhost:8080'
    done
    EOF
    

    実行可能にしてログイン時に実行します。

    sudo chmod +x /home/kiosk/startchrome.sh
    echo "/usr/bin/startx /etc/X11/Xsession /home/kiosk/startchrome.sh -- :0 &> /dev/null" | sudo tee -a /home/kiosk/.profile
    
  7. 自動ログインを構成する:

    Getty を設定します。

    sudo mkdir /etc/systemd/system/[email protected]/
    sudo tee -a /etc/systemd/system/[email protected]/autologin.conf <<EOF
    [Service]
    ExecStart=
    ExecStart=-/sbin/agetty --skip-login --noissue --autologin kiosk --noclear %I $TERM
    Type=idle
    EOF
    

    Gettyを有効にする:

    sudo systemctl enable [email protected]
    
  8. 起動時にバナーメッセージを非表示にする

    sudo touch /home/kiosk/.hushlogin
    sudo chown kiosk:kiosk /home/kiosk/.hushlogin
    

問題 - X が起動しない

すべてのブート メッセージを削除したいです。試してみましたGRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/etc/default/grub、画面の左上に小さなカーソルしか表示されません。Chrome はもう表示されませんか?

解決

キオスク ユーザーをビデオ グループに追加する必要があります。plymouth をインストールする前はなぜ動作していたのかはわかりません。

    sudo usermod -a -G audio kiosk
    sudo usermod -a -G video kiosk

注: Ubuntu 17.04 で独自の手順を試しましたが、次の追加手順を実行する必要がありました。

    sudo apt install xserver-xorg-legacy
    sudo dpkg-reconfigure xserver-xorg-legacy

次に、メニューで「誰でも」を選択します。次に、変更して/etc/X11/Xwrapper.config設定します。

    needs_root_rights=yes
    allowed_users=anybody

質問 - 新しいテーマを設定する方法

スプラッシュ スクリーンも必要なので、plymouth をインストールする必要があると思います。何をインストールし、どのように設定すればよいでしょうか。

解決

私はubuntu-logoをベースにテーマを作成し、それをコピーしました/usr/share/plymouth/themes/:

    sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/MY_THEME/MY_THEME.plymouth 150
    sudo update-alternatives --config default.plymouth

テーマの選択を求められます。私はテーマを選択し、その後、次の操作を行う必要があります。

    sudo update-initramfs -u
    sudo update-grub

ありがとう!

答え1

起動メッセージは によって回避されますGRUB_CMDLINE_LINUX_DEFAULT="quiet splash"。それでもカーソルが表示されるのはなぜかわかりません。

Anyway, to answer your question about the plymouth, you want to install it by running the command sudo apt-get install plymouth. This should install it to the system. Then, your want to copy all of the contents of /usr/share/plymouth/themes/ubuntu-logo to another folder (Preferably somewhere in the /usr/share/plymouth/themes directory). Then, your most likely want to change the image ubuntu-logo in your newly copied folder. Then, to make the change to the new boot logo, edit the configuration file for plymouth located at /etc/alternatives/default.plymouth. There, change the address for the two lines below to the new folder you created earlier:

ImageDir=/usr/share/plymouth/themes/ubuntu-logo
ScriptFile=/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.script

So, for example, I might edit the lines to be like this:

ImageDir=/usr/share/plymouth/themes/mytheme
ScriptFile=/usr/share/plymouth/themes/mytheme/ubuntu-logo.script

Then, save the configuration and reboot. You now should have your boot logo image instead of the regular Ubuntu one.

答え2

If you want to get rid of the mouse cursor, when you make the startchrome.sh executable (Make it executable and run on login:) just add -nocursor e.g.:

sudo chmod +x /home/kiosk/startchrome.sh  
echo "/usr/bin/startx /etc/X11/Xsession /home/kiosk/startchrome.sh -- -nocursor :0" | sudo tee -a /home/kiosk/.profile  

答え3

my entries for grub ,you can check your possible resolution with sudo hwinfo --framebuffer

if entries are done sudo update-grub

if working n editing on plymouth / grub its never a mistake to run sudo update-initramfs -u behind

関連情報