LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-13-2018, 03:21 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,776
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
open an html file on USB-drive connection


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?

Thanks in advance,
~~~ 0;-Dan
 
Old 10-13-2018, 03:26 PM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
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.
 
1 members found this post helpful.
Old 10-14-2018, 04:21 AM   #3
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,534

Rep: Reputation: Disabled
If you mean in your browser, just open a file from the menu, instead of a website.
 
2 members found this post helpful.
Old 10-14-2018, 10:38 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
You should be able to navigate to the files on a mounted USB drive in your browser, although double-clicking in a file manager should work too.

Use file:// instead of http://
 
1 members found this post helpful.
Old 10-14-2018, 10:42 AM   #5
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
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.
 
1 members found this post helpful.
Old 10-14-2018, 10:51 AM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by fatmac View Post
If you mean in your browser, just open a file from the menu, instead of a website.
I wasn't aware of this option until now! Cool!
 
1 members found this post helpful.
Old 10-14-2018, 05:10 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
"How do I open index.html"

in your default text editor

gedit or kate


a *.html file is only a text file
 
Old 10-22-2018, 10:52 AM   #8
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,776

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
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.
Thanks in advance,
~~~ 0;-Dan
 
Old 10-22-2018, 12:17 PM   #9
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,776

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108

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
 
Old 10-22-2018, 12:39 PM   #10
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

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


Reply

Tags
hdd, html, usb



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
Open remote html files in a brower (ssh connection) xeon123 Linux - Newbie 1 03-12-2011 07:15 AM
open html page and store contents in file from console delmoras Linux - Newbie 2 11-24-2008 08:39 AM
Is it possible to create autorun for CD..open a html file... niroperera Linux - General 3 09-01-2008 04:40 AM
PERL: Can you open an HTML file from a web address? SparceMatrix Programming 3 02-07-2006 11:06 AM
Open HTML file in default browser through C++ Last Attacker Linux - General 10 10-20-2005 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:11 PM.

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