Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

2
Become a Fan
7.9

Available as/for:
Description:
One Problem and simple idea:

- I have six browsers installed on my opensuse

- When I press an hiperlink on a message kde run my "favorite browser" (ex: Firefox)

- Ok. But if I have running GoogleChrome or Opera.. why not open the link in this brownser?
Now I have three browser: Chrome, Opera an my "little less favorite" Firefox.

Solution
- I set a very simple bash script like a Favorite browser.
When this script received a url to open, check the active current brownser and pass at the last the url... and with a last option is launch the favorite browser.

Now my GNU/Linux/opensuse is much faster and do not open more one browser.

The script content is:
#+++++++++++++++++++++++++++++++++
#!/bin/sh
CHROME_BIN="/usr/bin/google-chrome"
FIREFOX_BIN="/usr/bin/firefox"
KONQUEROR_BIN="/usr/bin/konqueror"
OPERA_BIN="/usr/bin/opera"
FLOCK_BIN="/usr/bin/flock"

FAVORITE=$CHROME_BIN

if [ "`pidof $OPERA_BIN`" != "" ]; then
FAVORITE=$OPERA_BIN
PARAMETERS=""
fi

if [ "`pidof $KONQUEROR_BIN`" != "" ]; then
FAVORITE="qdbus `qdbus | grep konqueror` /konqueror/MainWindow_1 org.kde.Konqueror.MainWindow.newTab"
PARAMETERS="False"
fi

if [ "`pidof $FLOCK_BIN-bin`" != "" ]; then
FAVORITE=$FLOCK_BIN-browser
PARAMETERS=""
fi

if [ "`pidof $FIREFOX_BIN-bin`" != "" ]; then
FAVORITE=$FIREFOX_BIN
PARAMETERS=""
fi

if [ "`pidof $CHROME_BIN`" != "" ]; then
FAVORITE=$CHROME_BIN
PARAMETERS=""
fi

$FAVORITE "$1" $PARAMETERS
#+++++++++++++++++++++++++++++++++


INSTALL
- Save the download (or above content) in your /usr/bin/one_simple_browser
- make chmod +x /usr/bin/one_simple_browser
- (Check it the paths of your system)
- Set "one_simple_browser" with "Predefined browser" in kcmshell4 componentchooser
- Set "one_simple_browser" like "Default browser" in Choqok and others.
- Is simple

Regards.
Sorry my poor english, I hope you understand me.
Last changelog:

0.1: Presentation

0.2: Modification for force to Konqueror open URL in new tab, better new window.

0.2.1 A little bug with opcion PARAMETERS, Solved!


Ratings & Comments

5 Comments

matrs5

I totally agree with you and your "multi browser problem". I'll test this in fedora

adundovi

Really great idea! On F14 it works after few adjustments: * pidof returns only process names, not full path, so I left only program names in script. * remove "-bin" suffix from Firefox

trebol-a

Thanks to you, Saleel and everybody. I think this is a interesting improvement for KDE (u other) and enhances the user desktop experience.

Saleel

This is really great! I personally use chromium as my browser and encourage others to use firefox when on my system, but since the chromium is default if they click a link/use krunner; chromium pops up. Something like this is a very elegant way of solving this issue. Thanks a million.

Syvolc

Very good idea ! Thanks for your contribution.

Pling
0 Affiliates
Details
license
version 0.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

More Various KDE 1.-4. Improvements from trebol-a:

MPlayerThumbs horizontal
trebol-a
last update date: 17 years ago

Score 5.0

Kflickr MOCKUP
trebol-a
last update date: 18 years ago

Score 5.0

Other Various KDE 1.-4. Improvements:

Slicker Debian Package for Woody
cirrusgr
last update date: 22 years ago

Score 5.0

Konqueror/kdesktop suggestion
PovMan
last update date: 22 years ago

Score 5.0

Biiig buttons
dbojan
last update date: 20 years ago

Score 5.0

Yet Another KControl
Frans
last update date: 21 years ago

Score 5.0

Next window and next/previos window
dbojan
last update date: 20 years ago

Score 5.0

Fantasie Toolbar
katoe
last update date: 19 years ago

Score 5.0