Author Topic: Change default browser in openbox [Solved]  (Read 5341 times)

Hootiegibbon

  • Guest
Re: Change default browser in openbox
« Reply #15 on: October 23, 2011, 06:59:40 AM »
This was done on my Openbox installation:

[darrel@Duron ~]$ update-alternatives --config x-www-browser
No alternatives for x-www-browser.
update-alternatives: unable to open /var/lib/rpm/alternatives/x-www-browser.rpm-new for write: Permission denied
[darrel@Duron ~]$ su
Password:
[root@Duron darrel]# update-alternatives --config x-www-browser
No alternatives for x-www-browser.
[root@Duron darrel]#

If Neal's method doesn't work, try adding export BROWSER="/usr/bin/google-chrome" to the end of your ~/.bashrc file. I'm not sure of the path or executable filename for Chromium, so you'll have to substitute it for "/usr/bin/google-chrome". I believe this should work for LXDE, as well.




ok I was intregued by this and have been attempting to understand update-alternatives for some time
so I decided to have another look

the /etc/alternatives/ directory lists all kinds of symlinks to existing apps

the update-alternatives app controls which of these symlinks is in which group of apps eg x-www-browser (or editor etc)

The issue I was geting is that no alterntives were being listed, I also noted that in /etc/alternatives/ that no browsers were listed

So I opened a terminal (I have been using "vte --reverse -A -D -f Tamsyn"  of late) su to root and cd /etc/alternatives/ and started up mc
 
in mc I navigated the first pane to /usr/bin/ and selected my browser xxxterm and selected teh symlink option which placed a symlink into the second pane (still at /etc/alternatives)

I tried update-alternatives --config x-www-browser which failed again...

Reading the --help and the man page for update-alternatives it seems that you need to add the application to the catagory by using the --install option and giving it a priority

I elected to use

 update-alternatives --install /etc/alternatives/ x-www-browser /usr/bin/xxxterm 90
 
now when I use  

 update-alternatives --config x-www-browser

I get the following

Quote
# update-alternatives --config x-www-browser

There is only 1 program which provides x-www-browser
(/usr/bin/xxxterm). Nothing to configure.

and when I use update-alternatives --list x-www-browser

Quote
# update-alternatives --list x-www-browser
/usr/bin/xxxterm

So whether the inclusion of a symlink at rpm-build time may assist or not is an unknown element - does update alternatives --install get run by apt at application install time?

I have yet to run any tests to see if this has worked on a practical basis or not

Hope this helps get to a solution for non-DE setups.

Jase



Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Change default browser in openbox
« Reply #16 on: October 23, 2011, 05:57:02 PM »
That's good stuff, Jase and Neal. I know this Chromium non-default browser topic has come up before. So, I'm now very curious as to what the final outcome will be. I don't use Chromium, and I had problems with Iron-Browser running on a Duron CPU.

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline kc1di

  • Sr. Member
  • ****
  • Posts: 484
  • Morse Code early digital communication medium!
Re: Change default browser in openbox
« Reply #17 on: October 24, 2011, 11:23:22 AM »
Got it!!  Found the answer here - http://www.andyheasman.com/linux/cookbook.htm.  Make sure gconf is installed, then launch Chromium from the terminal with "GNOME_DESKTOP_SESSION_ID=1 chromium-browser".  Chromium will launch with a pulldown menu that asks if you want it to be the default browser.  Click yes and all will be set.  Now links in Thunderbird open automatically in Chromium!  Give it a go - it worked for me.  Solves a minor irritant I've been putting up with for some time.

Note - kc1di - no such thing as a silly question ;D.  Well done.     


Thanks Taco 22 that works.  slypheed still calls Firefox but thunderbird work with Chromium will have to look into why slypheed does not call chromium. but I will be using thunderbird most of the time anyway.

Dave :)
Dave KC1DI Living somewhere in Maine USA
Morse Code and early digital mode
John 3:16
Registered Linux User #462608

Offline kc1di

  • Sr. Member
  • ****
  • Posts: 484
  • Morse Code early digital communication medium!
Re: Change default browser in openbox [Solved]
« Reply #18 on: October 24, 2011, 11:35:39 AM »
Found the answer in slypheed also.
you have to set chromium as the default in the mail program by going to

 check that you have configured your web browser correctly in Configuration->Common preferences...-> Details->External commands. and entering the command
Code: [Select]
chromium-browser %s
Then it will call chromium as the linked browser.
Cheers.
Dave :)
Dave KC1DI Living somewhere in Maine USA
Morse Code and early digital mode
John 3:16
Registered Linux User #462608

Offline melodie

  • Hero Member
  • *****
  • Posts: 5946
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: Change default browser in openbox [Solved]
« Reply #19 on: November 01, 2011, 02:29:08 PM »
Hi,

Why Sylpheed doesn't : very simple, Sylpheed has it's own configuration section. See in this screenshot:



:)

For me it opens the one I want, in a new tab. If you want to open in a new window then you don't want the tab part. All this is in the Sylpheed FAQ : look in Sylpheed menu "Help > FAQ".

Dave : Ok, I see you finally found out... I leave the screenshot anyway ! ^^
« Last Edit: November 01, 2011, 02:31:20 PM by melodie »
melodie at #lpic-fr on irc.freenode.net