Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting Firefox as default browser in KDE
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pookey
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2003
Posts: 88
Location: UK

PostPosted: Wed May 26, 2004 8:46 am    Post subject: Setting Firefox as default browser in KDE Reply with quote

For ages I have been copying URLs from emails/IM messages into clipboard, and manually opening the site in firefox, but today I got fed up and decided to change the default browser. It's mostly trivial to do, but here is how it's done!

firstly, we need a script to open firefox if it's not already open, and if it is, open the URL in a new tab. Thanks to Theo for this little script.
Code:

$ cat /usr/local/bin/firefox-from-kde
#!/bin/bash

export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirefox"
FIREBIRD_PATH="/usr/lib/MozillaFirefox"

if [ -z "`/bin/ps x | /bin/grep \"[0-9] ${FIREBIRD_PATH}/firefox-bin\"`" ]; then
    # No MozillaFirebird running
    ${FIREBIRD_PATH}/firefox $@
else
    # MozillaFirebird running - open a new window
    ${FIREBIRD_PATH}/firefox -remote "openURL($@ ,new-tab)"
fi


Now, go to cthe KDE Contol Center > KDE Components > File Association > text > html. Click 'add' and configure it to open the above script, with a parameter of %u. One final step, is to disable launch feedback from within the 'Advanced' section (under the application tab).

Hope this helps someone!

Pookey!
Back to top
View user's profile Send private message
SubAtomic
Apprentice
Apprentice


Joined: 20 Dec 2003
Posts: 255
Location: Hobart, TAS, Australia

PostPosted: Wed May 26, 2004 1:46 pm    Post subject: Reply with quote

It has helped.
Thanks.
_________________
"The real romance is out ahead and yet to come. The computer revolution hasn't started yet. Don't be misled by the enormous flow of money into bad defacto standards for unsophisticated buyers using poor adaptations of incomplete ideas." -- Alan Kay
Back to top
View user's profile Send private message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Sat Jun 05, 2004 10:31 am    Post subject: Re: Setting Firefox as default browser in KDE Reply with quote

What's the use of the following line ?
Code:
export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirefox"

_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
pookey
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2003
Posts: 88
Location: UK

PostPosted: Fri Jun 16, 2006 1:09 am    Post subject: Reply with quote

updated script...

Code:

#!/bin/bash
FIREBIRD_PATH="/opt/firefox/"
if [ -z "`/bin/ps x | /bin/grep \"[0-9] ${FIREBIRD_PATH}/firefox-bin\"`" ]; then
    ${FIREBIRD_PATH}/firefox $@
else
    ${FIREBIRD_PATH}/firefox -remote "openURL($@ ,new-tab)"
fi
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Fri Jun 16, 2006 1:35 am    Post subject: Reply with quote

Doesn't setting firefox as the default web browser in Kcontrol -> KDE Components -> Component Chooser -> Web Browser work?
Back to top
View user's profile Send private message
pookey
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2003
Posts: 88
Location: UK

PostPosted: Fri Jun 16, 2006 1:54 am    Post subject: Reply with quote

perhaps... does that open things in new tabs? I don't know... a friend updated this script and gave it back, so I though I would update the page :)
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Fri Jun 16, 2006 2:04 am    Post subject: Reply with quote

pookey wrote:
perhaps... does that open things in new tabs? I don't know... a friend updated this script and gave it back, so I though I would update the page :)

This is set in firefox's preferences.

Once enabled it works fine. (No scripts needed)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum