特殊:Badtitle/NS100:ChangeTTYResolution
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/ChangeTTYResolution }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/af | • {{#if: UbuntuHelp:ChangeTTYResolution|Afrikaans| [[::ChangeTTYResolution/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ar | • {{#if: UbuntuHelp:ChangeTTYResolution|العربية| [[::ChangeTTYResolution/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/az | • {{#if: UbuntuHelp:ChangeTTYResolution|azərbaycanca| [[::ChangeTTYResolution/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/bcc | • {{#if: UbuntuHelp:ChangeTTYResolution|جهلسری بلوچی| [[::ChangeTTYResolution/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/bg | • {{#if: UbuntuHelp:ChangeTTYResolution|български| [[::ChangeTTYResolution/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/br | • {{#if: UbuntuHelp:ChangeTTYResolution|brezhoneg| [[::ChangeTTYResolution/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ca | • {{#if: UbuntuHelp:ChangeTTYResolution|català| [[::ChangeTTYResolution/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/cs | • {{#if: UbuntuHelp:ChangeTTYResolution|čeština| [[::ChangeTTYResolution/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/de | • {{#if: UbuntuHelp:ChangeTTYResolution|Deutsch| [[::ChangeTTYResolution/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/el | • {{#if: UbuntuHelp:ChangeTTYResolution|Ελληνικά| [[::ChangeTTYResolution/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/es | • {{#if: UbuntuHelp:ChangeTTYResolution|español| [[::ChangeTTYResolution/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/fa | • {{#if: UbuntuHelp:ChangeTTYResolution|فارسی| [[::ChangeTTYResolution/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/fi | • {{#if: UbuntuHelp:ChangeTTYResolution|suomi| [[::ChangeTTYResolution/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/fr | • {{#if: UbuntuHelp:ChangeTTYResolution|français| [[::ChangeTTYResolution/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/gu | • {{#if: UbuntuHelp:ChangeTTYResolution|ગુજરાતી| [[::ChangeTTYResolution/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/he | • {{#if: UbuntuHelp:ChangeTTYResolution|עברית| [[::ChangeTTYResolution/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/hu | • {{#if: UbuntuHelp:ChangeTTYResolution|magyar| [[::ChangeTTYResolution/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/id | • {{#if: UbuntuHelp:ChangeTTYResolution|Bahasa Indonesia| [[::ChangeTTYResolution/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/it | • {{#if: UbuntuHelp:ChangeTTYResolution|italiano| [[::ChangeTTYResolution/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ja | • {{#if: UbuntuHelp:ChangeTTYResolution|日本語| [[::ChangeTTYResolution/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ko | • {{#if: UbuntuHelp:ChangeTTYResolution|한국어| [[::ChangeTTYResolution/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ksh | • {{#if: UbuntuHelp:ChangeTTYResolution|Ripoarisch| [[::ChangeTTYResolution/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/mr | • {{#if: UbuntuHelp:ChangeTTYResolution|मराठी| [[::ChangeTTYResolution/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ms | • {{#if: UbuntuHelp:ChangeTTYResolution|Bahasa Melayu| [[::ChangeTTYResolution/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/nl | • {{#if: UbuntuHelp:ChangeTTYResolution|Nederlands| [[::ChangeTTYResolution/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/no | • {{#if: UbuntuHelp:ChangeTTYResolution|norsk| [[::ChangeTTYResolution/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/oc | • {{#if: UbuntuHelp:ChangeTTYResolution|occitan| [[::ChangeTTYResolution/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/pl | • {{#if: UbuntuHelp:ChangeTTYResolution|polski| [[::ChangeTTYResolution/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/pt | • {{#if: UbuntuHelp:ChangeTTYResolution|português| [[::ChangeTTYResolution/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ro | • {{#if: UbuntuHelp:ChangeTTYResolution|română| [[::ChangeTTYResolution/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/ru | • {{#if: UbuntuHelp:ChangeTTYResolution|русский| [[::ChangeTTYResolution/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/si | • {{#if: UbuntuHelp:ChangeTTYResolution|සිංහල| [[::ChangeTTYResolution/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/sq | • {{#if: UbuntuHelp:ChangeTTYResolution|shqip| [[::ChangeTTYResolution/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/sr | • {{#if: UbuntuHelp:ChangeTTYResolution|српски / srpski| [[::ChangeTTYResolution/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/sv | • {{#if: UbuntuHelp:ChangeTTYResolution|svenska| [[::ChangeTTYResolution/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/th | • {{#if: UbuntuHelp:ChangeTTYResolution|ไทย| [[::ChangeTTYResolution/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/tr | • {{#if: UbuntuHelp:ChangeTTYResolution|Türkçe| [[::ChangeTTYResolution/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/vi | • {{#if: UbuntuHelp:ChangeTTYResolution|Tiếng Việt| [[::ChangeTTYResolution/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/yue | • {{#if: UbuntuHelp:ChangeTTYResolution|粵語| [[::ChangeTTYResolution/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/zh | • {{#if: UbuntuHelp:ChangeTTYResolution|中文| [[::ChangeTTYResolution/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/zh-hans | • {{#if: UbuntuHelp:ChangeTTYResolution|中文(简体)| [[::ChangeTTYResolution/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ChangeTTYResolution | UbuntuHelp:ChangeTTYResolution | {{#if: | :}}ChangeTTYResolution}}/zh-hant | • {{#if: UbuntuHelp:ChangeTTYResolution|中文(繁體)| [[::ChangeTTYResolution/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:ChangeTTYResolution|:ChangeTTYResolution|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :ChangeTTYResolution/zh | | {{#ifexist: ChangeTTYResolution/zh | | {{#ifeq: {{#titleparts:ChangeTTYResolution|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ChangeTTYResolution|1|-1|}} | zh | | }}
This is a comprehensive HOWTO to change your TTY (Ctrl+Alt+F1) and bootscreen resolution.
Introduction
I am sure we have all noticed the low resolution used while Ubuntu is booting up, and also of the TTY (Ctrl+Alt+F1). This could be changed back in 5.10 before the install, but in 6.06 it always defaults to 640x480. For most of us, this isn't so bad, but for those of us using LCDs a resolution other than the LCD's native resolution creates kind of blurry graphics and text because the pixels don't line up with the LCDs. 640x480 is also a little crammed for the TTY, especially when viewing large pieces of data.
HOWTO
The resolution of the TTY is set as a parameter given to the kernel before it loads. GRUB is responsible for booting the kernel, so we need to tell GRUB to tell the kernel what resolution we want. GRUB's list of boot options is contained in the file /boot/grub/menu.lst
.
- Open up the Terminal by going to Applications -> Accessories -> Terminal
- Before you open up the file we should back it up. If you haven't tinkered with Gedit as root before Gedit will make a backup file
menu.lst~
before it saves, but if you want you can do it yourself to make sure. Just type in the terminal:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst~
Enter your password when prompted. This will backup the file as menu.lst~
.
- Now we open it up with:
gksudo gedit /boot/grub/menu.lst
- Look for the line (or first instance of the line):
kernel /boot/vmlinuz-2.6.15-25-686 root=/dev/sda2 ro quiet splash
where 686
is your CPU architecture such as 386
, AMD64
or PPC
, and /dev/sda2
is your hard drive partition such as /dev/hda1
.
- This is the command for your kernel, and we need to append a parameter to tell the kernel to boot into a certain resolution. This is done with the
vga=
flag, along with a special number for your desired screen resolution and color depth.
Refer to the following table to see what your resolution's number is:
640x480 | 800x600 | 1024x768 | 1152x864 | 1280x1024 | 1600x1200 | |
8bit | 769 | 771 | 773 | 353 | 775 | 777 |
15bit | 784 | 787 | 790 | 793 | 796 | |
16bit | 785 | 788 | 791 | 355 | 794 | 797 |
24bit | 786 | 789 | 792 | 795 | 798 |
You will most likely want the 24bit color depth (AKA "True Color") (choose this if you are not sure) along with a decent resolution such as 1024x768 or 1280x1024. I, for example, want 24bit with 1280x1024 so I choose 795
, and will append vga=795
to the line, giving me:
kernel /boot/vmlinuz-2.6.15-25-686 root=/dev/sda2 ro quiet splash vga=795
Go ahead and append vga=
to the kernel line in menu.lst
along with your screen resolution number form the table above, as in the example.
- Save the file. (If you can't save the file you haven't opened it as root, go back and execute
gksudo gedit /boot/grub/menu.lst
providing your password.) - Restart your computer.
- If your computer dies on boot, get into recovery mode and replace the
menu.lst
file with the backup one with:
sudo cp /boot/grub/menu.lst~ /boot/grub/menu.lst
Then make a post in the forums to investigate why it didn't work!
FOR 9.10 KARMIC KOALA AND LATER
Karmic Koala has switched to GRUB 2, and now the settings can be found in the file /etc/default/grub
- Open it with your text editor with root privilege. Find the line:
GRUB_CMDLINE_LINUX=""
- Edit the line by writing the preferred resolution-depth number from the table above in
""
asvga=xxx
replacing xxx with the number. Following the example above it should be like this:
GRUB_CMDLINE_LINUX="vga=795"
- Save the file and exit. (If you can't save the file you haven't opened it as root, go back and execute
gksudo gedit /etc/default/grub
providing your password.) - Execute the command
sudo update-grub
- Restart your computer.