特殊:Badtitle/NS100:BootText:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第25行: | 第25行: | ||
</nowiki></pre> | </nowiki></pre> | ||
== Colorize "[ ok ]" == | == Colorize "[ ok ]" == | ||
'''NOTE : does not work with 5.10 Breezy. Use solution given | '''NOTE : does not work with 5.10 Breezy. Use solution given [http://www.ubuntuforums.org/showpost.php?p=395004&postcount=37 there].''' (ed. 28/12/2005) | ||
'''EDIT : This does NOT work with the default Feisty install, it will break your boot and you will need a rescue CD to fix it, until further revised, do NOT use this on Feisty. | '''EDIT : This does NOT work with the default Feisty install, it will break your boot and you will need a rescue CD to fix it, until further revised, do NOT use this on Feisty. | ||
'''(omegabeta 01,aug,07. | '''(omegabeta 01,aug,07. | ||
第39行: | 第39行: | ||
<pre><nowiki> | <pre><nowiki> | ||
log_end_msg () { | log_end_msg () { | ||
# If no arguments were passed, return | # If no arguments were passed, return | ||
[ -z "$1" ] && return 1 | [ -z "$1" ] && return 1 | ||
# Only do the fancy stuff if we have an appropriate terminal | # Only do the fancy stuff if we have an appropriate terminal | ||
# and if /usr is already mounted | # and if /usr is already mounted | ||
第52行: | 第54行: | ||
COL=73 | COL=73 | ||
fi | fi | ||
UP=`$TPUT cuu1` | UP=`$TPUT cuu1` | ||
END=`$TPUT hpa $COL` | END=`$TPUT hpa $COL` | ||
第86行: | 第89行: | ||
== Finalize == | == Finalize == | ||
Reboot, and your resolution should be increased. Your [ ok ] messages should now be green. | Reboot, and your resolution should be increased. Your [ ok ] messages should now be green. | ||
Credits: | Credits: [http://www.ubuntuforums.org/showthread.php?t=50054&highlight=spice dudinatrix] | ||
---- | ---- | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 21:46的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/BootText }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/af | • {{#if: UbuntuHelp:BootText|Afrikaans| [[::BootText/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ar | • {{#if: UbuntuHelp:BootText|العربية| [[::BootText/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/az | • {{#if: UbuntuHelp:BootText|azərbaycanca| [[::BootText/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/bcc | • {{#if: UbuntuHelp:BootText|جهلسری بلوچی| [[::BootText/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/bg | • {{#if: UbuntuHelp:BootText|български| [[::BootText/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/br | • {{#if: UbuntuHelp:BootText|brezhoneg| [[::BootText/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ca | • {{#if: UbuntuHelp:BootText|català| [[::BootText/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/cs | • {{#if: UbuntuHelp:BootText|čeština| [[::BootText/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/de | • {{#if: UbuntuHelp:BootText|Deutsch| [[::BootText/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/el | • {{#if: UbuntuHelp:BootText|Ελληνικά| [[::BootText/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/es | • {{#if: UbuntuHelp:BootText|español| [[::BootText/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/fa | • {{#if: UbuntuHelp:BootText|فارسی| [[::BootText/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/fi | • {{#if: UbuntuHelp:BootText|suomi| [[::BootText/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/fr | • {{#if: UbuntuHelp:BootText|français| [[::BootText/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/gu | • {{#if: UbuntuHelp:BootText|ગુજરાતી| [[::BootText/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/he | • {{#if: UbuntuHelp:BootText|עברית| [[::BootText/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/hu | • {{#if: UbuntuHelp:BootText|magyar| [[::BootText/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/id | • {{#if: UbuntuHelp:BootText|Bahasa Indonesia| [[::BootText/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/it | • {{#if: UbuntuHelp:BootText|italiano| [[::BootText/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ja | • {{#if: UbuntuHelp:BootText|日本語| [[::BootText/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ko | • {{#if: UbuntuHelp:BootText|한국어| [[::BootText/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ksh | • {{#if: UbuntuHelp:BootText|Ripoarisch| [[::BootText/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/mr | • {{#if: UbuntuHelp:BootText|मराठी| [[::BootText/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ms | • {{#if: UbuntuHelp:BootText|Bahasa Melayu| [[::BootText/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/nl | • {{#if: UbuntuHelp:BootText|Nederlands| [[::BootText/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/no | • {{#if: UbuntuHelp:BootText|norsk| [[::BootText/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/oc | • {{#if: UbuntuHelp:BootText|occitan| [[::BootText/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/pl | • {{#if: UbuntuHelp:BootText|polski| [[::BootText/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/pt | • {{#if: UbuntuHelp:BootText|português| [[::BootText/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ro | • {{#if: UbuntuHelp:BootText|română| [[::BootText/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/ru | • {{#if: UbuntuHelp:BootText|русский| [[::BootText/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/si | • {{#if: UbuntuHelp:BootText|සිංහල| [[::BootText/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/sq | • {{#if: UbuntuHelp:BootText|shqip| [[::BootText/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/sr | • {{#if: UbuntuHelp:BootText|српски / srpski| [[::BootText/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/sv | • {{#if: UbuntuHelp:BootText|svenska| [[::BootText/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/th | • {{#if: UbuntuHelp:BootText|ไทย| [[::BootText/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/tr | • {{#if: UbuntuHelp:BootText|Türkçe| [[::BootText/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/vi | • {{#if: UbuntuHelp:BootText|Tiếng Việt| [[::BootText/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/yue | • {{#if: UbuntuHelp:BootText|粵語| [[::BootText/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/zh | • {{#if: UbuntuHelp:BootText|中文| [[::BootText/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/zh-hans | • {{#if: UbuntuHelp:BootText|中文(简体)| [[::BootText/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BootText | UbuntuHelp:BootText | {{#if: | :}}BootText}}/zh-hant | • {{#if: UbuntuHelp:BootText|中文(繁體)| [[::BootText/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:BootText|:BootText|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :BootText/zh | | {{#ifexist: BootText/zh | | {{#ifeq: {{#titleparts:BootText|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:BootText|1|-1|}} | zh | | }}
This will not give you a splash image or hide the boot text. It will only make it look better.
Increase resolution
Edit /boot/grub/menu.lst
gksudo gedit /boot/grub/menu.lst
Add vga=792
to your default boot option.
Example:
titleUbuntu, kernel 2.6.10-5-k7 Default root(hd0,0) kernel/vmlinuz root=/dev/hde6 ro quiet splash vga=792 initrd/initrd.img savedefault boot
Usual VESA video modes is (VGA codes):
# 640×480 800×600 1024×768 1280×1024 1600×1200 # 8 bits vga=769 vga=771 vga=773 vga=775 vga=796 #16 bits vga=785 vga=788 vga=791 vga=794 vga=798 #32 bits vga=786 vga=789 vga=792 vga=795 vga=799
Colorize "[ ok ]"
NOTE : does not work with 5.10 Breezy. Use solution given there. (ed. 28/12/2005) EDIT : This does NOT work with the default Feisty install, it will break your boot and you will need a rescue CD to fix it, until further revised, do NOT use this on Feisty. (omegabeta 01,aug,07. NOTE : This does not work in Dapper either, so I am not sure what version this how-to is written for. For Dapper see below. We make the "[ ok ]" during bootup green
- Edit /lib/lsb/init-functions
gksudo gedit /lib/lsb/init-functions
- Find the log_end_msg () function, all the way at the bottom of the file and add
GREEN=`$TPUT setaf 2`
belowRED=`$TPUT setaf 1`
- Change
echo "$UP$END[ ok ]"
toecho "$UP$END[ ${GREEN}ok${NORMAL} ]"
The function should look like this:
log_end_msg () { # If no arguments were passed, return [ -z "$1" ] && return 1 # Only do the fancy stuff if we have an appropriate terminal # and if /usr is already mounted TPUT=/usr/bin/tput EXPR=/usr/bin/expr if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then COLS=`$TPUT cols` if [ -n "$COLS" ]; then COL=`$EXPR $COLS - 7` else COL=73 fi UP=`$TPUT cuu1` END=`$TPUT hpa $COL` START=`$TPUT hpa 0` RED=`$TPUT setaf 1` GREEN=`$TPUT setaf 2` NORMAL=`$TPUT op` if [ $1 -eq 0 ]; then echo "$UP$END[ ${GREEN}ok${NORMAL} ]" else echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]" fi else if [ $1 -eq 0 ]; then echo " ...done." else echo " ...fail!" fi fi return $1 }
==Colorize Dapper [ ok ]== (Also works for Feisty) You need to edit /etc/lsb-base-logging.sh
$TPUT setaf 4 # blue printf '[ ' $TPUT setaf 2 # green printf ok $TPUT setaf 4 # blue echo ' ]' $TPUT op # normal
Finalize
Reboot, and your resolution should be increased. Your [ ok ] messages should now be green. Credits: dudinatrix