How do I set a "custom" browser as default in Preferred Applications

I'm trying to set up Conkeror as my default browser. However, in the Preferred Applications menu, this is not an option, nor do I see a method of inputting a custom setting/command.

Does anyone know a way round this?

[Edit: I've tried (1) using sudo update-alternatives --config x-www-browser as well as using gconf-editor to edit /desktop/gnome/url-handlers/http, /desktop/gnome/url-handlers/https, /desktop/gnome/applications/browser/exec. Neither of these seems to work. ]


Solution 1:

sudo update-alternatives --config x-www-browser

Result shoud be:

There are 3 choices for the alternative x-www-browser 
(providing /usr/bin/x-www-browser).

  Selection    Path                       Priority   Status
------------------------------------------------------------
* 0            /usr/bin/xlinks2            69        auto mode
  1            /usr/bin/chromium-browser   40        manual mode
  2            /usr/bin/firefox            40        manual mode
  3            /usr/bin/xlinks2            69        manual mode

Press enter to keep the current choice[*], or type selection number: 

But you will have conkeror too.

Result after choosing 1:

update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/x-www-browser (x-www-browser) in manual mode.

Solution 2:

On my 10.10, there are a number of gnome configuration key called

/desktop/gnome/url-handlers/http
/desktop/gnome/url-handlers/https
/desktop/gnome/applications/browser/exec

which you can change to a point to a different browser. Use gconf-editor to make the changes. I can't say if the same applies to 11.04. What you could try is to search for "firefox" (or whatever is set as your default browser), again in gconf-editor, and change all the relevant entries.

Solution 3:

Since I have the same problem and no one mentioned it, I am going to mention setting:

update-alternatives --install /usr/bin/gnome-www-browser  gnome-www-browser conkeror

That is what is used by /usr/bin/sensible-browser, the default in:

/desktop/gnome/url_handlers/http
/desktop/gnome/url-handlers/https
/desktop/gnome/applications/browser/exec

Conkeror still doesn't show up in the default applications dialog though.

EDIT: Solved it with this .desktop file:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=conkeror.png
Name=Conkeror
Comment=Emacs like Web Browser
GenericName=Web Browser
Exec=conkeror.sh %u
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;

From here:

https://bugs.launchpad.net/ubuntu/natty/+source/gnome-control-center/+bug/708382/comments/4

https://bugs.launchpad.net/ubuntu/natty/+source/gnome-control-center/+bug/708382