Ticket UUID: | 8bc2549cedcd599556bbaf131f03b96588701f20 | ||
Title: | "fossil ui" expects firefox to exist | ||
Status: | Fixed | Type: | Code_Defect |
Severity: | Minor | Priority: | |
Subsystem: | Resolution: | Fixed | |
Last Modified: | 2009-07-29 13:10:22 | ||
Version Found In: | 879e8c5f32 | ||
Description & Comments: | |||
djbclark@tux:~/gnupure$ fossil ui gnupure.fossil-scm sh: firefox: not found (hangs) It would be good if fossil had a built-in list of web browsers to search for in the user's $PATH. Debian, Ubuntu, gNewSense, and probably other .deb-based GNU/Linux distributions have the concept of the alternatives system - "x-www-browser" exists, which the user can set to be whatever they want, but usually has a sane default. So IMHO a good order to try would be: x-www-browser icecat iceweasel firefox konqueror dillo www-browser elinks links2 links-hacked links w3m lynx Reasoning: If x-www-browser exists, it should be what the user wants to use. If icecat exists, it is most likely because the user has made a choice to use it, as it's not default in any distros I know of. If iceweasel exists, firefox probably doesn't, as it is usually just in Debian instead of firefox. Next, firefox, then if that doesn't exist, try KDE's browser, konqueror, and then dillo, a lightweight browser which is the only option on some USB/CD bootable distributions. If none of those exist, the user may be on a box without X-Windows; try www-browser, which should be what the user wants to use, followed by the web browsers that can do full-screen GUI to frame buffer, elinks, links2, links-hacked, and links, followed by text-only web browsers, w3m and lynx. drh added on 2009-04-18 19:21:49: Note, however, that as a work-around, you can say: fossil setting web-browser WHATEVER -global Do the above once, and be forevermore happy. anonymous claiming to be lRem added on 2009-04-20 15:06:10: kfmclient exec 'http://lrem.net'Or its GNOME counterpart. This is the native way of using the browser the user chose in his system settings. anonymous claiming to be lRem added on 2009-04-20 15:10:52: gnome-open 'http://lrem.net/'One of these is expected to fail in normal circumstances. bharder added on 2009-04-21 18:32:14: drh added on 2009-04-21 19:16:39: anonymous claiming to be lRem added on 2009-07-08 18:47:08: xdg-open http://lrem.net/And there you have my home site in your favorite browser ;) If you still want some code that keeps falling back until it finds something I can just write that. But I personally don't believe that we need such boilerplate. drh added on 2009-07-08 19:41:01: I think what we really need here is a little subroutine that tries several different commands to launch the web browser, and keeps trying until it finds one that works. Perhaps "xdg-open" is what it tries first, but "firefox" needs to be on the list somewhere. What else do we try? drh added on 2009-07-29 13:10:22: |