本來這個blog是記錄開發輸入法的點滴的,後來越來越雜,現在什麼都記錄了。

2018年12月28日 星期五

How to run a standalone GUI program without any desktop in Raspberry Pi (Raspbian Lite)?

How to run a standalone GUI program without any desktop in Raspberry Pi (Raspbian Lite)?
  1. Install Raspbian Lite into Raspberry Pi
  2. Upgrade the Raspbian Lite:
    sudo apt-get install update
  3. Install lightdm and xinit
    sudo apt-get install lightdm xinit
  4. Depends on whether you need user to login or not, set it in:
    sudo raspi-config > Boot Options > Desktop / CLI
  5. Now when you reboot, you will see the desktop with Xterm launched.
     
  6.  According to [1], this is why the xterm is launched:
    • /etc/X11/xinitrc
    • which runs . /etc/X11/Xsessions
    • which runs all scripts in /etc/X11/Xsession.d
    • which runs /etc/X11/Xsession.d/99x11-common_start
    • which runs $STARTUP
    • if ~/.xsession is defined, then $STARTUP is ~/.xsession
       
  7. To launch other program, create ~/.xsession, added content like:
    chromium-browser --start-fullscreen
  8. In 201x, Google introduces the No Tofu font. To install it:
    sudo apt-get install fonts-noto
     
    [1]: http://xpt.sourceforge.net/techdocs/nix/x/general/xwin03-WinManagerdesktopsChoosing/ar01s04.html
 

沒有留言: