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:
- List item
- Open terminal (Applications -> Accessories -> Terminal)
- Type "sudo gedit /etc/default/grub" and hit return
- Change "GRUB_DEFAULT=0" (or whatever the value is) to "GRUB_DEFAULT=saved" (you might also want to lower the GRUB_TIMEOUT value)
- Save & Close gedit
- 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)
#!/bin/bash grub-reboot "Windows 7 (loader) (on /dev/sda1)" reboot
- Save & close gedit
- Type "chmod +x ~/win-reboot.sh" to allow execution of this file
- Type "sudo update-grub" to apply changes to grub configuration
- 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.
- Right click on a gnome panel and select "Add to panel"
- Select "Custom Application Launcher" and click "Add"
- 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"):
- 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