回文章列表
作者billy3321.bbs@ptt.cc (雨蒼) 看板: linux
標題[心得] 讓OpenSUSE 11.0 每個虛擬主控台都有背景
時間批踢踢實業 (2008/08/12 Tue 17:47:42)
日前使用openSUSE 11.0,驚訝於他的tty1有背景。但其他tty就沒有相對應的背景,因此
上網找資料想達成這個目的。
以下即為我找到的方法

openSUSE的文字背景,是bootsplash這個程式提供的功能。
這個程式主要提供開機畫面(silent),以及tty背景畫面。

該程式主要設定檔在/etc/splashy/config.xml
主題放在/etc/bootsplash/themes/資料夾中
預設主題為openSUSE,在其中的config資料夾中,存有不同解析度的config檔案。
但這些config檔案載入以後會秀出silent的畫面,也就是會出現開機畫面。
因此我們要對他作修改,讓他只含有background的設定。


以bootsplash-1024x768.cfg為例
先將其複製成為console-1024x768.cfg,再將其中的設定作修改


# cp bootsplash-1024x768.cfg console-1024x768.cfg
# vi console-1024x768.cfg


將不要的設定刪除後成為以下的內容:


version=3
state=1
overpaintok=0


fgcolor=7
bgcolor=0

tx=20
ty=60
tw=994
th=708


jpeg=/etc/bootsplash/themes/openSUSE/images/bootsplash-1024x768.jpg


mnganim logov /etc/bootsplash/themes/openSUSE/images/logov.mng initframe
logov origin 0 2 2



接下來只要執行

# splash -u 1 /etc/bootsplash/themes/openSUSE/config/console-1024x768.cfg

就會在tty2加上背景囉
-u後面的0~5分別對應到tty1~6
如果要去除背景,執行

# splash -s-u 1

就會去除tty2的背景
最後,在開機的/etc/init.d/boot.local中添加以下命令:


#Use splash add backgroupd to tty 2~6
for ((s_num=1;s_num<=5;s_num++))
 do
        t_num=$((s_num+1))
        echo -e "Starting splash in tty $t_num"
        splash -u $s_num
/etc/bootsplash/themes/openSUSE/config/console-1024x768.cfg
 done

#If splash failed to add background to tty 2~6, reset tty 1~5. If splash
success to add backgroud, return success message.
if test $? -ne 0
then
        echo -e "Warnning!!!Splash failed to add background to virtual
terminals. Reset all console now."
        for ((s_num=0;s_num<=5;s_num++))
        do
         t_num=$((s_num+1))
         echo -e "Stoping splash in tty $t_num"
         splash -s -u $s_num
        done
else
        echo -e "Splash add background to vitrual terminals seccessful."


開機過程中即會將TTY2~6附加上背景圖案囉!

如果您的openSUSE11.0開機沒有splash特效,請編輯/etc/sysconfig/bootsplash檔案,
變更其中的值:

THEME="openSUSE"
SPLASH="yes"

之後執行SuSEConfig應該就可以了

# SuSEconfig


參考資料

http://www.linuxforums.org/forum/linux-newbie/45914-having-trouble-creating-custom-bootsplash-screen.html
http://unix-cd.com/vc/www/47/2007-10/8737.html

--
一直以為幸福在遠方,在可以追逐的未來
我的雙眼保持著眺望,我的雙耳仔細聆聽,唯恐疏忽錯過
後來才發現,那些握過的手,唱過的歌,流過的淚,愛過的人
所謂的曾經,就是幸福。

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.122.131.44
※ 編輯: billy3321       來自: 122.122.131.44       (08/12 17:47)
※ 編輯: billy3321       來自: 122.122.131.44       (08/12 17:47)
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻