From: Nick H. <nic...@ho...> - 2011-02-25 14:01:46
|
doug wrote: > On 24/02/11 14:18, Nick Hall wrote: > <snip> >>> >>> How is webbrowser getting these paths? >>> >> >> It should be using the PATH environment variable. >> >> http://docs.python.org/library/webbrowser.html >> >> Nick. >> >>> Doug > > Finally solved it. > I guess if anybody else changes their browser for another they're > likely to run into the same problem, so I thought it might be worth > giving my details - at least to give some hints how it might be solved. > > > PATH variable wasn't useful - the only executable it gives access to > is the 64-bit firefox - not the one looked for by webbrowser. > But the BROWSER variable *is* > (http://docs.python.org/library/webbrowser.html) > > On my system (Mandriva 2009.1; Gnome) BROWSER variable is > "/usr/bin/www-browser". I don't know if this is Mandriva-specific. There will be some differences between operating systems. In Ubuntu, the BROWSER variable is not defined and the Gnome config only contains the command but not the path. So for Ubuntu the PATH variable will become important. It seems that users should first check the BROWSER variable and then the Gnome config. If full paths are not defined then check the PATH variable. Nick. > This script contains a line: > > ........... if [[ -n "$GNOME_DESKTOP_SESSION_ID" ]]; then > BROWSER=`gconftool -g /desktop/gnome/url-handlers/http/command | > sed -e 's/ %s//'`...................... > > (There are lines for KDE, XFCE, etc). > > "gconftool -g /desktop/gnome/url-handlers/http/command" > run in a terminal gives the output > /home/dougb/downloads/firefox-32/firefox "%s" - i.e. the out-of-date > browser path. > > So in Gnome > System=>Preferences=> Configuration > Editor=>desktop=>gnome=>url-handlers=>http > displays > (name)command.....................(value) > /home/dougb/downloads/firefox-32/firefox "%s". > Right clicking on the value gives the option Edit Key, and the > obsolete path can be corrected. > Re-running > gconftool -g /desktop/gnome/url-handlers/http/command > gives the updated path > And Gramps loads Google Maps properly. > > HTH > > Doug > > > |