安裝BURG美化

BURG的編譯安裝

 

一、編譯安裝:

      安裝依賴組件:

      #apt-get install gcc gcc-multilib bison autoconf make ruby gettext

      #apt-get install bzr

 

獲取源碼:

      #bzr branch lp:burg

下載完成後,進入burg目錄:

      #chmod  u+x  autogen.sh

      #./autogen.sh

編譯和安裝

      #mkdir bin_pc            (新建一個用來存放編譯文件的目錄)

      #cd bin_pc

      #../configure --with-platform=pc --prefix=/usr/share/burg --disable-werror

      (--disable-werror選項用來忽略警告,如果這裏不加這個選項,則make的時候會把它當作錯誤看待,從而導致編譯失敗)

      #make

      #make install

      (安裝的目錄是/usr/share/burg, 在configure的選項裏指定,如不指定目錄則會默認安裝,指定目錄或是不指定都無妨,後面我會說一下哪些不同)

打開#vi /etc/default/grub文件,找到 #GRUB_TERMINAL=console, 把前面的#去掉,使得這句生效


我的是安裝在/usr/sbin/burg目錄:      

            # /usr/share/burg/sbin/burg-install /dev/sda

            (默認安裝的童鞋直接(root)#burg-install /dev/sda 或(普通用戶)$sudo burg-install /dev/sda )

            # /usr/share/burg/sbin/burg-mkconfig -o /boot/burg/burg.cfg

            (默認安裝的童鞋直接(root)#burg-mkconfig -o /boot/burg/burg.cfg 或(普通用戶)$sudo burg-mkconfig -o /boot/burg/burg.cfg )

 

二、和安裝目錄有關的一些整理以及burg和grub

      /boot/burg/

            存放主題,字體和burg.cfg等等配置文件

     
 從源碼手動編譯好時不存在的目錄:(${PATH}表示安裝目錄)

            ${PATH}/etc/default/,也即這個目錄下的burg這個文件一開始是不存在的,但是burg-mkconfig命令是依照這個文件偵測系統的,不存在的話會使用默認的設置,就是說所有的主題都不會生效,只是默認的黑白字體,所以你需要新建burg這個文件,複製粘貼下面的內容:

burg文件內容:

# If you change this file, run 'update-burg' afterwards to update

# /boot/burg/burg.cfg.

GRUB_DEFAULT=0

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

# If you want to enable the save default function, uncomment the following

# line, and set GRUB_DEFAULT to saved.

#GRUB_SAVEDEFAULT=true

# The resolution used on graphical terminal

# note that you can use only modes which your graphic card supports via VBE

# you can see them in real GRUB with the command `vbeinfo'

# In the boot menu, use hotkey 'r' to popup a resolution selection menu.

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

# GRUB_THEME's value can be 'saved' or a specific BURG theme name, you can also

# set it to the pathname of a GRUB2 theme file.

# In the boot menu, use hotkey 't' to popup a theme selection menu

GRUB_THEME=saved

# GRUB_FOLD's value can be 'saved', 'true' or 'false'.

# In the boot menu, use hotkey 'F7' to show the full list, 'f' to toggle

# between folding modes.

GRUB_FOLD=saved

# Add user with burg-adduser, then use GRUB_USERS to config authentication.

# The following example means user1 can boot Ubuntu, no password is needed to

# boot Windows, user1 amd user2 can boot other OS. Superusers can boot any OS

# and use hotkeys like `c' to enter console mode.

#GRUB_USERS="*=user1,user2:ubuntu=user1:windows="

# For a complete list of supported variables, refer to this wiki page:

# http://code.google.com/p/burg/wiki/ConfigurationVariables

GRUB_GFXMODE=1366x768

 
  /boot/burg/themes/,,剛編譯好的時候是不存在主題這個目錄和任何主題的,需要自己動手建立這個目錄並下載主題放進去

  /boot/burg/fonts/,剛剛編譯好的時候是不存在字體這個目錄和任何字體的,需要自己動手建立這個目錄並下載字體放進去

  grub的目錄和文件是和這個一模一樣的,只是名稱一個是grub,而另一個是burg而已

 

三、默認編譯安裝會有”GRUB Loading ... ...”去除啓動時的”GRUB Loading... ...”的字樣,找到下面相應的代碼文件修改


            "./boot/i386/pc/boot.S" line 382:

            OLD -> notification_string: .asciz "GRUB "

            NEW -> notification_string: .asciz ""


            "./boot/i386/pc/diskboot.S" line 323:

            OLD -> notification_string: .asciz "loading"

            NEW -> notification_string: .asciz ""

 

            "./boot/i386/pc/diskboot.S" line 325:

            OLD -> notification_step: .asciz "."

            NEW -> notification_step: .asciz ""

 

            "./boot/i386/pc/diskboot.S" line 326:

            OLD -> notification_done: .asciz "\r\n"

            NEW -> notification_done: .asciz ""

 

            "./boot/sprc64/ieee1275/boot.S" line 71:

            OLD->grub_name:            .asciz "GRUB "

            NEW->grub_name:            .asciz ""

 

            "./boot/sprc64/ieee1275/diskboot.S" line 37:

            OLD->notification_string:            .asciz "Loading kernel"

            NEW->notification_string:            .asciz ""

 

            "./boot/sprc64/ieee1275/diskboot.S" line 40:

            OLD->notification_step:            .asciz "."

            NEW->notification_step:            .asciz ""

 

            "./boot/sprc64/ieee1275/diskboot.S" line 43:

            OLD->notification_done:            .asciz "\r\n"

            NEW->notification_done:            .asciz ""

 

四、其他一些設置

      在安裝軟件包後進行下列步驟:

1. 首先,把 BURG 替代 GRUB 安裝爲你的開機引導程序,

# burg-install /dev/sda  

注意: 記住 '/dev/sda' 這部份爲根據你的硬盤而有變動。

 

2. 然後讓 burg 建立它的配置文件:

# burg-mkconfig -o /boot/burg/burg.cfg

 

3. 如果在前幾步沒遇到任何錯誤訊息的話,burg 應該己經安裝完畢並能夠使用了。可以用以下命令作預覽:

# /opt/burg-emu/bin/burg-emu

 

現在重啓後,便會看到BURG!佈景主題的選擇和分辨率的設定也不用在配置文件內作修改。當 BURG 啓動時載入後,你就能修改設定,而且它會記住你每次開機後所作的設定!

 

提示及技巧

快捷指令

 F1 / h - 說明

 F2 / t - 更換佈景主題

 F3 / r - 改變分辨率

 F5 / ctrl-x - 結束編輯

 F6 - 下一個視窗

 F7 - 展開己摺疊項目

 F8 - 切換純文字與圖形模式

 F9 - 關機

 F10 - 重啓

 f - 切換摺疊與展開模式

 c - 打開終端模式

 2 - 打開兩個終端模式

 e - 編輯目前的指令

 q - 離開圖形模式

 i - 展示佈景主題信息

 n - 同類別的下一個項目

 w - 下一個 Windows 系統

 u - 下一個 Ubuntu 系統

 ESC - 從視窗或選單內離開


想列出完整快捷鍵列表,請按F1.


目錄化 (羣組化)

想要使用 burg 的目錄化功能 (目錄化分類選單項目, 例. arch 跟 arch fallback 能收進同一分類), 當 burg 載入後按 F. 如果看起來沒效,你需要 burg.cfg 自行新增一個目錄。

打開你的 burg.cfg

### BEGIN /etc/burg.d/10_linux ###

menuentry "Arch, with Linux vmlinuz-linux" --class arch --class gnu-linux --class gnu --class os --group arch {

      savedefault

      insmod ext2

      ...

}

menuentry "Arch, with Linux vmlinuz-linux Fallback" --class arch --class gnu-linux --class gnu --class os --group arch {

      savedefault

      insmod ext2

      ...

}

menuentry "Arch, with Linux vmlinuz-linux Fallback (recovery mode)" --class arch --class gnu-linux --class gnu --class os --group arch {

      savedefault

      insmod ext2

      ...

}

### END /etc/burg.d/10_linux ###

 

請耐心地在每個項目的第一行加上 --group 參數。 擁有同樣 group 的項目會在你啓用目錄化時被收進同一目錄。

項目的圖示會按照項目的 class (類別)顯示. 例如. --class arch 會讓項目設定爲 arch linux 並顯示 arch 的 logo。


製作 BURG 背景主題


Burg 最主要的功能就是它的可主題化佈景。想新增一個主題可以複製它的目錄到 /boot/burg/themes/ 然後更新 config (
# burg-mkconfig -o /boot/burg/burg.cfg). 更換主題請在程序中按T,便會顯示可用的主題清單。用方向鍵來反白想要的主題然後按下 Enter 來確定選擇。無需修改 burg-emu 也不用重啓。

我的空間原文:http://user.qzone.qq.com/1475032202/blog/1419166142




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章