When starting git-annex assistant with:
an unwanted web browser is opened.
How does one change the web browser with which the web interface is displayed?
The web browser is started by running the xdg-open program (or just open on Mac OS X).
xdg-open, in turn, runs the desktop environment's kde-open, gvfs-open, exo-open. Which browser these run is configured in the desktop environment's settings. Which is my goal for the web app; it should open the same browser that other applications in the desktop use.
When there's no desktop environment in use, xdg-open falls back to some default browser, or to what's configured by the BROWSER environment variable.
On my Ubuntu 10.04 machine, ./git-annex-webapp starts Firefox whereas xdg-open starts my configured standard browser, Chrome.
On my system, xdg-open http://google.com/ opens firefox as desired, but xdg-open file:///tmp/foo.html tries to load wine!
I'm using xfce, and it seems like exo-open is noticing the file:// URL, finding the mime type, and looking it up in ~/.local/share/applications/wine-extension-html.desktop, which was (annoyingly) created by wine. Deleting those files fixes it.
Not sure how you'd make this better. Maybe give xdg-open a URL like http://localhost:54896/?authfile=... that redirects to file:///tmp/webapp12345.html that redirects to http://localhost:54896/?auth=... ?
Since git web--browse defaults to firefox on my system (Ubuntu/XMonad), I did this on Ubuntu to get the system default browser.
git config --global web.browser xdg-open
Since I discovered the same behavior mentioned above (git annex webapp
tries to use 'winebrowser'). There is an easy way to work with the difference
url and html files: enter preferences for both:
Your preferred browser might be a different one off course. And I agree that this has to be the most logical place to store that information ever..