前端开发入门到精通的在线学习网站

网站首页 > 资源文章 正文

树莓派隐藏鼠标光标和修改启动界面

qiguaw 2024-10-02 19:31:32 资源文章 17 ℃ 0 评论

树莓派隐藏鼠标光标和修改启动界面


最佳解决思路

试试’unclutter’

此程序的目的是在鼠标移动一段时间后隐藏指针。使用它,您可以使指针仅在用户触摸屏幕时显示,并在其后立即消失。 (也许这不是你的目标。但它比你的替代方案容易得多= P)

要使用,请安装它

sudo apt-get install unclutter

然后运行它

unclutter -idle 0.01 -root

数字是指针消失前的秒数(在这种情况下,为1/100秒)

次佳解决思路

如果您从不希望光标出现(适用于触摸屏),那么根据我的经验,unclutter是不够的。相反,您可以在启动X时使用-nocursor。

例:

startx -nocursor

请参阅http://www.x.org/wiki/AdvancedTopicsFAQ/#index1h2

第三种解决思路

如果你使用lightdm:

编辑/etc/lightdm/lightdm.conf添加:

xserver-command=X -bs -core -nocursor

如果你使用nodm:

通过替换来编辑/etc/default/nodm:

NODM_X_OPTIONS='-nolisten tcp'

NODM_X_OPTIONS='-nolisten tcp -nocursor'

这是建立从吉布斯非常有帮助的答案


树莓派修改启动界面

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 (停止相关的服务)

参考文档:

如何隐藏鼠标光标

https://ubuntuqa.com/article/2996.html

树莓派修改启动界面

https://www.cnblogs.com/Java-Script/p/11095826.html

修改树莓派的开机启动画面

https://shumeipai.nxez.com/2018/12/16/customize-the-boot-startup-screen-of-the-raspberry-pi.html

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表