“UbuntuHelp:ChangeTTYResolution”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第5行: | 第5行: | ||
I am sure we have all noticed the low resolution used while Ubuntu is booting up, and also of the TTY (Ctrol+Alt+F1). This could be changed back in 5.10 before the instal, 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. | I am sure we have all noticed the low resolution used while Ubuntu is booting up, and also of the TTY (Ctrol+Alt+F1). This could be changed back in 5.10 before the instal, 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 == | == HOWTO == | ||
− | The resolution of the TTY is set as a paramater 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 < | + | The resolution of the TTY is set as a paramater 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 <code><nowiki>/boot/grub/menu.lst</nowiki></code>. |
* Open up the Terminal by going to Applications -> Accessories -> Terminal | * 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 < | + | * 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 <code><nowiki>menu.lst~</nowiki></code> before it saves, but if you want you can do it yourself to make sure. Just type in the terminal: |
<pre><nowiki> | <pre><nowiki> | ||
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst~ </nowiki></pre> | sudo cp /boot/grub/menu.lst /boot/grub/menu.lst~ </nowiki></pre> | ||
− | Enter your password when prompted. This will backup the file as < | + | Enter your password when prompted. This will backup the file as <code><nowiki>menu.lst~</nowiki></code>. |
* Now we open it up with: | * Now we open it up with: | ||
<pre><nowiki> | <pre><nowiki> | ||
第17行: | 第17行: | ||
<pre><nowiki> | <pre><nowiki> | ||
kernel /boot/vmlinuz-2.6.15-25-686 root=/dev/sda2 ro quiet splash </nowiki></pre> | kernel /boot/vmlinuz-2.6.15-25-686 root=/dev/sda2 ro quiet splash </nowiki></pre> | ||
− | where < | + | where <code><nowiki>686</nowiki></code> is your CPU archietecture such as <code><nowiki>386</nowiki></code>, <code><nowiki>AMD64</nowiki></code> or <code><nowiki>PPC</nowiki></code>, and <code><nowiki>/dev/sda2</nowiki></code> is your hard drive partition such as <code><nowiki>/dev/hda1</nowiki></code>. |
− | * This is the command for your kernel, and we need to ammend a paramater to tell the kernel to boot into a certain resolution. This is done with the < | + | * This is the command for your kernel, and we need to ammend a paramater to tell the kernel to boot into a certain resolution. This is done with the <code><nowiki>vga=</nowiki></code> 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: | Refer to the following table to see what your resolution's number is: | ||
{|border="1" cellspacing="0" | {|border="1" cellspacing="0" | ||
第29行: | 第29行: | ||
|16bit||785||788||791||794||797 | |16bit||785||788||791||794||797 | ||
|- | |- | ||
− | |24bit||786||789|| | + | |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 desent resolution such as 1024x768 or 1280x1024. I, for example, want 24bit with 1280x1024 so I choose <code><nowiki>795</nowiki></code>, and will ammend < | + | You will most likely want the 24bit color depth (AKA "True Color") (choose this if you are not sure) along with a desent resolution such as 1024x768 or 1280x1024. I, for example, want 24bit with 1280x1024 so I choose <code><nowiki>795</nowiki></code>, and will ammend <code><nowiki>vga=795</nowiki></code> to the line, giving me: |
<pre><nowiki> | <pre><nowiki> | ||
kernel /boot/vmlinuz-2.6.15-25-686 root=/dev/sda2 ro quiet splash vga=795 </nowiki></pre> | kernel /boot/vmlinuz-2.6.15-25-686 root=/dev/sda2 ro quiet splash vga=795 </nowiki></pre> | ||
− | Go ahead and ammend < | + | Go ahead and ammend <code><nowiki>vga=</nowiki></code> to the kernel line in <code><nowiki>menu.lst</nowiki></code> along with your screen resolution number form the table above, like in the example. |
− | * Save the file. (If you can't save the file you haven't opened it as root, go back and execute < | + | * Save the file. (If you can't save the file you haven't opened it as root, go back and execute <code><nowiki>gksudo gedit /boot/grub/menu.lst</nowiki></code> providing your password.) |
* Restart your computer. | * Restart your computer. | ||
− | * If your computer dies on boot, get into recovery mode and replace the < | + | * If your computer dies on boot, get into recovery mode and replace the <code><nowiki>menu.lst</nowiki></code> file with the backup one with: |
<pre><nowiki> | <pre><nowiki> | ||
sudo cp /boot/grub/menu.lst~ /boot/grub/menu.lst </nowiki></pre> | sudo cp /boot/grub/menu.lst~ /boot/grub/menu.lst </nowiki></pre> |
2007年12月6日 (四) 10:25的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This is a comprehensive HOWTO to change your TTY (Ctrol+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 (Ctrol+Alt+F1). This could be changed back in 5.10 before the instal, 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 paramater 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 archietecture 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 ammend a paramater 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 | 1280x1024 | 1600x1200 | |
8bit | 769 | 771 | 773 | 775 | 777 |
15bit | 784 | 787 | 790 | 793 | 796 |
16bit | 785 | 788 | 791 | 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 desent resolution such as 1024x768 or 1280x1024. I, for example, want 24bit with 1280x1024 so I choose 795
, and will ammend 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 ammend vga=
to the kernel line in menu.lst
along with your screen resolution number form the table above, like 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!