multi-platform "autorun" for flash drives and similar
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
multi-platform "autorun" for flash drives and similar
I move "geek sticks" and media cards among win-dose, mac, and linux workstations. I have content stored that I want to "display" automatically when the device gets connected.
Can someone help me implement "autorun" across multiple workstation OS platforms?
I would like to have some root folder files that configure what happens.
Next, there would be at worst, one folder-tree for each platform that holds platform specific components, executables, etc.
Last, there would be a folder-tree for my content.
Ultimately, I want to put presentations on these devices, distribute the devices as desired, have folks insert the media and watch my show regardless of whichever platform is involved. When I say "presentations" think OpenOffice Presentation, M$ Office Powerpoint, image slide show, or "web pages" instead of "run a video."
In addition to "presentations" I would like to be able to launch execution that will synchronize the contents of the "geek stick" with configured folders on the workstation.
For example, I have a set of reference documents -- OpenOffice, PDF, html, etc -- on geek sticks*. I want to connect the stick, get fresh documents from a workstation, give fresh documents to the workstation, and related processing. (Think "rsync")
Merci d'avance,
~~~ 0;-Dan
__________
* I have flash devices that look like door keys, and have a reference data "key ring."
Sappy, but fun.
To implement autorun for Linux, you have to tweak the system that is going to get the flash drive to do autorun. Linux won't do autorun on its own
In the system, you can make a .sh script that :
Is started by dbus or the like in the event of flash drive inserted (I don't know how exactly this is done, you can research)
Mount the flash drive
Look for your autorun files (which may include a second .sh file, signatures etc)
If autorun found, run the .sh file on the flash drive that will take over the autorun process
If autorun not found, unmount the drive
Consider the security implications of autorun for the systems in question before implementing this. Autorun can be used very maliciously
On my linux boxes, I get a dialog when I insert "media cards" or "geek sticks"(flash or thumb or key drives) or "usb drives". The dialog offers to do all sorts of things with the contents of the "media". When I insert a commercial CD or DVD, something automatically launches the required player. I consider this automatic behavior "autorun." What am I missing?
I supposed I could create a "video" of my presentation, but then it is a passive
"watch this" experience instead of something interactive.
something automatically launches the required player
dvd's are VERY different from usb drives
and there is a program SET to play a dvd video normally the distros default player ( i reset mine to vlc)
the same for a music cd the os has a default setting for what program to use ( most distros use different ones)
Those fancy dialogs you see are triggered via dbus nowadays (they used to use HAL, which is being deprecated at the moment). The feature works this way: the kernel detects the new device, then it adds a block device descriptor using udev under /dev/, the dbus daemon registers the event. It's up to the desktop (kde, gnome......) to do something with that event or to completely ignore it. And, in any case, there's no convention for what you call autorun (i.e. there's no .autorun file or something like that that Linux will run when detecting the device).
If could be implemented, but I wouldn't want such a thing in my OS. I want to decide what to run, how to run it, under which user run it, and WHEN run it.
Note that there's no way to guarantee that it will always work in any case, not even in Windows by the way (the autorun stuff can and SHOULD be deactivated, and most smart users will do that).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.