Use sudo instead (I think the original file is in /boot/grub/menu.lst and the other one is a link to it, or something);
Code:
sudo gedit /boot/grub/menu.lst
it asks for your password (doesn't print it on screen while you type it) and after you give it launches GEdit text editor with the file in it.
sudo means you want to run some command with root privileges (editing this file requires it), but it only works if it's configured to: on Ubuntu it's automatically configured to work for the user created during the setup (for the rest one needs to configure it manually). On Ubuntu, root account is by default locked (But can be unlocked using sudo).
I would recommend another way to do the job: setting the
default value to a number is ok, but if you later add kernels (upgrade the system, for example) the list is rewritten and the default value might not point to the correct section anymore. Using
savedefault to save Windows entry as default, and then using
default saved makes it a bit nicer to the user: on the example below note the red parts..
Code:
default saved
title Ubuntu, kernel 2.6.17-11-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sdb1 ro quiet splash
initrd /boot/initrd.img-2.6.17-11-generic
quiet
boot
title Windows XP
...<rest of the config lines for this XP section>
savedefault
Note here a couple of things:
- the Windows XP section
does not have to be the topmost section in the config file, you may leave it to the end of the file, if it is there already (where it usually is)
- other boot sections (Ubuntu, ...) do
not have the word
savedefault in their sections
- Windows XP section in the config file
does have the word
savedefault in it (this is the "trick")
- Like above (written in red), the
default value is set to
saved which means that the entry that has
savedefault option set, and was last booted (if there are multiple such entries, last booted is the one we're talking about), is booted. If you only have one section (Windows XP in your config) that has
savedefault set, then after you boot it one time, GRUB always remembers to boot it no matter what other entries are later added to the list, or what other entries you've booted yourself, as long as they don't have
savedefault set (or if they do, they are remembered after booting so in that case the last
savedefault-set-entry that was booted is booted next time too).
There are reasons why I prefer this:
1) You don't have to move Windows section to the top of the list, and wonder where exactly it has to be (if it's too high, the file doesn't work all right -- some settings must be on top)
2) You can add more entries to the list and don't have to bother checking that either Windows section is still the topmost or that the default number points to the correct section