樹莓派修改啟動界面


參考文章:
樹莓派自定義開機啟動畫面(新版本2017-4后的)
修改樹莓派的開機啟動畫面

1.設置主題

 sudo plymouth-set-default-theme details 

可以通過 sudo plymouth-set-default-theme -l 查看有哪些主題

 

2.禁用Raspberry PI屏幕顏色測試

 sudo nano /boot/config.txt 

在最后添加:

 disable_splash=1 

 

3.屏蔽樹莓派在初始化中的代碼流顯示

 sudo nano /boot/cmdline.txt 

修改 console 為 tty3 ,在  rootwait 后添加 quiet splash plymouth.ignore-serial-consoles logo.nologo loglevel=3 disable_overscan=1 

 

4.設置啟動屏幕

4.1安裝fbi,framebuffer圖像查看器,以root身份運行

 sudo apt-get install fbi 

如果運行過程中出現問題,先執行 sudo apt-get update 升級一下apt-get.

 

4.2在root權限下創建

/etc/systemd/system/splashscreen.service 

增加如下內容(其中/etc/splash.png為需要開機顯示的圖像):

[Unit]
Description=Splashscreen
DefaultDependencies=no
After=basic.target
[Service]
ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /etc/splash.png
StandardInput=tty
StandardOutput=tty
[Install]
WantedBy=sysinit.target

 

4.3 開機自啟

systemctl enable splashscreen //開啟開機自啟動 
systemctl disable splashscreen //關閉開機自啟動 
systemctl status splashscreen //查看服務當前狀態

 

4.4 啟動服務

當創建服務后,可以

systemctl start splashscreen(開啟服務)
systemctl status splashscreen(查看相關服務的當前狀態)
systemctl stop splashscreen (停止相關的服務)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM