auto mounting in Openbox

It looks like two or more instances of amountd can be run at same time, this should not be allowed.

This is an extremely useful tool and it makes our devd shine.
 
New update. Now two icons are created on the desktop when a drive is mounted. One is to unmount it and the another one is to explore the media with Thunar.

openthunar.sh can be customized to replace Thunar with whichever file manager.

BR
 

Attachments

  • amount.tar.bz2
    23.6 KB · Views: 233
jjjesss said:
New update. Now two icons are created on the desktop when a drive is mounted. One is to unmount it and the another one is to explore the media with Thunar.

openthunar.sh can be customized to replace Thunar with whichever file manager.

BR
Hi jjjesss, thank you very much for this helpful scripts! I love them! :) I have changed them a little bit, because I want to "install" it in /usr/local/etc/amount not in /etc/amount. And I use vfs.usermount=1 and a mountdir in $HOME instead of /media. So I don't have to use sudo and can mount without it.

2 questions (because my experience in scripting isn't really good):
- Can you rename the "Unmount"-button? When I mount the device there are 2 icons: "mount device" and "Explore device". If I run "mount device" the second time, it will be unmounted. But the name "mount device" to unmount is a little bit confusing. :)
- Can you upload it to the ports? :-D

Thanks
Columbo0815
 
Thanks should go to aragon, the guy who programed the 'amount' and 'amountd'. I only made a few hacks to work with xfce4.

About the 'ports'... aragon is author of the original code. So... I'm not very confortable publishing it in other site or so, only here, where aragon shared it with us.

About your other suggestions I think I could do it. So... stay tuned :D.. I'll try it.

BR
 
Ok, I read the whole thread now... Thank you aragon! :)

Another thing: If I mount the Device, the new icon "explore" is named "explore $USER". Ok... I mount in /home/$USER/media but is this the reason?! :)

I think there are many users who will use (and love) the scripts. So aragon... Do you think a port of amount is possible?
 
jjjesss said:
Thanks should go to aragon, the guy who programed the 'amount' and 'amountd'. I only made a few hacks to work with xfce4.

This could be real life-saver here. :)

In the last few days I was reflecting what is the future of Xfce on FreeBSD desktop considering they're going to linux-only route.

I can personally mount manually, but it's not very user-friendly for the rest of my family members.

GNOME-3 is probably not according to my taste and that's why I've installed KDE yesterday.

Although people on #kde-freebsd were really helpful and provided two patches so I was able to finish building of KDE from ports, today I removed KDE. I simply do not like it and went back to my preferred Xfce.

Now, considering I use PCBSD-9.0 I wonder if such scripts could be added to it to 1st class user-experience for Xfce users?
 
I like KDE, but it's a bit heavy for my laptop. The scripts to mount/umount devices included in this posts are very useful but need to be improved. In my opinion there's no need to reinvent wheel or build big software layers only to mount devices. Tools like these, with improvements, is all XFCE4 and other wm need to deal with devices.

BR
 
This auto-mount script is quite handy, Thanks Aragon and jjjesss! I've begun to import it into our tree for PC-BSD 9, along with some modifications to make it support multiple WM's, icons, etc.

https://trac.pcbsd.org/changeset/11872

BTW what license is this code under? I'm assuming BSD, but I wanted to ask before marking it as such :)
 
Hello Kris,

kmoore134 said:
This auto-mount script is quite handy, Thanks Aragon and jjjesss! I've begun to import it into our tree for PC-BSD 9, along with some modifications to make it support multiple WM's, icons, etc.

https://trac.pcbsd.org/changeset/11872

BTW what license is this code under? I'm assuming BSD, but I wanted to ask before marking it as such :)

this is wonderful news. Thanks a lot for this contribution to PCBSD!
 
kmoore134 said:
This auto-mount script is quite handy, Thanks Aragon and jjjesss! I've begun to import it into our tree for PC-BSD 9, along with some modifications to make it support multiple WM's, icons, etc.

https://trac.pcbsd.org/changeset/11872

BTW what license is this code under? I'm assuming BSD, but I wanted to ask before marking it as such :)

This is great! about BSD license I have no problems with it so... and Aragon seems to be missing lately :)

I can't wait for PC-BSD 9 and try this but... now that my system is 100% functional I'm wonder if I will can update the system without impact...

Thanks Kris

BR
 
Pardon my silence folks. Been busy moving into a new country. Now hopefully I can finish some cleanup that I've been wanting to do.

Glad this work so far has been useful.


kmoore134 said:
BTW what license is this code under?

Public domain. :)
 
Hey,

I've finally submitted this as a port:

http://www.freebsd.org/cgi/query-pr.cgi?pr=159631

The port version is bumped to 0.6 and receives some changes:

* a proper daemon with RC script for start up (problem solved, richardpl).
* read-only NTFS support.
* experimental large FAT32 support (untested by me, but should work).
* handles spaces in labels now.
* code cleanup.

I'm going to be changing its architecture a bit for 0.7. Hopefully it will make clients simpler to write, and maybe remove the need for sudo. Oh, and read/write NTFS support (NTFS-3G) will be done by then too.

I've had a look at your code, Jes, and added mmcsd(4) to the default DEVMATCH pattern. The rest I'll try do better when I've got the new architecture in 0.7 working. For now, still only CLI and Openbox are officially supported.

I haven't perused Kris's mods yet. Glad to see him taking it up for PC-BSD!
 
Cool, thank you!

I think
Code:
XRUN_DEPENDS=	${LOCALBASE}/bin/sudo:${PORTSDIR}/security/sudo
means that this port needs sudo. Is it possible to make a [cmd=]make config[/cmd] menu for installing without sudo? Maybe there are users (here is one! :) ) that use
Code:
vfs.usermount=1
So I don't need sudo...
 
Columbo0815 said:
Is it possible to make a "make config" menu for installing without sudo? Maybe there are users (here is one! :) ) that use vfs.usermount=1. So I dont need sudo...
Not possible at this stage. If you want to use vfs.usermount without sudo, you will have to modify amount code. In which case you can modify the port's Makefile too. :)

Hopefully 0.7 won't require sudo anymore.
 
aragon said:
I poked around for HAL-esque auto mounting setups, but they were all hacky or used amd(8) - not really ideal for hot plug storage devices.
Just out of curiosity, what's wrong with amd? On access mounting seems like a good idea to me.
 
Probably not much wrong with amd(8). I mainly wanted manual mounting abstracted enough to be easy. With amd, mounting is easy, but I guess a manual umount requires one to fumble on the command line.
 
Back
Top