Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I have some HTML files on a USB-connected HDD or "thumb" drive. I don't have a whole web site, but there are several linked pages of reference information.
How do I open index.html or similar when this device gets connected to a computer?
Open your file manager, navigate to where the usb thumb drive is mounted and double click on the html file you need. Most desktop environments will tell you when a thumb drive is mounted and when you open the file manager for whatever desktop environment you have, the drive should be obvious. Normally located on the left panel of the file manager.
Sorry for my long explanation: I always open files via "file" --> "application" vice "application" --> "file". Just my way of doing things, but obviously can be done either way.
Thanks to everyone who took the time to reply. I regret that I failed to state my question effectively.
What I want:
prepare USB drive with html content
...
insert into workstation
click, whirr, ding, whistle
web page opens without human action
I know that Linux will have different needs and behavior than those other workstation platforms that use autorun files. I've yet to discover how to get Linux to do anything. I'm happy for Linux to
launch a script that would then parse those autorun files.
Concerning that other dominant workstation platform:
The latest edition has a bash-like shell (Ubuntu-like I think) available. I'd like to discover how to run a script in this shell
when I insert the USB drive.
DISCLAIMER
There are serious security implications to these techniques. As with any administrative actions, one must exercise caution and diligence. Please use private message if you wish to answer my question but avoid the public response.
Follow-Up: Why am I trying to do this?
Over the years (decades) I have accumulated external HDD and "thumb" drives like cord-wood.
Each has folders and files that "archive" some previous life of mine -- both professional and personal.
Yes, I could copy them onto larger tera-byte devices, but ...
I would like automate the dance when I connect a drive to my Linux Mint v18.3 (soon to be v19.xx) workstation.
FIRST -- I want to launch a web page display that announces details about that drive's content.
NEXT -- I want to launch some automatic processing surrounding the drive.
the mount point, permissions, alias names, &c
EVENTUALLY -- I want to accomplish additional processing surrounding the contents of the drive.
update the file catalog, scan for newer file editions, 'fsck', &c
Thanks for listening.
Thanks in advance for your help,
~~~ 0;-Dan
When I put "autorun linux" into my favorite search engine, several links came up.
After a quick scan, it appears that one needs to write a script to do what you want to do and configure the desktop to ask to run the script on insertion of the thumb drive. Review of those links might be helpful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.