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

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

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

  • 4 antwoorden
  • 2 hebben dit probleem
  • 927 weergaven
  • Laatste antwoord van 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?

Gekozen oplossing

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.

Dit antwoord in context lezen 👍 2

Alle antwoorden (4)

more options

Gekozen oplossing

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.

Bewerkt door JoyShafer op

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.