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!
Re: HOWTO: Nautilus Script to mount .iso files
Nice and useful. Just works.
Thanks
Re: HOWTO: Nautilus Script to mount .iso files
Thanks I needed this .
-Ounas \\:D/
Re: HOWTO: Nautilus Script to mount .iso files
Re: HOWTO: Nautilus Script to mount .iso files
No, those are defective :P
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.
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
fixed that.
Thanks for this.Works well now.
And thanks a lot to the original scripter too of course.
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.:mrgreen:
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.
Re: HOWTO: Nautilus Script to mount .iso files
Sidenote:
sudo umount /media/FIREWALL.iso
from the term works fine
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