LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-08-2010, 01:41 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
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.

Code:
     /media/MyGeekStik
     .../iconImage
     .../auto.conf
     .../forLnx
     .../forWin
     .../forMac
     .../myContent
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."

Merci d'avance,
~~~ 0;-Dan
 
Old 12-08-2010, 01:48 PM   #2
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
... follow-up "autorun" other use

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.
 
Old 12-08-2010, 02:26 PM   #3
Latios
Member
 
Registered: Dec 2010
Distribution: Arch
Posts: 115

Rep: Reputation: 21
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

Last edited by Latios; 12-08-2010 at 02:28 PM.
 
Old 12-08-2010, 04:54 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
seeing as Microsoft DISSABLED this on 7 and i think vista ( one of the hot-fix updates) for SECURITY reasons

autorun is not good to use .

autorun auto running a program is how viruses get spread from flash drive to computer to flash drive to a different computer .... and so on ...
 
1 members found this post helpful.
Old 12-18-2010, 11:27 AM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Okay, so autorun is a risk. Please explain this:

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.

Merci d'avance,
~~~ 0;-Dan
 
Old 12-18-2010, 11:54 AM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
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)
 
Old 12-20-2010, 10:59 AM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by John VV View Post
... the os has a default setting for what program to use ( most distros use different ones)
Where do I find these "default settings" for Ubuntu Lucid or other Gnome desktop sessions?

Thanks,
~~~ *<;-}( )( )// Dan
 
Old 12-21-2010, 09:45 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
"Cap-less" USB Thumb/Flash drives - difference in life expectancy? SilversleevesX General 2 08-03-2010 12:05 PM
Which Flash Package? "Flashplugin-nonfree" or "flashplayer-mozilla" Zaskar Debian 3 04-02-2008 02:15 AM
C/C++ functions similar to BASH's "cp", "mv", "mkdir", etc? kornerr Programming 10 04-23-2006 09:48 AM
How to use Use "USB Flash Drives" in Slackware?? DdOs Linux - Newbie 26 03-31-2006 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration