关于Plymouth的问题--
有没有其他可用的启动画面?
如何最简单地更改启动画面?
有没有其他可用的启动画面?
如何最简单地更改启动画面?
sudo update-alternatives --config default.plymouth
sudo update-initramfs -u
编辑Plymouth
您可以使用简单的文本编辑器来编辑Plymouth中的动画和图片。这适用于任何版本的Ubuntu。
my-theme
更改为您自己的个人主题名称。sudo cp --recursive /lib/plymouth/themes/ubuntu-logo ~/themes/my-theme
现在您可以更改一些名称,以帮助区分我们的主题与其他主题。
sudo mv ubuntu-logo.plymouth my-theme.plymouth
sudo mv ubuntu-logo.script my-theme.script
sudo mv ubuntu-logo.grub my-theme.grub
sudo mv ubuntu_logo16.png my_theme16.png
sudo mv ubuntu_logo.png my_theme.png
使用您喜欢的图像编辑软件来修改png图像。我个人喜欢GIMP进行快速编辑。
gimp my_theme.png my_theme16.png
gimp progress_dot_on.png progress_dot_off.png
gimp progress_dot_on16.png progress_dot_off16.png
编辑配置文件。
![]()
![]()
![]()
![]()
![]()
设置主题信息文件。
gedit my-theme.plymouth
编辑第2、7和8行,将Ubuntu标志更改为您的主题名称。
[Plymouth Theme]
Name=我的主题
Description=一个带有标志的空白背景主题。
ModuleName=script
[script]
ImageDir=/lib/plymouth/themes/my-theme
ScriptFile=/lib/plymouth/themes/my-theme/my-theme.script
启动终端颜色。(可选)
gedit my-theme.grub
将其从紫色更改为其他颜色。
使用RGB颜色代码编辑第1行。
一个好的网站可以帮助您是Color-Hex。我只是将我的设为黑色。
if background_color 0,0,0; then
clear
fi
应用主题更改的脚本文件
gedit my-theme.script
这个文件有很多不同的方面可以更改,以定制您的Plymouth启动主题。如果您希望进行更高级的更改,您应该学习它。我只展示如何更改背景颜色、标志和状态指示器。
编辑第169、170、174和180行,以更改之前编辑的背景渐变和图像。
Window.SetBackgroundTopColor (0.66, 0.66, 0.66); #顶部
Window.SetBackgroundBottomColor (0.146, 0.146, 0.146); #底部
bits_per_pixel = Window.GetBitsPerPixel ();
if (bits_per_pixel == 4) {
logo_filename = "my_theme16.png";
progress_dot_off_filename = "progress_dot_off16.png";
progress_dot_on_filename = "progress_dot_on16.png";
password_field_filename = "password_field16.png";
question_field_filename = "password_field16.png";
} else {
logo_filename = "my_theme.png";
progress_dot_off_filename = "progress_dot_off.png";
progress_dot_on_filename = "progress_dot_on.png";
password_field_filename = "password_field.png";
question_field_filename = "password_field.png";
}
cp --recursive ~/themes/my-theme /lib/plymouth/themes
sudo ln -sf /lib/plymouth/themes/my-theme/my-theme.plymouth /etc/alternatives/default.plymouth
sudo ln -sf /lib/plymouth/themes/my-theme/my-theme.grub /etc/alternatives/default.plymouth.grub
sudo update-initramfs -u
/lib/plymouth/themes
替换为/usr/share/plymouth/themes
。 - Enterprisesudo update-initramfs -u
可以确保第一次运行时它能正常工作。不过有一件事我不太清楚:在plymouth主题生效之前,我的安装似乎会有几秒钟的默认紫色背景,我错过了什么吗? - JamesBBaptitude
获取可用主题的列表。$ aptitude search plymouth-theme
p lubuntu-plymouth-theme - plymouth theme for Lubuntu
p plymouth-theme-fade-in - graphical boot animation and logger - fade-in theme
p plymouth-theme-glow - graphical boot animation and logger - glow theme
i plymouth-theme-kubuntu-logo - graphical boot animation and logger - kubuntu-logo theme
p plymouth-theme-sabily - plymouth theme for Sabily
p plymouth-theme-script - graphical boot animation and logger - script theme
p plymouth-theme-solar - graphical boot animation and logger - solar theme
p plymouth-theme-spinfinity - graphical boot animation and logger - spinfinity theme
p plymouth-theme-text - graphical boot animation and logger - text theme
c plymouth-theme-ubuntu-logo - graphical boot animation and logger - ubuntu-logo theme
i plymouth-theme-ubuntu-text - graphical boot animation and logger - ubuntu-logo theme
p plymouth-theme-ubuntustudio - Ubuntu Studio Plymouth theme
p xubuntu-plymouth-theme - Plymouth theme for Xubuntu
$ sudo apt install plymouth-theme-solar
如果您在存储库中找不到所需的内容,UbuntuGeek网站有一篇出色的教程,教您如何安装和创建自己的定制Plymouth主题。
apt
也可以正常使用。 - Cees Timmermansudo apt install plymouth-theme-ubuntu-logo
命令,但启动画面仍然显示“Kubuntu”标志。 - Andreassudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/mytheme/mytheme.plymouth 80
要激活新主题,请执行以下操作:
sudo update-alternatives --config default.plymouth
最后执行以下命令:
sudo update-initramfs -u
default.plymouth
文件是一个链接文件。每次我用终端设置启动画面时,该文件都会更新。通过试错,我找到了这种方法。gksu [文件管理器名称]
这将打开一个新窗口,具有根(超级用户)权限来编辑、删除和添加文件。导航到/usr/share/plymouth/themes/
。这是您的主题所在的位置。如果您的主题文件夹不在plymouth主题文件夹中,请移动它。在您的主题文件夹中,找到一个.plymouth
文件,并在默认文本编辑器中打开它。查看目录,确保它们准确且最新。保存并退出文本编辑器。创建一个链接文件,将您的.plymouth
文件拖到主题文件夹(/usr/share/plymouth/themes/),并将其重命名为default.plymouth
。您需要删除主题文件夹中的现有文件(如果有)。之后,您应该能够关闭窗口和终端,然后重新启动以测试配置。