If you're dual booting Ubuntu and Windows, a simple shortcut "reboot to windows" might come in handy, so you don't have to stare at the screen waiting for the boot loader to show up.

This shortcut sets Windows as default grub option only for one reboot, so next time you start up the pc or reboot it from windows the default is back to Ubuntu.

Step By Step:

  1. List item
  2. Open terminal (Applications -> Accessories -> Terminal)
  3. Type "sudo gedit /etc/default/grub" and hit return
  4. Change "GRUB_DEFAULT=0" (or whatever the value is) to "GRUB_DEFAULT=saved" (you might also want to lower the GRUB_TIMEOUT value)
  5. Save & Close gedit
  6. Type "gedit ~/win-reboot.sh" and paste the following code into gedit (change "Windows 7 (loader) (on /dev/sda1)"  to the name or number of your Windows option in grub, you can check that by serching for windows keyword in /boot/grub/grub.cfg)
    grub-reboot "Windows 7 (loader) (on /dev/sda1)"
  7. Save & close gedit
  8. Type "chmod +x ~/win-reboot.sh" to allow execution of this file
  9. Type "sudo update-grub" to apply changes to grub configuration
  10. Type exit or hit Ctrl+D to close the terminal

If you are using Gnome (default Ubuntu desktop) you can proceed to create the shortcut, but ~/win-reboot.sh should work already.

  1. Right click on a gnome panel and select "Add to panel"
  2. Select "Custom Application Launcher" and click "Add"
  3. Fill out the form like this (replace "/home/ziga/" with your home directory, you can find that out by opening terminal and typing "cd;pwd"):

    Launcher properties

  4. Click the shortcut, type your password and let it work

Please comment if you encounter any problems or have any additional questions.

EDIT (Thanks to Arttu): added update-grub step and changed the script to use grub-reboot