树莓派修改启动界面

参考文章:
树莓派自定义开机启动画面(新版本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 (停止相关的服务)
posted @ 2019-06-27 11:02  CoderZZZ  阅读(4551)  评论(0编辑  收藏  举报