Plymouth 修改開機(jī)動(dòng)畫
Plymouth 修改開機(jī)動(dòng)畫
Plymouth 修改開機(jī)動(dòng)畫
相關(guān)資料
相關(guān)命令介紹
所需安裝包/依賴包
修改開機(jī)動(dòng)畫
設(shè)置自己的開機(jī)動(dòng)畫
錯(cuò)誤提示
Plymouth 修改開機(jī)動(dòng)畫
最近接到一個(gè)任務(wù),更換開機(jī)動(dòng)畫,研究了將近兩天查找資料,測試修改總算完成。網(wǎng)上對應(yīng)的資料的比較少,整理總結(jié)出一份相應(yīng)文檔。
相關(guān)資料
實(shí)驗(yàn)環(huán)境:Fedora29
Plymouth 為 Fedora自帶的開/關(guān)機(jī)動(dòng)畫引導(dǎo)工具
下列所作修改均為 Fedora29 系統(tǒng) 所有的相關(guān)操作,均為默認(rèn)引導(dǎo)。
相關(guān)命令介紹
下面為plymouth的相關(guān)命令介紹
usage: plymouth-set-default-theme { --list | --reset |
1
2
3
4
5
6
7
plymouth-set-default-theme //顯示當(dāng)前開機(jī)動(dòng)畫主題名稱 plymouth-set-default-theme theme-name //設(shè)置 theme-name 為開機(jī)動(dòng)畫主題 plymouth-set-default-theme -l //顯示當(dāng)前系統(tǒng)所有的主題列表 plymouth-set-default-theme -R theme-name //將 theme-name 主題引導(dǎo)程序編譯到內(nèi)核,重新生成內(nèi)核
1
2
3
4
所需安裝包/依賴包
系統(tǒng)默認(rèn)的開機(jī)動(dòng)畫主題:charge
[root@bogon ~]# plymouth-set-default-theme charge
1
2
主題對應(yīng)安裝包: plymouth-theme-charge-0.9.4-3.fc29.x86_64.rpm
主題所依賴安裝包:
plymouth-plugin-two-step-0.9.4-3.fc29.x86_64.rpm plymouth-graphics-libs-0.9.4-3.fc29.x86_64.rpm plymouth-plugin-label-0.9.4-3.fc29.x86_64.rpm
1
2
3
在線安裝:yum install plymouth-theme-charge-0.9.4-3.fc29.x86_64.rpm
本地安裝:yum install --downloadonly --downloaddir=PATH plymouth-theme-charge-0.9.4-3.fc29.x86_64.rpm
ps:此命令,只會(huì)下載本地未安裝的依賴包到本地,并不是下載所有依賴安裝包到本地.
安裝命令:rpm -ivh $PWD/* --nodeps --force
修改開機(jī)動(dòng)畫
yum倉庫自帶的主題
已安裝的軟件包 plymouth-theme-charge.x86_64 0.9.4-3.fc29 @@System 可安裝的軟件包 plymouth-theme-breeze.x86_64 5.14.5-1.fc29 updates plymouth-theme-fade-in.x86_64 0.9.4-3.fc29 updates plymouth-theme-hot-dog.noarch 0.5-13.fc29 fedora plymouth-theme-script.x86_64 0.9.4-3.fc29 updates plymouth-theme-solar.x86_64 0.9.4-3.fc29 updates plymouth-theme-spinfinity.x86_64 0.9.4-3.fc29 updates plymouth-theme-spinner.x86_64 0.9.4-3.fc29 updates
1
2
3
4
5
6
7
8
9
10
相關(guān)查看命令:
yum list plymouth-theme* #plymouth-theme* 列出Yum庫所有 Plympouth 支持的主題 yum list plymouth* #plymouth* 列出plymouth 所有對應(yīng)的包 yum list plymouth-plugin* #plymouth-plugin* 列出 plymouth 所有對應(yīng)的插件包,即對應(yīng)的.so
1
2
3
所有對應(yīng)插件包:
#已安裝的軟件包 plymouth-plugin-label.x86_64 0.9.4-3.fc29 @@System plymouth-plugin-two-step.x86_64 0.9.4-3.fc29 @@System #可安裝的軟件包 plymouth-plugin-fade-throbber.x86_64 0.9.4-3.fc29 updates plymouth-plugin-script.x86_64 0.9.4-3.fc29 updates plymouth-plugin-space-flares.x86_64 0.9.4-3.fc29 updates plymouth-plugin-throbgress.x86_64 0.9.4-3.fc29 updates
1
2
3
4
5
6
7
8
安裝步驟:
安裝自帶的主題:
plymouth-set-default-theme theme-name #設(shè)置開機(jī)主題 plymouth-set-default-theme -R theme-name #重新編譯鏡像,加載開機(jī)主題引導(dǎo)程序
1
2
下載新的主題
yum install plymouth-theme-name #安裝所需主題 plymouth-set-default-theme theme-name #設(shè)置開機(jī)主題 plymouth-set-default-theme -R theme-name #重新編譯鏡像,加載開機(jī)主題引導(dǎo)程序
1
2
3
以 plymouth-theme-breeze.x86_64為例
一般結(jié)構(gòu)如下:主題包名,依賴插件包名
從這可以得到:正常一個(gè)主題所依賴的安裝結(jié)構(gòu),主題包,主題所對應(yīng)的插件包
yum install plymouth-theme-breeze.x86_64 依賴關(guān)系解決。 ======================================================================================================================================== Package Architecture Version Repository Size ======================================================================================================================================== 安裝: plymouth-theme-breeze x86_64 5.14.5-1.fc29 updates 120 k 安裝依賴關(guān)系: plymouth-plugin-script x86_64 0.9.4-3.fc29 updates 38 k 事務(wù)概要 ======================================================================================================================================== 安裝 2 軟件包
1
2
3
4
5
6
7
8
9
10
11
12
設(shè)置自己的開機(jī)動(dòng)畫
如果不會(huì)自制引導(dǎo)插件庫,目前題主也不會(huì),沒有仔細(xì)研究這一塊。目前題主的方法。
#選定自己所需要修改的開機(jī)主題,修改對應(yīng)的開機(jī)主題圖片,記住同名。
1
系統(tǒng)默認(rèn)主題:charge
主題庫對應(yīng)目錄: /usr/share/plymouth/themes/charge
主題引導(dǎo)腳本:charge.plymouth
腳本結(jié)構(gòu):
Name=Charge #主題名稱
Description=A theme that features the shadowy hull of a Fedora logo charge up and and finally burst into into full form. #主題描述
ModuleName=two-step #主題所對應(yīng)的依賴包
[two-step]
ImageDir=/usr/share/plymouth/themes/charge #圖片目錄
HorizontalAlignment=.5 #橫向坐標(biāo)設(shè)置
VerticalAlignment=.5 #縱向坐標(biāo)設(shè)置
Transition=none #過場時(shí)間是否有
TransitionDuration=0.0 #過場時(shí)間
BackgroundStartColor=0x202020 #開始顏色
BackgroundEndColor=0x202020 #結(jié)束顏色
1.選定所需要的主題,在 /usr/share/plymouth/themes 復(fù)制所需要的主題。#默認(rèn)主題對應(yīng)引導(dǎo)插件已經(jīng)擁有 [root@bogon themes]# pwd /usr/share/plymouth/themes [root@bogon themes]# ls breeze breeze-text charge charge-1 details star.png text tribar [root@bogon themes]# cp -r text/ test/ [root@bogon themes]# ls breeze breeze-text charge charge-1 details star.png test text tribar 2.修改腳本名稱: [root@bogon test]# plymouth-set-default-theme -l breeze breeze-text charge-1 charge details text text tribar [root@bogon themes]# cd test/ [root@bogon test]# ls text.plymouth [root@bogon test]# mv text.plymouth test.plymouth [root@bogon test]# ls test.plymouth [root@bogon test]# mv text.plymouth test.plymouth [root@bogon test]# plymouth-set-default-theme -l breeze breeze-text charge-1 charge details test text tribar 3.修改腳本對應(yīng)屬性#一般不用修改 4.設(shè)置開機(jī)主題 plymouth-set-default-theme theme-name #設(shè)置開機(jī)主題 5.編譯鏡像 plymouth-set-default-theme -R theme-name #重新編譯鏡像,加載開機(jī)主題引導(dǎo)程序 6.修改對應(yīng)圖片 #主要的是圖片名稱命名格式,以及圖片格式需要相同。 查看主題對應(yīng)圖片名稱#以charge為例 主題對應(yīng)插件目錄: # /usr/lib64/plymouth [root@bogon plymouth]# ls breeze-text.so details.so label.so renderers script.so text.so tribar.so two-step.so [root@bogon plymouth]# pwd /usr/lib64/plymouth [root@bogon plymouth]# vim two-step.so /.png ^@progress-^@SuppressMessages^@UseProgressBar^@UseFirmwareBackground^@SubTitle^@ImageDir^@two- step^@%s/lock.png^@%s/box.png^@%s/corner-image.png^@%s/header-image.png^@%s/background- tile.png^@%s/watermark.png^@TitleFont^@WatermarkHorizontalAlignment^@WatermarkVerticalAlign ment^@DialogHorizontalAlignment^@DialogVerticalAlignment^@TitleHorizontalAlignment^@TitleVe rticalAlignment^@Transition^@fade-over^@cross-fade^@merge- fade^@TransitionDuration^@BackgroundStartColor^@BackgroundEndColor^@ProgressBarBackgroundCo lor^@ProgressBarForegroundColor^@boot- up^@shutdown^@updates^@/sys/firmware/acpi/bgrt/image^@MessageBelowAnimation^@ProgressFuncti on^@wwoods^@linear^@%-75.75s: stopping throbber 查找出對應(yīng)的圖片名稱: ImageDir^@two-step lock.png box.png corner-image.png header-image.png background-tile.png watermark.png 根據(jù)圖片目錄對比,看出 background-tile.png 為背景圖片 progress- throbber- 這兩組圖片為過場動(dòng)畫圖片
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
將你準(zhǔn)備好的對應(yīng)過場動(dòng)畫圖片以及背景圖片替換之后,重啟,即可看到屬于自己的開機(jī)動(dòng)畫。
錯(cuò)誤提示
注意:需要先檢測ModuleName對應(yīng)的共享庫是否存在,如果不存在則不會(huì)加載對應(yīng)的開機(jī)動(dòng)畫,開機(jī)動(dòng)畫為 省略號。
如果修改主題,不在對應(yīng)的so,在執(zhí)行"plymouth-set-default-theme -R theme-name" 會(huì)提示 /usr/lib64/plymouth/modulename.so not exit 不存在。
下載方法: modulename.so 為 plymouth-plugin包內(nèi)部的共享庫 yum list plymouth-plugin* 列出所存在的安裝包,找到對應(yīng)安裝包 yum -y install packegname 安裝對應(yīng)安裝包 例如: two-step.so 對應(yīng)的為 plymouth-plugin-two-step.x86_64 yum -y install plymouth-plugin-two-step.x86_64
1
2
3
4
5
6
下面為charge 所有需要安裝包以及依賴包
Package Architecture Version Repository Size ===================================================================================================================================== 安裝: plymouth-theme-charge x86_64 0.9.4-3.fc29 updates 14 k 安裝依賴關(guān)系: plymouth-graphics-libs x86_64 0.9.4-3.fc29 updates 47 k plymouth-plugin-label x86_64 0.9.4-3.fc29 updates 15 k plymouth-plugin-two-step x86_64 0.9.4-3.fc29 updates 28 k
1
2
3
4
5
6
7
8
鏡像服務(wù)
版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。