Mounting ISO Files?
David M. Carney
carney1979 at gmail.com
Tue Sep 20 10:11:20 UTC 2005
On Tue, 2005-09-20 at 10:46 +0100, Thomas Beckett wrote:
> On 8/31/05, Stephen R Laniel <steve at laniels.org> wrote:
> > sudo mount -o loop -t iso9660 filename.iso /mnt/mountpoint
> >
> > where filename.iso is the name of the ISO file, and
> > /mnt/mountpoint is the directory where the ISO file will be
> > mounted.
> >
> > You could put those two lines into a script, then add them
> > to a right-click menu associated with ISO files in GNOME.
> > I've never tried that, though, so you'd be on your own.
> >
> This would likely work just fine as a Nautilus script but you would of
> course need to use gksudo rather than sudo as there would be no
> terminal to ask for the password.
>
> Also could you change it to mount in a users home directory and then
> add the script to the sudoers file as nopassword so that for the
> "mount in HOME" nautilus script the sudo password would not be needed?
> If this was done, would any of the commands executed by the nautilus
> script need sudo privs or would the execute fine as the script itself
> not need it?
>
> Tom
>
Here's a script I use. It will not work with filenames containing
spaces. Maybe someone could fix that....
It depends on a folder named /media/ISO existing. This can be easily
edited in the script.
NOTE: You must right-click on the iso file and use the umount script or
you will get an error. DO NOT right click on the icon on your desktop to
umount it or you will get an error.
These script require that gksudo be installed.
Just make sure they are executable and drop them in your
~/.gnome2/nautilus-scripts folder.
David
--
_______________________________
Registered Linux User #297958
http://carney1979.blogspot.com/
MOUNT ISO FILES:
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal
access" /bin/echo "got r00t?"`
sudo mount -o loop -t iso9660 $I /media/ISO
done
done
exit0
UMOUNT ISO FILES:
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal
access" /bin/echo "got r00t?"`
sudo umount $I
done
done
exit0
More information about the ubuntu-users
mailing list