Page 7 of 10 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 94

Thread: HOWTO: Nautilus Script to mount .iso files

  1. #61
    Join Date
    Mar 2007
    Location
    Dallas, TX
    Beans
    55
    Distro
    Ubuntu Studio 10.10 Maverick Meerkat

    Lightbulb Re: HOWTO: Nautilus Script to mount .iso files

    Ok guys. I don't use gnome and I don't use nautilus, and so i don't bother installing zenity... but i do have kdialog installed in kde, so i modified the scripts to work with kubuntu and kde... only i can't get the unmount to work....i've got it started, so i'd appreciate some kind soul to find my error...thanks

    here's my working mount.sh

    Code:
    #!/bin/bash
    # mount
    # script was originally written for gnome and nautilus
    # found http://www.ubuntuforums.org/showthread.php?t=87369&page=3
    # modified to support kde/kubuntu by Joshua Kersey / goodtimetribe
     
    kdesu /bin/echo "got r00t?"
    
    BASENAME=`basename $1`
    
    sudo mkdir "/media/$BASENAME"
    
    kdialog --title "ISO Mounter" --msgbox "$BASENAME e $1"
    
    
    if sudo mount -o loop -t iso9660 $1 "/media/$BASENAME"
    then
    if kdialog --title "ISO Mounter" --yesno "$BASENAME Successfully Mounted. Open Volume?"
    
    then
    konqueror /media/"$BASENAME" 
    fi
    
    exit 0
    else
    sudo rmdir "/media/$BASENAME"
    
    kdialog  --error "Cannot mount $BASENAME!" --title "ISO Mounter" 
    
    exit 1
    fi
    Here's my unmount.sh. I didn't think it worked, but I think I found my error. Try it and make any modifications you think necessary.

    Code:
    #!/bin/bash
    # unmount
    # script was originally written for gnome and nautilus
    # found http://www.ubuntuforums.org/showthread.php?t=87369&page=3
    # modified to support kde/kubuntu by Joshua Kersey / goodtimetribe
    
    kdesu /bin/echo "got r00t?"
    
    BASENAME=`basename $1`
    
    sudo umount "/media/$BASENAME"
    
    sudo rmdir "/media/$BASENAME"
    
    kdialog --info --text "Successfully unmounted /media/$BASENAME"
    
    exit 0

  2. #62
    Join Date
    Jan 2006
    Beans
    22
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Nautilus Script to mount .iso files

    Thanks this is a great set of scripts

  3. #63
    Join Date
    Oct 2007
    Location
    Oregon
    Beans
    904

    Re: HOWTO: Nautilus Script to mount .iso files

    Worked great fir me Now less wasting my blank CD's
    Arch x86_64 User / Windows 7 x64 Dual Boot | Nvidia Geforce GT 430 | AMD Phenom II X4 925 (2.8 Ghz, Quad Core) | 6 GB DDR2 RAM | 500 GB HD

  4. #64
    Join Date
    Aug 2006
    Beans
    Hidden!

    Re: HOWTO: Nautilus Script to mount .iso files

    gksudo is very distro-independent... NOT.

    And next thing is wrong - usage of zenity. Intrusive dialogs... Use libnotify instead.

  5. #65
    Join Date
    Apr 2007
    Beans
    82

    Re: HOWTO: Nautilus Script to mount .iso files

    Greate scripts, but I have one problem I cant unmount them. It says successfully unmounted but the folder is still in the media folder and contains that iso and I cant delete that mounted iso too.

  6. #66
    Join Date
    Jan 2008
    Beans
    8

    Talking Re: HOWTO: Nautilus Script to mount .iso files

    Quote Originally Posted by Nightwish View Post
    No, those are defective
    gksu segfaults with -k root, i don't think it needs it anyway. also, it attempted for me to create directories with the full path, which is not what i want. so, here's a quick fix and a cleanup.
    Mount:
    Code:
    #!/bin/bash
    #
    # nautilus-mount-iso
    
    gksudo -k /bin/echo "got r00t?"
    BASENAME=`basename "$*"`
    sudo mkdir /media/"$BASENAME"
    echo $BASENAME
    
    if sudo mount -o loop -t iso9660 "$*" /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
    Unmount:
    Code:
    #!/bin/bash
    #
    BASENAME=`basename "$*"`
    foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
    sudo umount /media/"$BASENAME" && zenity --info --text "Successfully unmounted /media/$BASENAME/" && sudo rmdir "/media/$BASENAME/"
    cleaned up the unmount code, BTW.


    great job man, now it worked for me, great simple script!!!

  7. #67
    Join Date
    Feb 2007
    Location
    New York
    Beans
    894
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Nautilus Script to mount .iso files

    There is a utility called gISOmount in Synaptic for this. I'm going to try it as soon as my upgrade torrent finishes.

  8. #68
    Join Date
    May 2007
    Beans
    9
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Nautilus Script to mount .iso files

    this is great, what a time saver... being a noob and all.
    thanks.

  9. #69
    Join Date
    Jun 2008
    Beans
    4

    Re: HOWTO: Nautilus Script to mount .iso files

    Wow, after all of this gISOmount is great. Just install the package and run, I've mounted with it, but I haven't unmounted anything yet. It seems to work very well so far though. I'll post back after I try unmounting and see if there are any problems

  10. #70
    Join Date
    Jul 2007
    Beans
    13

    Talking Re: HOWTO: Nautilus Script to mount .iso files

    why install gisomount and / or other similar applications ?
    just because are ready for you desktop ?

    command line is better owns !

Page 7 of 10 FirstFirst ... 56789 ... LastLast

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
  •