Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
树莓派系列配置屏幕常亮、去掉启动滚动代码及彩虹画,增加开机动画

树莓派系列配置屏幕常亮、去掉启动滚动代码及彩虹画,增加开机动画

1 设置不黑屏不休眠
1.1 打开lightdm.conf
sudo nano /etc/lightdm/lightdm.conf
1.
1.2 修改lightdm.conf

找到 [SeatDefaults] 段下的 ’xserver-command=X’, 取消注释 , 修改为

xserver-command=X -s 0 -dpms

-s 设置屏幕保护不启用

dpms 关闭电源节能管理


1.3 重启使设置生效
sudo reboot
1.
2 屏蔽开机彩虹屏和文本,修改开机启动图片、设置开机动画
2.1 硬件环境

树莓派4B

系统:Linux raspberrypi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux

2.2 禁用彩虹屏
2.2.1 打开config.txt文件
sudo nano /boot/config.txt
1.
在末尾另起一行输入

disable_splash=1
1.
2.3 取消光标跳动和代码滚动
2.3.1 打开cmdline
sudo nano /boot/cmdline.txt
1.
2.3.2 添加如下命令
consoleblank=1 logo.nologo quiet loglevel=0 plymouth.enable=0 vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fastboot noatime nodiratime noram
1.
2.4 修改开机启动图片
默认的启动图片是树莓派标识,且树莓派的默认主题是pix(起码我的是这样,不清楚的可以自己查下设备的主题)。所以我的开机图片路径在/usr/share/plymouth/themes/pix/splash.png,把这张图片强覆盖即可。

2.5 添加开机动画
​ 使用开机动画,需要用的一个播放器​​omxplayer​​,自行安装

sudo apt-get update
sudo apt-get install omxplayer
1.
2.
2.5.1 打开rc.local文件
sudo nano /etc/rc.local
1.
2.5.2 在适当位置加入命令
omxplayer [动画文件.mov] &
1.
例如我的开机动画视频是logo.mov,放在/home/pi下,那么语句就是

登录后复制
omxplayer /home/pi/logo.mov &
1.