Geekdom Adrastos on 01 Feb 2008 09:17 am
I’m good at this.
I wrote a script tonight to quickly and intelligently mount ISO images, so that I can treat them as cd’s without having burned them to physical discs.
Something like that already exists, in the form of Nautilus scripts. Some creative Googling found the ones from here, which is actually fairly basic. So I started with that and made it way better. Here’s how mine works:
- It uses a single mount point, /media/isoimage.
- If you run the script and something is already mounted there, it will ask if you want to unmount.
- If the directory already exists, it’ll ask you if you’d like to delete it–which it will fail to do if there are items in it.
- If there’s nothing mounted, it’ll attempt to mount whatever is passed in to it.
- If it succeeds, it offers the option to open it.
TODO: Make sure what was passed in is an iso file
TODO: Support other types of disk images
You can get my script here.
To set it up (the preferred way):
Open a terminal, navigate to the directory you downloaded my script to, and type the following:
adrian@Kashra ~$ chmod +x ./isomount && sudo mv ./isomount /usr/bin/isomount
Enter your password, then it should be set up.
Find an ‘iso’ you want to mount, and right click it, go to “Select program”, and in the text box, type in “isomount”. Then the next time you want to mount/unmount an iso image, just right click and select my script!
To set it up as a Nautilus Script:
Disadvantages: Does not show up for all users, and shows up on all files (not just isos).
Open the terminal, navigate to the directory you downloaded the script too, and enter the following:
adrian@Kashra: ~$ chmod +x ./isomount && mv ./isomount ~/.gnome2/nautilus-scripts/isomount
And you’re done. Note that you will still need administrative privileges to mount the iso itself.
Find an ‘iso’ you want to mount, right click it, select nautilus-scripts, and click on isomount!
