apt-get install plymouth
| 項目 | Ubuntu | CentOS |
|---|---|---|
| 預設主題設定檔 | /lib/plymouth/themes/default.plymouth | /etc/plymouth/plymouthd.conf |
| 主題資源目錄 | /lib/plymouth/themes/<theme_name>/ | /usr/share/plymouth/themes/<theme_name>/ |
vim /lib/plymouth/themes/default.plymouth
# 內容如下:
[Plymouth Theme]
Name=Wheat
Description=A theme that features a wheat background with a logo.
ModuleName=script
[script]
ImageDir=/lib/plymouth/themes/wheat
ScriptFile=/lib/plymouth/themes/wheat/wheat.script
/lib/plymouth/themes/wheat/vim /etc/default/grub
# 修改:
GRUB_CMDLINE_LINUX_DEFAULT="splash"
update-grub
update-initramfs -u
update-initramfs -u 已執行,initramfs 才會包含新主題模組nomodeset# 設定預設主題
plymouth-set-default-theme -R solar
# -R 同時重建 initramfs
# 或手動編輯
vim /etc/plymouth/plymouthd.conf
# Theme=solar
# 重建 initramfs
dracut -f
Plymouth 主題使用 JavaScript-like 腳本 (.script),可參考 /lib/plymouth/themes/script/module-info 了解 API。簡單主題可修改現有 details 或 text 主題的圖片與顏色參數。