Caltech logo These are random hints and little howtos about nagging little problems that I eventually figured out how to fix. Most of these could probably be solved with a little googling, but hopefully these will make things easier on someone out there. If you see any problems with my hints feel free to send me an email.

Main Page
Research

My Other Stuff:
Photos
Linux stuff
Links
Ernie's

Using Firefox as your browser in KDE
I use Firefox as my default web browser, but I like to use Kmail (and the other kde-pim stuff). If you don't change anything, Kmail and other KDE apps will end up opening links in konqueror. I think Konqueror is a good browser, but I prefer Firefox. So in order to make all of the KDE apps use Firefox as well, you can do the following:
  1. First of all you need to get this script: firefox-helper.sh. Basically, this script checks to see if there is a firefox already running. If there is one running, it opens the link in a new tab. If firefox isn't running, it starts it and opens the link. NOTE: You may need to edit the script and change the line that points to where the firefox executable lives.
  2. I put it in my ~/bin directory, and you need to make sure that it is executable ('chmod +x ~/bin/firefox-helper.sh'). You can really stick it wherever you want, but ~/bin is the normal place to put stuff like this.
  3. Then you need to open up the KDE control center, and navigate to KDE Components → Component Chooser → Web Browser.
  4. You need to change the setting for the default web browser to "in the following browser". And in the text box, you put in the complete path to the firefox-helper.sh script that you just downloaded. In my case, I put "/home/klk/bin/firefox-helper.sh" in that box (without the quotes).
Have Firefox open mailto: links with Kmail
Similar to the first one, if you have kmail open links with Firefox, you probably want Firefox to open "mailto:" links with Kmail. This one is pretty easy, you just need to run "gnome-default-applications-properties" from a terminal, and change the mail reader to Kmail. In Fedora Core, this program lives in the "control-center" package.

Reboot to windows using grub
So you use grub as your bootloader. Your "default" boot option is probably some Linux kernel. For some reason or another you'd like to reboot into windows, but you always forget that you need to stick around so you can select Windows from the grub menu. You get really annoyed like I do when you forget this and have to reboot again. I wrote this simple script to tell grub to set the default to the Windows option on the next boot.

  1. Get this little script:grubbootwindows.sh. All this script does is tell grub that it should use Windows as the default the next time (and only the next time) you reboot. You may need to edit the script to modify the path to the grub executable, or change where grub's menu.lst (aka grub.conf) lives.
  2. I put this script in /boot, and set up the "sudo" command so that any user can run it with root permissions (which you need to modify the grub stuff and run reboot). To do this I added the following line in /etc/sudoers:
    klk ALL = NOPASSWD: /boot/bootwindows.sh
    This lets the user klk run the script /boot/bootwindows with root permissions, and without requiring a password. You also need to make sure that it is executable ("chmod +x grubbootwindows.sh").
  3. That's all you really have to do - if you want to reboot into windows, just run "sudo /boot/grubbootwindows.sh" (or change the path to point to wherever you stuck the file). I added a button in my KDE panel to run this for me - Right click on the panel and select "Add to panel → Special Button → Non-KDE Application". For the executable you put the same command you run from the command line ("sudo /boot/bootwindows.sh" in my case). I checked the "Run in a terminal window" button, and I gave the button the title "Reboot to Windows". I also picked an icon with a little window on it.
  4. You're done! When you click on your button, the computer should automatically reboot into windows just once, and then the next time you reboot it will boot back into your usual default.

Valid XHTML 1.0! Kristo Kriechbaum <klk -at- robotics dot caltech dot edu>