On a Gnome 2.6 system, xemacs should be opening URLs with the default
Gnome browser, which is (now) accessed via the "gnome-open" program.
The bad behavior I'm seeing is that I had
browse-url-browser-function set to browse-url-gnome-moz,
and my URLs were getting loaded in "mozilla" despite my default
browser being set to "firefox".
It seems to work ok if you use "htmlview" instead of "gnome-open",
but I don't know how portable that is, or whether htmlview is considered
to be deprecated... I've been told that "gnome-open" is the party line
way to do this now.
So:
- currently, browse-url-gnome-moz uses the program "gnome-moz-remote"
- "gnome-moz-remote" is how you open URLs in Gnome 1.4
- "gnome-url-show" is how you open URLs in Gnome 2.2
- "gnome-open" is how you open URLs in Gnome 2.4 and 2.6
- "gnome-open" does not take a "--newwin" argument (that behavior
is
a global Gnome preference, somewhere)
- on my FC3 (Gnome 2.6) system, "gnome-moz-remote" launches
"mozilla"
instead of "firefox", even though firefox is set as my default
browser in Gnome. "gnome-open" does the right thing.
- (setq browse-url-gnome-moz-program "gnome-open") doesn't work
because of the --newwin thing. (I guess setting
browse-url-new-window-flag to nil might fix that.)
Now here's the fucked up part:
- (setq browse-url-generic-program "gnome-moz") doesn't work
for mysterious reasons. Particularly,
(start-process "blah" nil "gnome-open"
"http://www.google.com/")
does not cause a window to appear, but
(start-process "blah" nil "/tmp/foo"
"http://www.google.com/")
does, where /tmp/foo is
#!/bin/sh
/usr/bin/gnome-open "$@"
sleep 1
so I don't know if this is an xemacs problem or a gnome-open
problem, but somehow it's dying prematurely when launched in
the way that start-process launches it.
- (shell-command-on-region 1 1 "gnome-open
http://www.google.com/")
works fine, however.
--
Jamie Zawinski jwz(a)jwz.org
http://www.jwz.org/
jwz(a)dnalounge.com
http://www.dnalounge.com/
http://jwz.livejournal.com/