Why does Chrome not stay as the default browser in Xubuntu 13.04?
If I go to Settings Manager > Preferred Applications and make Chrome (or chromium-browser; there are entries for both!) the default browser, then logout or reboot and come back, the default browser is null again. The same happens if I click a URL in another application (eg Thunderbird); it says I have no default browser set. If I set it to Chrome, it works for the session, but reverts to unset afterwards. Is there some other place it must be set?
The underlying problem is reported here:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/902661
Chrome and Chromium do not play nicely in the xfce4 environment, and will corrupt the xfce4 settings for web browser in Preferred Applications. Simply tell Chrom{e,ium} not to ask you any more, then set the default settings through Settings Manager > Preferred Applications
.
A way to set the default browser system-wide, inherited from Debian, is to set a default browser as the system "alternative". "alternatives" is a convention introduced in Debian GNU/Linux to handle concurrent applications for the same task, i.e. Firefox and Links for web brosing.
Set the alternative on the terminal by running:
sudo update-alternatives --set x-www-browser /usr/bin/chromium
and I believe recently they also came up with the gnome-browser, so run:
sudo update-alternatives --set gnome-www-browser /usr/bin/chromium
This modifies the symlink infrastructure, which you find in /etc/alternatives. Your desktop environment should make use of these settings (that doesn't mean it does).
Your experience (with the setting beeing temporary) suggests, that your desktop environment uses an environment variable, to make the setting known. Run "env |sort" in a terminal once before making the setting in your settings-manager and once after, and compare the outputs.
I suspect (without knowing) that the settings-manager introduces some variable, maybe something like XDG_BROWSER=/usr/bin/chromium. You should be able to see the details. Create the file .xinitrc in your home directory, make it executable and modify its content to read:
export XDG_BROWSER=/usr/bin/chromium
(or whatever the environment variable was)
But try the update-alternatives aproach first, maybe this is enough.
I think I have an answer to an old question that still persists in xubuntu 14.0.4. Put this in the preferred applications (found in "all settings".
/usr/bin/google-chrome-stable %U
The way I found this was right clicking the icon for applications and chose edit applications. I'm guessing most of you know it from here.