Skip to main content

Mount ISO images easily under Nautilus

I had purchased Lenovo y410 series laptop few months back , the laptop worked flawlessly for few months but well sadly few weeks back optical drive stopped working. I had downloaded an iso from which i wanted to run few files, now as the DVD drive on my laptop was not working and well repairs will take time so i was in a fix , about how to extract files from this ISO and run them . Searching Google , Ubuntu forums etc i found a very simple and easy way of mounting ISO's under nautilus which i am trying to document here in this article.


Open the terminal window(Applications -> Accessories -> Terminal ) and issue the following commands in the terminal window :

wget http://www.debianadmin.com/images/iso/mount.sh
and
wget http://www.debianadmin.com/images/iso/unmount.sh

Now we need to change the file permissions , to make the above script executable. Which we could do by issuing the following command in the terminal window :

sudo chmod +x mount.sh

sudo chmod +x unmount.sh

Finally we move the above scripts to nautilus directory by issuing the following command in the terminal window ;

sudo mv mount.sh ~/.gnome2/nautilus-scripts/

sudo mv unmount.sh ~/.gnome2/nautilus-scripts/

Now open nautilus and inside nautilus open directory containing ISO image you want to mount. Right Click on the ISO image and you will find menu similar to one shown below :


Click on the mount.sh file , if ISO file mounts properly you will find two dialog boxes similar to one shown below :

Also on the desktop you should find the icon of the mounted DVD/CD ISO file .
Now if you want to unmount the ISO volume , right click on the icon of the mounted ISO and click on the unmount.sh as shown in figure below :
Tutorial Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2008 , Ambuj Varshney

Comments

  1. Brilliant tip, thanks

    http://tnetech.net

    ReplyDelete
  2. I loved your post on APTonCD, but I have used up several discs keeping my standalone PC updated. Now I can bypass the CD, and even use DVD images without a DVD reader!

    Your Blog has been the best source of the tips I actually can use!

    ReplyDelete
  3. Charliebrownau9:07 AM

    Great Tip
    Ive been recently looking into an A120/Dtools type program or a simple way to RIGHT Click on an ISO/CUE
    and choose Mount/UNmount

    Is there a method to extend your tutorial so the user does NOT have to go into the Scripts section instead in the same area that it gives the user the choice down the bottom to Burn or extra it , put Mount or Unmount ISO along in that area ?

    ReplyDelete
  4. i'm not getting that option in nautilus. i did as described above but i'm not getting anything.

    any ideas?

    ReplyDelete
  5. NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER
    NEVER NEVER NEVER EVER run ANY shell script without first reading it all the way through.

    I mean no offense to Ambuj, but on the internet anything can change. Whose to know that this site hasn't been compromised.
    Regardless of how much you trust someone, NEVER run ANY script that you've acquired from the internet without first reading
    every single line.

    Of all the security holes, backdoors and so on that compromises our systems, the one thing that compromises the security of
    a computer more than anything else, is the user.
    I realize that some scripts can get a bit lengthy and are too large to post the entire text on the site, but when you can't do
    a copy/paste script written on the site PLEASE advise that everyone read the script before you do anything else.

    ReplyDelete
  6. Anonymous5:09 AM

    Great tutorial, thanks. Just FYI, you shouldn't need to use sudo for these commands :)

    ReplyDelete
  7. Update scripts to allow iso files names with white spaces:

    #!/bin/bash
    # mount

    gksudo -k /bin/echo "got r00t?"

    BASENAME=`basename "$(echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" .iso`

    sudo mkdir "/media/$BASENAME"

    zenity --info --title "ISO Mounter" --text "$BASENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"

    if sudo mount -o loop -t iso9660 "$(echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" "/media/$BASENAME"
    then
    if zenity --question --title "ISO Mounter" --text "$BASENAME Successfully Mounted. Open Volume?"

    then
    nautilus /media/"$BASENAME" --no-desktop
    fi

    exit 0
    else
    sudo rmdir "/media/$BASENAME"

    zenity --error --title "ISO Mounter" --text "Cannot mount $BASENAME!"

    exit 1
    fi

    -------------------------------------------------------------------------------

    #!/bin/bash
    # unmount

    gksudo -k /bin/echo "got r00t?"

    BASENAME=`basename "$(echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" .iso`

    sudo umount "/media/$BASENAME"

    sudo rmdir "/media/$BASENAME"

    zenity --info --text "Successfully unmounted /media/$BASENAME"

    exit 0

    ReplyDelete

Post a Comment

Popular posts from this blog

13 Things to do immediately after installing Ubuntu

In this article i describe some of the things to do immediately after installing ubuntu on your machine . Since most of the people reading this would be shifting from Windows to Linux with a system dual booting so i would focus more on making transition easy from Windows to Linux.

Creating Your ultimate Ubuntu 7.10 Desktop

Ubuntu 7.10 Codenamed Gusty Gibbon was released few weeks back with much fanfare ,now Ubuntu for past couple of years has been one of the most popular Desktop Linux distributions . Ubuntu 7.10 includes a number of features , applets and Wizards to simplify desktop Linux experience however because of many licensing restrictions it does not include out of the box support for popular audio/video codecs and many commercial but good applications . Also because of the limitation of trying to accommodate all kind of applications on single CD Ubuntu comes with a limited set of applications .

Now , i often have arguments with my friends who are new to computers that windows is…

Over 16 Small Games For Ubuntu Linux

Over 16 Small Games For Ubuntu Linux

Ubuntu Linux is one of the most popular Linux distribution , it is especially popular among Linux newbies and windows refuges . Now Ubuntu Linux does come with a descent set of applications , still there is a scope for including some more quality applications and especially games . Now in this tutorial i will show you how to install a large number of small , easy and less resource hungry games on Ubuntu Linux with screen-shots of games .


1. Rocks 'n' Diamonds

Rocks 'n' Diamonds is a Boulderd*sh game for X11 with more than just the falling rocks and diamonds of its namesake. The object is still to collect all the diamonds (and emeralds), then get to the exit before time runs out. But your character must make use of bombs, spaceships, and many other elements in order to fill his quota of jewels.

Installation : -

Type the following command in the terminal window

wget http://www.artsoft.org/RELEASES/unix/rocksndiamonds/rocksndiamonds-3.2…

Making Music(Beats) on Linux/Ubuntu with Hydrogen

I am going to review a couple of Music Making Softwares for Linux and am starting with the simplest and one of the best!HYDROGEN. Hydrogen basically is a pattern based drum programming software which in layman terms means, it allows you to make your own beats.And in case you aren't much into music, you might be wondering “what the hell will i do with this piece of software”...well here is a word from my friends who've tried this: “Its pretty fun playing with this software, n even without knowing much, you could actually MAKE SUM MUSIC!!!”

There was this software called Acoustica Beatcraft(for windows) which actually introduced me to this beat making stuff and I was quite interested, but sadly it was too costly for me to buy it. So i was stuck using the trial version of the software and sadly as soon as i got the grip of the software the trial expired, and so my search began for software which would do the stuff for me and luckily i found this amazing piece of software HY…