KDE: how to detect default browser?

3

1

How does one detect/get the default browser on KDE? I know that on Gnome one can use "gconftool-2 -g /desktop/gnome/url-handlers/http/command" but what about KDE?

jldupont

Posted 2009-10-19T16:20:44.480

Reputation: 5 524

From within a program or script? Or manually from the shell? – innaM – 2009-10-19T16:26:02.830

Answers

2

There is a python script called webbrowser available which is a general purpose browser interface. It includes a 'get' function which returns a controller to the default browser, which I think you could convert into a test appropriate for whatever it is you're trying to do.

DaveParillo

Posted 2009-10-19T16:20:44.480

Reputation: 13 402

4

file ~/.kde/share/config/kdeglobals, section [General], line BrowserApplication

daxim

Posted 2009-10-19T16:20:44.480

Reputation: 1 072

It appears that this line no longer exists in current versions of KDE/Plasma. – Fopedush – 2018-11-14T16:23:21.480

It exists per user once you have done the configuration, see joe's answer below; otherwise see the system level configuration file /etc/xdg/kdeglobals. – daxim – 2018-11-14T16:45:18.977

It turned out that the .kde folder is named .kde4 on my system. Guess I didn't look very hard. Thanks! – Fopedush – 2018-11-15T19:56:53.323

1

Choose the KMenu-> Control Center -> KDE Components -> Component Chooser -> web browser. It should show the present default browser and allow you to change it if you wish.

joe

Posted 2009-10-19T16:20:44.480

Reputation: 11 615

In my Kubuntu 11.04 it's in System settings -> Default Applications -> Web browser. – Adobe – 2011-08-25T06:59:04.643

I am looking for a way to detect the default browser. – jldupont – 2009-10-19T17:22:01.703