Re: Open source software for moving media files off portable storage

Ray Rashif <[email protected]>
Newsgroups gmane.user-groups.linux.singapore
Message-ID <[email protected]>
On 23 February 2010 16:51, Jett Tayer <[email protected]> wrote:
> Not sure if i got your question right but if you're using Gnome, f-spot
> should be there to automagically sync to your local (for photos of
> course)
>
> On Mon, 2010-02-22 at 23:08 -0800, Trent Payne wrote:
>> Thanks for your reply Rajaram,
>>
>> I don't have any issue accessing the files on my camera; in every case I am able to mount them as vfat file systems.
>>
>> My issue is how to automatically handle moving them from the mobile file system to the local file system.
>>
>> Cheers...

He just wants something to auto-copy stuff upon hotplugging of the
device, regardless of the type of media content, to a predefined
directory. In short, he's looking for a custom script or a post-mount
action from a DE or WM utility. As such, Trent, you might be happy to
know that DEs are programmed to offer this function out-of-the-box. If
not, you have udev rules at your disposal:
http://reactivated.net/writing_udev_rules.html

I don't know about GNOME, but in KDE, I click on Device Notifier
Settings, and I can assign a command to run depending on a matching
rule. That's it, presto :)

Else, every device has a unique identifier, if not a name. With that,
you should be able to cough up something like this (where customscript
is the script which would do all the copying with find -type -exec,
and $sysfsattribute the serial of the device):

ACTION=="add", SUBSYSTEM=="usb", ATTR{serial}=="$sysfsattribute",
RUN+="$customscript"

To find $sysfsattribute for the serial: udevadm info -a -p $(udevadm
info -q path -n /dev/sdb) | grep product -A1

Replace /dev/sdb with where your removable device would be (you don't
even need to have it mounted to run the above command).

You can write the rule to a file /etc/udev.d/10-local.rules and
hopefully this should prove to be a solution. As I only know this from
memory, you might have to use plural forms a la SUBSYSTEMS and ATTRS,
or replace SUBSYSTEM with BUS, but whatever it is you have to look at
this method if the DE fails. Good luck :)


--
GPG/PGP ID: B42DDCAD

_______________________________________________
LUGS Mailing list - [email protected]
List FAQ: http://wiki.lugs.org.sg/LugsMailingListFaq
Info page: http://www.lugs.org.sg/mailman/listinfo/slugnet
To unsubscribe send an empty email to: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.