MountFile
Utilities
Score 74%
Description:

MounfFile is a shell script to mount ISOs (or other image files) to a directory of your choosing. It's different from other scripts in that it uses the KDE GUI (kdialog) to get the file/mount point and password (kdesu) from the user (though everything is still done in the bash shell).

It includes a desktop icon and a Konqueror/Dolphin/D3lphin service menu entry for ISOs
(Though the script should be able to mount any filesystem image, not just ISOs).

I wrote this script about a year ago, when I was "getting in to" bash, so I just gave it a bit of a clean up.
I put it here because I hear people asking the question "How can I mount ISOs?" and "Isn't there a GUI to mounting them?" and it reminded me of the script I wrote.
Use the installGUI.sh rather than manual install, it should work for everyone (tell me if it doesn't).

--Manual Install--
Just copy the script in to ~/bin/ and it should "just work". I also included a .desktop file that you can place on your Desktop to run the script.

--Note--
With manual install:
If you install the script in another location (ie, not ~/bin/) then just edit the .desktop file to reflect the location of the script.
----------

--GUI Installer--
There is now an installer script that will install the script and put a link in the KMenu (under Utilities), it will also ask if you want a link on the desktop too.
--Note--
If you choose to install system wide then it won't ask to put a link on the desktop, but it will put one in the KMenu.
----------

--Dependencies--
It really only depends on KDE, but here's a more technical dependency list:
* kdebase(-bin) (for kdialog and kdesu)
* a posix compliant shell (sh)
* mount (to mount)
* Loopback device support in the kernel or as a module. (Most, if not all, should have this anyway).

For those running Kubuntu I have set up an apt repository:
deb http://ppa.launchpad.net/tsimpson/ubuntu gutsy main
(doesn't matter if you use gutsy or not, it will be ok to use that release name)
It should also work for any Debian based distribution, all packages should be the same.
Also note that my repository no longer has a universe/multiverse etc, everything is in main (not my choice).
It also is FULL of KDE4 RC1 packages, so if you get upgrade notifications of KDE4 packages and don't want to use mine you should just download the .deb below.
Last changelog:

10 years ago

1.0
[li]1st release[/li]

1.1
[li]Fixed a couple things, it will warn you if you try to mount a file over another mount.[/li]
[li]I also did a but of work for the UnMounting part, as it was a bit buggy.[/li]

1.1.1
[li]Added installer script, as a stand-in for a GUI installer[/li]

1.2
[li]Replaced stand-in installer with a GUI installer script[/li]

Installer script should work without 'tempfile' now.

1.3
You wanted it, you got it.
[li]Added a service menu for ISOs[/li]

1.3.1
[li]Code tidy, it needed it.[/li]
[li]Now the code is more generic, it should work wherever KDE is installed to (doesn't assume /usr for the icons etc)[/li]
--Non-code related--
[li]Changed the icon for mountserv.desktop to use a relative icon (not all users have KDE in /usr)[/li]
[li]Added ChangeLog ;)[/li]
[li]Updated README[/li]
[li]Added licence info in COPYING[/li]
[li]Added TODO[/li]
[li]Added AUTHORS[/li]

1.3.2
[li]make sure $mounts is created before use, from service menu[/li]
[li]Quote the file:// url to allow for spaces in directories[/li]
[li]Add sevice menu for Dolphin[/li]
[li]move MountFile.desktop to ${prefix}/applications/kde for standards[/li]
[li]Updated email address to new address[/li]
[li]Added copyright info to COPYING[/li]

1.3.2.{1,2}
[li]Fixed service menu install path and typo[/li]

1.3.2.3
D3lphin service menu

jerrad

9 years ago

would be nice have a umount function to umount isos mounted with this script :)

Report

C

stdin

9 years ago

It does umount ISOs mounted with the script, just start mountfile and choose the "Unmount" option.

Report

iconmefisto

10 years ago

nicely done. I installed 1.3.1-1 with the .deb and then updated to 1.3.2.2-0. The only improvement I can think of now is including a d3lphin servicemenu in any future updates.

(https://marrat.homelinux.org/D3lphin)

As far as I can tell, it would be the same as the dolphin servicemenu, the only difference being the spelling of filenames and paths -- d3lphin instead of dolphin.

In any case, it was a simple matter to copy the servicemenu from my dolphin directory to the equivalent d3lphin one. So if you don't feel like bothering with the d3lphin support, it's no big deal. I'm assuming that anyone that has d3lphin installed probably had (and still has) dolphin also installed, and can simply copy the dolphin servicemenu to d3lphin as I did.

Report

C

stdin

9 years ago

Should work with d3lphin now too.
The updated package should also be in the repository soon, direct link to a .deb is also available

Report

AndreSomers

10 years ago

I installed using the GUI installer for user only on Kubuntu, but I'm not getting the ISO service menu. Other than that, it works great! Thanks for a nice tool.

Report

C

stdin

10 years ago

Ok, can you make sure that "~/.kde/share/apps/konqueror/servicemenus/mountserv.desktop" exists, if it does then try restarting Konqueror, with "killall konqueror", or just logout and back in. Sometimes Konqueror needs a kick to reread it's configuration files.
Let me know if it works or not :)

Report

AndreSomers

10 years ago

That file isn't there, I fear. The directory exists, but it is empty.

Report

AndreSomers

10 years ago

After coping the missing file from the archive and loggin in again, it works.

Report

C

stdin

10 years ago

It's strange that the installer didn't copy the file over. But I guess that's the problem with installer scripts, they sometimes don't do what they should.
The good news, however, is that I've finally learnt how to create a .deb package, so that should make life easier. The only think it doesn't do is install for the user only (but that's the nature of packages).

Report

C

stdin

10 years ago

Not bad work for 3 days :)

Report

tryfan

10 years ago

Very nice utility!
The only thing I miss is being able to use it from the right-click menu. (Or is it already there, and I just don't see it? :-) )

Report

C

stdin

10 years ago

That functionality isn't there yet. I'd have to modify the script a bit to do that, I'll put it on my to-do list.

Report

fdmarco3

10 years ago

just in case you don't know:
http://www.kde-apps.org/content/show.php?content=44805

bye :)

Report

C

stdin

10 years ago

I didn't want a "feature rich" application, I just wanted something simple to do a simple task. Just to mount/unmount filesystem images (mostly ISOs). I could have used fuseiso too, instead of plain mount (and it would be a simple patch to do so), but I don't need to. Like it says in the description, I wrote it when playing with bash scripting, just to make things a bit simpler for me.
MountFile just does exactly "what it says on the tin", it un/mounts a file.

Report

chandraiitk

10 years ago

yup. I also back ur position. In fact, I couldn't get that AcetoneISO2 installed on my system because of many-many dependencies. This one is too simple and working great. However, if u can add an installer with it, which can create an entry in K-menu, it would be great.

Thanks anyway for the good app!

Report

bulletxt

10 years ago

he was just joking ;)
keep up the good work :)

Report

C

stdin

10 years ago

I've just added a text installer to it that will do that. Give me a little while and I'll have it converted to use the GUI too :)

Report

C

stdin

10 years ago

And now the GUI installer.
(I forgot how much I like scripting :D)

Report

chandraiitk

10 years ago

1. If I try to install (as root) using the latest GUI, it gives the following error:

[root@maya mountfile-1.2]# ./installGUI.sh
./installGUI.sh: line 12: tempfile: command not found
kbuildsycoca running...
DCOP Cleaning up dead connections.

DCOP Cleaning up dead connections.
kbuildsycoca running...
unix_connect: can't connect to server (unix:/tmp/ksocket-root/maya-1524-469648a7)
Launched ok, pid = 5853
There are already artsd objects registered, looking if they are active...
... cleaned 5 unused mcop global references.

./installGUI.sh: line 72: $TEMPFILE: ambiguous redirect
mv: missing destination file operand after `/usr/share/applnk/Utilities/mountfile.desktop'
Try `mv --help' for more information.



2. If I try to install (as "user") using the latest GUI, it gives the following error:

[shekharc@maya mountfile-1.2]$ ./installGUI.sh
./installGUI.sh: line 12: tempfile: command not found
./installGUI.sh: line 101: $TEMPFILE: ambiguous redirect
mv: missing destination file operand after `/home/shekharc/.kde/share/applnk/Utilities/mountfile.desktop'
Try `mv --help' for more information.
cp: cannot stat `/home/shekharc/.kde/share/applnk/Utilities/mountfile.desktop': No such file or directory



It, however, copies the "mountfile" in /usr/bin or $HOME/bin. There seems to be problem with .desktop file.

Report

C

stdin

10 years ago

Hmm, seems you don't have the tempfile command. I should have probably checked if that's standard in most distros first. For me it's in the "debianutils" package (only just checked). You can fix this by setting the tempfile directly, change line 12 from:
export TEMPFILE="$(tempfile)"
to:
export TEMPFILE="/tmp/tempfile"

I'll have to find a workaround for this, but that should get you past the install.

Report

C

stdin

10 years ago

You'll be glad to hear that I've removed the usage of 'tempfile' now, so it should work.

For those who are interested, TEMPFILE="/tmp/temp.$$"

Report

chandraiitk

10 years ago

I am running FC6. I searched for the "tempfile" command but it doesn't seem to exist for fedora. I even couldn't locate the source-code for this file.

Could u please provide a link to the "tempfile" source or if possible, use some alternate way to bypass this command?!

Thanks!!

Report

chandraiitk

10 years ago

I am running FC6. I searched for the "tempfile" command but it doesn't seem to exist for fedora. I even couldn't locate the source-code for this file.

Could u please provide a link to the "tempfile" source or if possible, use some alternate way to bypass this command?!

Thanks!!

Report

chandraiitk

10 years ago

It got installed now properly and working great. Thanks for the quick fix.

Please keep the good work up. As one of the users suggested, a service menu entry will be great!!

Report

fdmarco3

10 years ago

just in case you don't know:
http://www.kde-apps.org/content/show.php?content=44805

bye :)

Report

10 years ago

1.0
[li]1st release[/li]

1.1
[li]Fixed a couple things, it will warn you if you try to mount a file over another mount.[/li]
[li]I also did a but of work for the UnMounting part, as it was a bit buggy.[/li]

1.1.1
[li]Added installer script, as a stand-in for a GUI installer[/li]

1.2
[li]Replaced stand-in installer with a GUI installer script[/li]

Installer script should work without 'tempfile' now.

1.3
You wanted it, you got it.
[li]Added a service menu for ISOs[/li]

1.3.1
[li]Code tidy, it needed it.[/li]
[li]Now the code is more generic, it should work wherever KDE is installed to (doesn't assume /usr for the icons etc)[/li]
--Non-code related--
[li]Changed the icon for mountserv.desktop to use a relative icon (not all users have KDE in /usr)[/li]
[li]Added ChangeLog ;)[/li]
[li]Updated README[/li]
[li]Added licence info in COPYING[/li]
[li]Added TODO[/li]
[li]Added AUTHORS[/li]

1.3.2
[li]make sure $mounts is created before use, from service menu[/li]
[li]Quote the file:// url to allow for spaces in directories[/li]
[li]Add sevice menu for Dolphin[/li]
[li]move MountFile.desktop to ${prefix}/applications/kde for standards[/li]
[li]Updated email address to new address[/li]
[li]Added copyright info to COPYING[/li]

1.3.2.{1,2}
[li]Fixed service menu install path and typo[/li]

1.3.2.3
D3lphin service menu

product-maker 18 62

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.3.2.3
updated Nov 28 2007
added Jul 09 2007
downloads today
0
page views today 7