Page 1 of 1

Local html file won't open

Posted: Sat Jul 29, 2023 8:58 am
by Caramel

(EasyOS 5.4.8)

The opening of a local .html file by clicking don't work. The browser opens but the html page is not displayed. Tested with firefox as defaultbrowser and with chromium (via right-click menu)


Re: Opening of a local html file

Posted: Sat Jul 29, 2023 10:59 am
by BarryK

Local html files open ok for me. Tested left-click and right-click chromium and firefox. Running 5.4.8.

Try this in a terminal:

Code: Select all

# firefox /usr/share/doc/cups_shell.htm

Re: Opening of a local html file

Posted: Sat Jul 29, 2023 11:43 am
by Caramel
BarryK wrote: Sat Jul 29, 2023 10:59 am

Local html files open ok for me. Tested left-click and right-click chromium and firefox. Running 5.4.8.

Try this in a terminal:

Code: Select all

# firefox /usr/share/doc/cups_shell.htm

Works (if Firefox is closed, if not there is a message like "already in use")

The html files I tried with have spaces in their names (There are saved web pages). I don't know how to use them in a command line.


Re: Opening of a local html file

Posted: Sat Jul 29, 2023 12:32 pm
by n00b
Caramel wrote: Sat Jul 29, 2023 8:58 am

(EasyOS 5.4.8)

The opening of a local .html file by clicking don't work. The browser opens but the html page is not displayed. Tested with firefox as defaultbrowser and with chromium (via right-click menu)

Drag the file into the browser.


Re: Opening of a local html file

Posted: Sat Jul 29, 2023 1:36 pm
by Caramel
n00b wrote: Sat Jul 29, 2023 12:32 pm
Caramel wrote: Sat Jul 29, 2023 8:58 am

(EasyOS 5.4.8)

The opening of a local .html file by clicking don't work. The browser opens but the html page is not displayed. Tested with firefox as defaultbrowser and with chromium (via right-click menu)

Drag the file into the browser.

Good idea. It works well with Firefox and Chromium.


Re: Opening of a local html file

Posted: Sat Jul 29, 2023 2:29 pm
by BarryK

I can confirm, clicking on a html file with a space character, it doesn't open.

Which is odd. I created "/usr/share/doc/cups shell.htm"
When click on it, my understanding is that rox passes all of that as the $1 parameter, to /usr/local/bin/defaultbrowser

OK, inserted
echo "$1" > /tmp/zzz
into /usr/local/bin/defaultbrowser
Yes, the full filename is there.

Right, so Firefox and Chromium are rejecting a filename with a space character.

I edited /usr/local/bin/defaultbrowser, to substitute a space with %20:

Code: Select all

#!/bin/sh
P="$(echo -n "$1" | sed -e 's/ /%20/')"
exec chromium "$P"

Now it works.