Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old February 5th, 2006   #21
engla
Dipped in Ubuntu
 
engla's Avatar
 
Join Date: Dec 2005
Location: Lund, Skåne
Beans: 571
Re: HOWTO: Nautilus Script to mount .iso files

Great script, very useful.

But why pollute your scripts menu, when we can do this context-sensitive?

Put the scripts in a local place, like ~/bin or ~/scripts or wherever you like. Select an iso, choose properties, and look at the Open With.. tab.
Click add, click 'use custom command' and click browse. Select your Mount script, then repeat this with your Unmount script. Now you have in your context menu whenever you select .iso files, an option to mount or unmount!
__________________
I trust my iBookG4 1.2GHz 768M only to Debian testing
I write Kupfer, a smart launcher. Try it today!
Recommended apps and tools: Dragbox, Tracker v0.6.6, Vim, GNU Screen
engla is offline   Reply With Quote
Old February 6th, 2006   #22
cutOff
Way Too Much Ubuntu
 
Join Date: Dec 2004
Location: Barcelona
Beans: 274
Ubuntu 8.04 Hardy Heron
Re: HOWTO: Nautilus Script to mount .iso files

Nice and useful. Just works.

Thanks
__________________
Registered Linux User #371167
cutOff is offline   Reply With Quote
Old February 28th, 2006   #23
ounas
A Carafe of Ubuntu
 
ounas's Avatar
 
Join Date: Aug 2005
Location: North of the Artic
Beans: 89
Ubuntu Intrepid Ibex (testing)
Re: HOWTO: Nautilus Script to mount .iso files

Thanks I needed this .

-Ounas
__________________
I forgot that love existed - Van Morrison
ounas is offline   Reply With Quote
Old March 16th, 2006   #24
adamkane
100% Pure Ubuntu
 
adamkane's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Beans: 857
Send a message via MSN to adamkane Send a message via Yahoo to adamkane Send a message via Skype™ to adamkane
Re: HOWTO: Nautilus Script to mount .iso files

How to mount ISO BIN/CUE IMG/CCD NRG:
http://ubuntuforums.org/showthread.php?t=144236
adamkane is offline   Reply With Quote
Old March 20th, 2006   #25
Nightwish
First Cup of Ubuntu
 
Join Date: Nov 2004
Beans: 5
Re: HOWTO: Nautilus Script to mount .iso files

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.
Nightwish is offline   Reply With Quote
Old March 22nd, 2006   #26
jon_gunnar
A Carafe of Ubuntu
 
jon_gunnar's Avatar
 
Join Date: Apr 2005
Location: Norway
Beans: 151
Ubuntu 9.04 Jaunty Jackalope
Send a message via MSN to jon_gunnar
Re: HOWTO: Nautilus Script to mount .iso files

Quote:
Originally Posted by tr4veler
The scripts wheren't working for me under Dapper. Turns out gksudo was seg faulting. Pulling out the
Code:
-u root -k
fixed that.
Thanks for this.Works well now.
And thanks a lot to the original scripter too of course.
__________________
http://www.jon-gunnar-rue.com
Linux User: 68922
jon_gunnar is offline   Reply With Quote
Old July 16th, 2006   #27
chollis888
5 Cups of Ubuntu
 
Join Date: May 2006
Location: Tulsa, OK
Beans: 30
Ubuntu 6.06
Send a message via MSN to chollis888 Send a message via Yahoo to chollis888
Re: HOWTO: Nautilus Script to mount .iso files

Just wanted to say thanks to the original poster, tried this on iso's and nrg's worked perfect don't have bin/cue's to try.
__________________
How'd I do that again, You'd think by now I'd know to write it down...
chollis888 is offline   Reply With Quote
Old July 16th, 2006   #28
orb9220
Tall Cafè Ubuntu
 
orb9220's Avatar
 
Join Date: Jun 2006
Location: 1 Quarry Road - Two River
Beans: 2,384
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: Nautilus Script to mount .iso files

Well the mount script from Nightwish works but the unmount doesn't

#!/bin/bash
#
BASENAME=`basename "$*"`
foo=`gksudo -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/"

Any Idea's or is it something stupid I don't understand which is possible and still trying to grasp the whole permissions thing.

Any Help is always appreciated.
orb9220 is offline   Reply With Quote
Old July 16th, 2006   #29
orb9220
Tall Cafè Ubuntu
 
orb9220's Avatar
 
Join Date: Jun 2006
Location: 1 Quarry Road - Two River
Beans: 2,384
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: Nautilus Script to mount .iso files

Sidenote:
sudo umount /media/FIREWALL.iso
from the term works fine
orb9220 is offline   Reply With Quote
Old July 17th, 2006   #30
Aragorn
First Cup of Ubuntu
 
Join Date: May 2005
Beans: 4
Re: HOWTO: Nautilus Script to mount .iso files

Hi at all!

I've patched the iso mounter...now it can mount a file from every position in the home directory and it creates a mount point without the .iso extension.

#!/bin/bash
# mount

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

BASENAME=`basename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS .iso`

sudo mkdir "/media/$BASENAME"

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


if sudo mount -o loop -t iso9660 $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 $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS .iso`

sudo umount "/media/$BASENAME"

sudo rmdir "/media/$BASENAME"

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

exit 0
Aragorn is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:07 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry