Results 1 to 10 of 94

Thread: HOWTO: Nautilus Script to mount .iso files

Threaded View

  1. #11
    Join Date
    May 2006
    Location
    Tulsa, OK
    Beans
    30

    Re: HOWTO: Nautilus Script to mount .iso files

    I used these scripts, posted by animacide, with no problems at all in dapper.

    Mount:





    Code:
     
    #!/bin/bash
    #
    # nautilus-mount-iso
    gksudo -u root -k /bin/echo "got r00t?"
    sudo mkdir /media/"$*"
    if sudo mount -o loop -t iso9660 "$*" /media/"$*" then if zenity --question --title "ISO Mounter" --text "$* Successfully Mounted.
    Open Volume?" then nautilus /media/"$*" --no-desktop fi exit 0 else sudo rmdir /media/"$*" zenity --error --title "ISO Mounter" --text "Cannot mount $*!" exit 1 fi
    Unmount:






    Code:
     
    #!/bin/bash
    #
    for I in "$*"
    do foo=`gksudo -u root -k -m "enter your password for root terminal
    access" /bin/echo "got r00t?"`
    sudo umount "$I" && zenity --info --text "Successfully unmounted /media/$I/" && sudo rmdir "/media/$I/" done done exit0












    Here is a step by step.

    First open a terminal and do a:
    Code:
    sudo gedit ~/mount-iso
    I used root to create the files so there was no conflicts later. Then in the empty file I cut and pasted the mount script and saved with crtl-s and exit.

    Then the same for Unmount script:
    Code:
    sudo gedit ~/unmount-iso
    Then in this empty file cut and paste the unmount script. Save with
    crtl-s and exit.
    Ok next to make them executable do a:
    Code:
    sudo chmod +x ~/mount-iso
    and then:
    Code:
    sudo chmod +x ~/unmount-iso
    Ok now to put them in the right spot:
    Code:
    sudo mv ~/mount-iso ~/.gnome2/nautilus-scripts/
    next:
    Code:
    sudo mv ~/unmount-iso ~/.gnome2/nautilus-scripts/
    And thats it.
    Now to use the new scripts find and .Iso or .Nrg anywhere you have it. I've mounted both types from my ntfs storage partition with no problems. Just right click the image file go to scripts and then choose mount or unmount. Could'nt get any better than that. Goodluck and if you need more fuctions or just want to try some other scripts check the UDSF Here.

    Edit: It doesn't work with img's on the desktop.
    Last edited by chollis888; July 19th, 2006 at 05:03 AM.
    I'm a cheating bastard using women

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •