Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

Več o tem

Trying to simply open an .html file using file:// on Linux -- it's adding an extra slash and not finding the file

  • 4 odgovori
  • 2 imata to težavo
  • 945 ogledov
  • Zadnji odgovor od JoyShafer

more options

Ideally I'd like to be able to launch Firefox from my Linux command line and have it simply open an html file on my hard drive. Not knowing the exact syntax and not getting any love on my first few tries, I instead launched Firefox and typed file://path/to/myfile.html in the address bar. However, instead of looking in 'path/to/myfile.html' Firefox is adding an extra slash and then reporting that it can't find '/path/to/myfile.html'. I've tried a few variations but don't seem to be able to get around this.

Any suggesstions?

Ideally I'd like to be able to launch Firefox from my Linux command line and have it simply open an html file on my hard drive. Not knowing the exact syntax and not getting any love on my first few tries, I instead launched Firefox and typed file://path/to/myfile.html in the address bar. However, instead of looking in 'path/to/myfile.html' Firefox is adding an extra slash and then reporting that it can't find '/path/to/myfile.html'. I've tried a few variations but don't seem to be able to get around this. Any suggesstions?

Izbrana rešitev

The file: protocol does take 3 slashes after the colon for some reason.

Does your shell allow you to right-click the file and open it in Firefox? This would be the quick and dirty way to discover the path Firefox prefers.

Preberite ta odgovor v kontekstu 👍 2

Vsi odgovori (4)

more options

Izbrana rešitev

The file: protocol does take 3 slashes after the colon for some reason.

Does your shell allow you to right-click the file and open it in Firefox? This would be the quick and dirty way to discover the path Firefox prefers.

more options

You can also drag the file in a Firefox window and drop the file on empty space on the Tab Bar or the new tab (+) button to see its URL in the location/address bar.

more options

Thanks @jscher2000. I figured it out about 1 minute after I posted my question -- I was just having a 'duh' moment.

Spremenil JoyShafer

more options

Thanks for your response. I'm using Unix without a shell, so no drag and drop love. I did figure out I can launch Firefox and open the file directly from the command line once I got the path right and added the slash at the front.