You are not logged in.

#1 2011-09-04 20:47:11

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

ldm - Lightweight Device Mounter

I started writing this little tool the other day, when i finally switched from xfce to subtle wm (it rocks!), and i had the need to have my usb keys/cds/floppys mounted automagically. I googled a bit and found skvm, but it relies on hal which is deprecated, so i grabbed libudev documentation and started hacking.

You can find the source at https://github.com/LemonBoy/ldm

Feel free to report bug reports, feature requests (remember it's a device mounter, not a <insert other kind of software here>), complains and hate mail smile

TLM

Offline

#2 2011-09-04 20:54:06

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,471
Website

Re: ldm - Lightweight Device Mounter

Can it handle an iPod as well?

EDIT: I should add that it definetely looks interesting, a bit of feedback is always good of course wink Oh, and if I install it, will I have to add it to my DAEMONS array or something like that?

Last edited by Unia (2011-09-04 20:55:16)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#3 2011-09-04 20:57:58

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Unia wrote:

Can it handle an iPod as well?

EDIT: I should add that it definetely looks interesting, a bit of feedback is always good of course wink Oh, and if I install it, will I have to add it to my DAEMONS array or something like that?

Haven't tried with ipods yet, but as long as they are identified by udev as block devices it should work... I'll test with an ipod nano in some secs smile

Don't know how the DAEMONS spawning works, i usually launch it by hand once logged in...

Offline

#4 2011-09-04 21:08:30

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,471
Website

Re: ldm - Lightweight Device Mounter

TheLemonMan wrote:
Unia wrote:

Can it handle an iPod as well?

EDIT: I should add that it definetely looks interesting, a bit of feedback is always good of course wink Oh, and if I install it, will I have to add it to my DAEMONS array or something like that?

Haven't tried with ipods yet, but as long as they are identified by udev as block devices it should work... I'll test with an ipod nano in some secs smile

Awesome, thank you!

TheLemonMan wrote:

Don't know how the DAEMONS spawning works, i usually launch it by hand once logged in...

Oh I see, I can add it to my autostart then!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#5 2011-09-04 21:41:27

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,013

Re: ldm - Lightweight Device Mounter

I saw ldm and thought it was a xdm/kdm/gdm/slim for lxde. The name might cause some confusion but it seems like a very handy app to have smile
Cheers


You're just jealous because the voices only talk to me.

Offline

#6 2011-09-04 22:11:51

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

@moetunes: i'm not that good with names heh
@Unia: it handles ipods just fine, both with a fstab entry and without big_smile
I also fixed a couple of crucial bugs in the current head, please pull and rebuild smile

Offline

#7 2011-09-04 22:13:44

twix
Member
Registered: 2010-10-07
Posts: 63

Re: ldm - Lightweight Device Mounter

Hello, nice software !

I am trying to make an AUR package for it, could you add the target "install" in your Makefile please ?

Offline

#8 2011-09-05 17:03:11

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

twix wrote:

Hello, nice software !

I am trying to make an AUR package for it, could you add the target "install" in your Makefile please ?

Done that, pushed right now smile
Also this morning i committed support for fstab entries with label or uuid scheme!

Offline

#9 2011-09-05 17:08:04

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,248
Website

Re: ldm - Lightweight Device Mounter

moetunes wrote:

I saw ldm and thought it was a xdm/kdm/gdm/slim for lxde. The name might cause some confusion but it seems like a very handy app to have smile
Cheers

There is already a display manager for lxde --> lxdm

http://wiki.lxde.org/en/LXDM
https://wiki.archlinux.org/index.php/LXDE#LXDM

Offline

#10 2011-09-05 17:50:20

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 689
Website

Re: ldm - Lightweight Device Mounter

This looks very good indeed and many thanks for sharing ... but excuse me in advance for being thick, but how do you UNmount your devices?
Using Eject from a file manager such as Thunar, etc?
hmm

Offline

#11 2011-09-05 18:18:20

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

ninian wrote:

This looks very good indeed and many thanks for sharing ... but excuse me in advance for being thick, but how do you UNmount your devices?
Using Eject from a file manager such as Thunar, etc?
hmm

Good point. If eject issues an udev remove event you can safely use that, if it doesn't i might add an unmount function to it.
(You can check if eject behaves correctly by using eject and then checking in the /media folder if the mountpoint is still present)

Offline

#12 2011-09-05 18:41:07

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 689
Website

Re: ldm - Lightweight Device Mounter

I suppose there's also:

udisks --unmount <device>
udisks --eject <device>

which can be bound to a custom action in a file manager, but you've got to do some more fiddling to convert the device name to the more convenient mountpoint name.

Offline

#13 2011-09-05 19:05:47

twix
Member
Registered: 2010-10-07
Posts: 63

Re: ldm - Lightweight Device Mounter

I have done the PKGBUILD, but I'm not sure about the license, could you tell me which one you want please ?

Offline

#14 2011-09-05 20:49:41

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: ldm - Lightweight Device Mounter

I've made a PKGBUILD as well, also the license is the only point where I got stuck. Let's see who's first in the AUR.


Just kidding, it's yours! It's just, I ALWAYS create a PKGBUILD of applications I want to try, a quick search on the AUR didn't find ldm, so I wrote it.

LemonMan, starting ldm with the initscript causes my cpu to go up to 100%, ldm is the process causing this. Do you know this problem? If not, how can I help?

Offline

#15 2011-09-05 21:55:45

twix
Member
Registered: 2010-10-07
Posts: 63

Re: ldm - Lightweight Device Mounter

I think yours is more advanced, look at this total deception : http://pastebin.archlinux.fr/433938

So could you please upload yours, I promise to read it to improve my PKGBUILD skill to level 2 smile

Offline

#16 2011-09-06 09:45:41

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Army wrote:

I've made a PKGBUILD as well, also the license is the only point where I got stuck. Let's see who's first in the AUR.


Just kidding, it's yours! It's just, I ALWAYS create a PKGBUILD of applications I want to try, a quick search on the AUR didn't find ldm, so I wrote it.

LemonMan, starting ldm with the initscript causes my cpu to go up to 100%, ldm is the process causing this. Do you know this problem? If not, how can I help?

The problem is fixed in the latest head, i valgrinded it before releasing but forgot to check if the method w/o polling was cpu expensive, silly me smile
Fixed also a couple of other tiny bugs.

Offline

#17 2011-09-06 18:37:13

zester
Member
From: Wilkes Barre Pa
Registered: 2011-08-13
Posts: 156
Website

Re: ldm - Lightweight Device Mounter

Cool thanks for the code you saved me some work on my own project wink I forked you on github so if I make any changes or improvements they will be up for grabs.

Offline

#18 2011-09-07 23:47:53

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Major update, now it uses the logged user uid/gid to mount the devices so you have full control on them w/o being root big_smile

Offline

#19 2011-09-08 08:24:23

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,471
Website

Re: ldm - Lightweight Device Mounter

Is there  an (updated) PKGBUILD available I can use? twix, is yours usable?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#20 2011-09-08 13:54:10

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: ldm - Lightweight Device Mounter

Here's mine http://codepad.org/mwGtAuOu I / we still don't know the license!

Offline

#21 2011-09-08 14:47:40

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Army wrote:

Here's mine http://codepad.org/mwGtAuOu I / we still don't know the license!

Forgot to say that, sorry tongue It's released under MIT license, i just added the LICENSE file to the repository too.
Btw the make install objective already copies the daemon bootstrapper in /etc/rc.d/

Offline

#22 2011-09-08 15:14:27

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,471
Website

Re: ldm - Lightweight Device Mounter

Thank you Army, I just installed it!

TheLemonMan, it doesn't work with my iPod Touch 3G. I know iPods (and those Touches/Phones in particular) are hard to work with, but is this perhaps a feature you could add in a later version? That would make this little gem complete for me!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#23 2011-09-08 15:39:44

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: ldm - Lightweight Device Mounter

Unia wrote:

Thank you Army, I just installed it!

TheLemonMan, it doesn't work with my iPod Touch 3G. I know iPods (and those Touches/Phones in particular) are hard to work with, but is this perhaps a feature you could add in a later version? That would make this little gem complete for me!

Works just fine with a iPod shuffle 2g, don't know how the new iDevices are mounted...
Can you pastie the output of `udisks --dump` ?

Offline

#24 2011-09-08 15:48:22

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: ldm - Lightweight Device Mounter

I'll update my PKGBUILD and put it on the AUR, in case noone else already did. Now I'll be away for a few hours.

Offline

#25 2011-09-08 18:06:18

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: ldm - Lightweight Device Mounter

Doesn't seem to work here (/media stays empty).

# grep ldm /var/log/everything.log 
ldm[1021]: segfault at 0 ip 00007f163a48a249 sp 00007fffc136bd30 error 4 in libnss_files-2.14.so[7f163a484000+b000]

gh · da · ds · cr · ab · fkr

Offline

Board footer

Powered by FluxBB