Mount ISO images in Konqueror / Dolphin
I didn’t want to bring up a console every time I had to mount an ISO image. So I browsed the web a lil’ bit and found a good solution for my needs. I am a big fan of context menus or service menus as they are called in KDE. These menus are configured through .desktop files. To create such a file only a few steps are necessary:
- Find out the location of .desktop files
- Learn about the syntax of a .desktop file
- Check the mime type of the file where the context menu should appear
- Some eye candy with Icons and submenus
In the end you will have entries under Actions when you right-click on and ISO image that look somewhat like this:

1. Where are these files?
You can use
kde-config --prefix
to find out where your KDE has been installed. You will then find a folder
/usr/share/apps/konqueror/servicemenus (in my case)
Here you create a file with any name you like it only must end with .desktop
Since there now also is a noob file manager Dolphin there also is a folder
/usr/share/apps/d3lphin/servicemenus
Anyway, I used a symbolic link to only have to configure one file for both apps.
2. File syntax
Mine looks like this:
[Desktop Entry] ServiceTypes=application/x-iso Actions=mountIsoImage;umountIsoImage X-KDE-Submenu=ISO Image [Desktop Action mountIsoImage] Name=Mount Icon=cdrom_mount Exec=kdesu -c 'mount -o loop -t iso9660 %f /mnt/iso' [Desktop Action umountIsoImage] Name=Unmount Icon=cdrom_unmount Exec=kdesu -c 'umount %f'
Here you’ll find a good explanation of the file options.
3. MIME type
As you can see you must declare a ServiceType in the .desktop file. This defines when the context menu should appear. A good way to search for these types is to go to Settings -> Configure Konqueror -> File Associations and use the search feature.
4. Eye candy
You may use you own icon images but if you want to use the system icons I suggest editing a K-Menu entry, clicking on the icon and then using the icon browser to find a name of an icon you like.
REMARK
This is tested with Kubuntu Gutsy Gibbon. But I guess it should also work with other distributions.
IMPROVEMENTS
Instead of using the mount command more or less directly one could use a script to create a temporary folder at the current location where the ISO is then mounted. Unmounting would delete the folder again.
