bbidulock / icewm

A window manager designed for speed, usability, and consistency
Other
594 stars 99 forks source link

In installation Without any Browser the Browser icon in icewm Has No Effect. #318

Closed zhengqiang130 closed 1 year ago

zhengqiang130 commented 5 years ago

In icewm there is a browser icon in the menu bar. Clicking on that icon is having no effect. ~/.xsession-errors-:0 lists "x-www-browser: command not found" and the same for many alternatives, e.g. "firefox, iceweasel", etc.

/usr/bin/xdg-open: line 844: firefox: command not found /usr/bin/xdg-open: line 844: iceweasel: command not found /usr/bin/xdg-open: line 844: seamonkey: command not found /usr/bin/xdg-open: line 844: mozilla: command not found /usr/bin/xdg-open: line 844: epiphany: command not found /usr/bin/xdg-open: line 844: konqueror: command not found /usr/bin/xdg-open: line 844: chromium: command not found /usr/bin/xdg-open: line 844: chromium-browser: command not found /usr/bin/xdg-open: line 844: google-chrome: command not found /usr/bin/xdg-open: line 844: www-browser: command not found /usr/bin/xdg-open: line 844: links2: command not found /usr/bin/xdg-open: line 844: elinks: command not found /usr/bin/xdg-open: line 844: links: command not found /usr/bin/xdg-open: line 844: lynx: command not found /usr/bin/xdg-open: line 844: w3m: command not found xdg-open: no method available for opening 'about:blank'

bbidulock commented 5 years ago

Make sure you have PATH environment variable set properly before launching icewm: you're xdg-open is saying that it cannot find any of them by name.

zhengqiang130 commented 5 years ago

Make sure you have PATH environment variable set properly before launching icewm: you're xdg-open is saying that it cannot find any of them by name.

In this situation that there is no browser installed, whether the browser icon in the menu bar should not be displayed?

chuchingkai commented 5 years ago

IIUC, zhengqiang130 means that some distribution provides a minimal installation set which doesn't include any web browser application in it.

But /lib/toolbar is defined statically as:

prog "@XTERMCMD@" utilities-terminal @XTERMCMD@ prog "Web browser" web-browser xdg-open about:blank

So a Web browser icon is displayed in toolbar even though there is no web browser in your system. And there is no response if you click the icon.

I think the point of this issue is: Can icewm display toolbar icon dynamically?

chuchingkai commented 5 years ago

Another finding, if w3m is the only browser app in the system:

prog "Web browser" web-browser xdg-open any_valid_url

can't start w3m in the default terminal.

If I modified it as:

prog "Web browser" web-browser xterm -e xdg-open any_valid_url

it works.

gijsbers commented 5 years ago

Could you explain how you build your icewm? Using autoconf or cmake?

chuchingkai commented 5 years ago

Could you explain how you build your icewm? Using autoconf or cmake?

I tested this issue with openSUSE Leap 15.1 which uses autoconf. The version is icewm-1.4.2, you can find the build configuration via openSUSE Build System

chuchingkai commented 5 years ago

Another finding, if w3m is the only browser app in the system:

prog "Web browser" web-browser xdg-open any_valid_url

can't start w3m in the default terminal.

It turns out the output of w3m was directed to journal logs: icewm-w3m-toolbar

icewm doesn't know how to handle w3m, one simple workaround is as below

If I modified it as:

prog "Web browser" web-browser xterm -e xdg-open any_valid_url

it works.

But we can also add a w3mCommand just like cupCommand and mailCommand

bbidulock commented 5 years ago

Why not use xdg-launch? You can then launch any browser, including a console based one with a proper .desktop file using the command

xdg-launch text/html