Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help command should check browser tool's return value #3468

Closed
ntrel opened this issue Apr 25, 2023 · 8 comments
Closed

Help command should check browser tool's return value #3468

ntrel opened this issue Apr 25, 2023 · 8 comments
Milestone

Comments

@ntrel
Copy link
Member

ntrel commented Apr 25, 2023

The Help command does not work on my Linux Mint 21 system, because BROWSER env variable is not set so sensible-browser does nothing. At minimum, the Help command should report an error when the return value is non-zero.

However, my system does have a preferred browser set to firefox - I'm not sure if this is part of a (freedesktop.org?) standard. Ideally Geany would use that as the default browser tool. Or is that moving to $BROWSER instead?

@ntrel
Copy link
Member Author

ntrel commented Apr 25, 2023

Maybe we should use xdg-open instead?

Edit: I suppose that's not portable enough.

@ntrel
Copy link
Member Author

ntrel commented Apr 25, 2023

BROWSER env variable is not set so sensible-browser does nothing

Hmm just realized Geany defaults to Firefox, Ubuntu must have overridden it (and Mint is using the Ubuntu package).

@ntrel ntrel changed the title Help not working; sensible-browser and system default Help command should check browser tool's return value Apr 25, 2023
@elextr
Copy link
Member

elextr commented Apr 25, 2023

Hmm just realized Geany defaults to Firefox, Ubuntu must have overridden it (and Mint is using the Ubuntu package).

For a Geany built from git on LM I get "sensible-browser" in the preference. So its probably not Ubuntu, somehow Geany build selects that value, but I ran out of time to find how/where.

But help does work for me (opening in the preferred browser, chrome, selected in the LM desktop "Preferred applications" dialog).

@elextr
Copy link
Member

elextr commented Apr 26, 2023

Note #2444 #3178 as well.

@elextr
Copy link
Member

elextr commented Apr 26, 2023

For a Geany built from git on LM I get "sensible-browser" in the preference. So its probably not Ubuntu, somehow Geany build selects that value, but I ran out of time to find how/where.

Hmmm, no actual solution, but I ran the built from git Geany with a non-existant config dir, and it switched the settings back to usual defaults:

x-terminal-emulator -> xterm
sensible-browser -> firefox

and now Help runs firefox but does not work because I didn't build the local doco so its looking for https://www.geany.org/manual/1.39/index.html which of course does not exist. @ntrel Is that your problem?

As to how the setting values above got into the local config ~/git-geany/config from the default config ~/.config/geany I don't know. Maybe a GP plugin does something wrong, will check later.

@elextr
Copy link
Member

elextr commented Apr 26, 2023

Ahhh, I figured it out, when I ran the wrong version of geany (see #3451) specifying this config it probably wrote the LM system defaults. Nothing a quick delete won't fix :-). So yes its Ubuntu that sets those values for terminal and browser, but thats totally allowable for distros to do that, they may not provide xterm or firefox by default.

@ntrel I totally agree that results should be checked, but I'm not sure what Geany can do if it detects failure (except write some message to debug).

Possibly one of the solutions from #2444 or #3178 might be better than fixed values, security oriented distros, lightweight distros, libre oriented distros, all commonly change the browser (even if its a de-trademarked firefox, its name changes). I wouldn't worry if the solution is Linux specific, windows and mac are #ifdefed anyway.

And users (me for eg) often prefer different browsers.

@eht16
Copy link
Member

eht16 commented Oct 15, 2023

I think we can close this now since #3178 is merged.
@ntrel when use start current GIT master Geany with a fresh config, will it use the correct browser?

FTR, the "sensible-browser" default is patched in by Debian (and Ubuntu inherits this change). As pointed out earlier, Geany had the default "firefox" but now it uses GTK to find the system's default browser.

@ntrel
Copy link
Member Author

ntrel commented Apr 5, 2024

@eht16 Yep, works now (at least on latest Linux Mint anyway) - thanks! Sorry for the late reply.

@ntrel ntrel closed this as completed Apr 5, 2024
@ntrel ntrel reopened this Apr 5, 2024
@eht16 eht16 closed this as completed Apr 21, 2024
@b4n b4n added this to the 2.0 milestone Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants