Where is default browser set?

classic Classic list List threaded Threaded
70 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Where is default browser set?

L A Walsh
Let me rephrase a previous Q --

When some program tries to show a URL, it invokes
your "default browser".  How does it know what your
default browser is and where is that set?

Is it a symlink somewhere in your home directory,
or a text file with the browser name in it?  Or what?

Thanks!
linda


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Patrick Shanahan-2
* L A Walsh <[hidden email]> [06-13-17 15:36]:
> Let me rephrase a previous Q --
>
> When some program tries to show a URL, it invokes
> your "default browser".  How does it know what your
> default browser is and where is that set?
>
> Is it a symlink somewhere in your home directory,
> or a text file with the browser name in it?  Or what?

not knowing what desktop you are using and knowing that it may be
completely home-grown, in kde/plasma5 you set it with systemsettings5 -->
applications --> default applications --> web browser

in xfce it is something similar but not systemsettings5.  
--
(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri
Registered Linux User #207535                    @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo                    paka @ IRCnet freenode

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Carlos E. R.-2
On 2017-06-13 22:47, Patrick Shanahan wrote:

> * L A Walsh <[hidden email]> [06-13-17 15:36]:
>> Let me rephrase a previous Q --
>>
>> When some program tries to show a URL, it invokes
>> your "default browser".  How does it know what your
>> default browser is and where is that set?
>>
>> Is it a symlink somewhere in your home directory,
>> or a text file with the browser name in it?  Or what?
>
> not knowing what desktop you are using and knowing that it may be
> completely home-grown, in kde/plasma5 you set it with systemsettings5 -->
> applications --> default applications --> web browser
>
> in xfce it is something similar but not systemsettings5.  
But maybe it can be queried somehow across desktops. :-?

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

John Andersen-2
On 06/13/2017 01:51 PM, Carlos E. R. wrote:
>> in xfce it is something similar but not systemsettings5.  
> But maybe it can be queried somehow across desktops. :-?

I would hope not.

Look, linda needs a single site solution.  This doesn't have
to be a world generic solution.

She can build and ship the entire command line or what ever she
needs.  The command line can query and environmental or use any
number of means to accomplish this, even if it needs custom tweaks
on each desk.

--
After all is said and done, more is said than done.


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Knurpht - Gertjan Lettink
Op dinsdag 13 juni 2017 23:17:27 CEST schreef John Andersen:

> On 06/13/2017 01:51 PM, Carlos E. R. wrote:
> >> in xfce it is something similar but not systemsettings5.
> >
> > But maybe it can be queried somehow across desktops. :-?
>
> I would hope not.
>
> Look, linda needs a single site solution.  This doesn't have
> to be a world generic solution.
>
> She can build and ship the entire command line or what ever she
> needs.  The command line can query and environmental or use any
> number of means to accomplish this, even if it needs custom tweaks
> on each desk.

A 'grep -i browser ~/.config/*' results in
kdeglobals:BrowserApplication=google-chrome.desktop
which is ( on this machine ) the default browser.

--
Gertjan Lettink, a.k.a. Knurpht

openSUSE Board Member
openSUSE Forums Team

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Carlos E. R.-2
On 2017-06-14 00:13, Knurpht - Gertjan Lettink wrote:
> Op dinsdag 13 juni 2017 23:17:27 CEST schreef John Andersen:
>> On 06/13/2017 01:51 PM, Carlos E. R. wrote:
>>>> in xfce it is something similar but not systemsettings5.
>>>
>>> But maybe it can be queried somehow across desktops. :-?
>>
>> I would hope not.

Why not?

>> Look, linda needs a single site solution.  This doesn't have
>> to be a world generic solution.

It would help others.

>> She can build and ship the entire command line or what ever she
>> needs.  The command line can query and environmental or use any
>> number of means to accomplish this, even if it needs custom tweaks
>> on each desk.
>
> A 'grep -i browser ~/.config/*' results in
> kdeglobals:BrowserApplication=google-chrome.desktop
> which is ( on this machine ) the default browser.
>

Here it finds nothing. I use XFCE, but KDE is also installed.

cer@Telcontar:~> grep -i browser ~/.config/*
grep: /home/cer/.config/Chris Giles: Is a directory
grep: /home/cer/.config/Clementine: Is a directory
grep: /home/cer/.config/DjVuLibre: Is a directory
grep: /home/cer/.config/Empathy: Is a directory
grep: /home/cer/.config/FGx: Is a directory
grep: /home/cer/.config/LyX: Is a directory
...

grep: /home/cer/.config/Thunar: Is a directory
/home/cer/.config/Trolltech.conf:usr\lib64\kde4\kget_browser_integration.so=40704, 0, x86_64 linux g++-4 full-config, 2011-10-30T09:28:49
/home/cer/.config/Trolltech.conf:usr\lib64\kde4\krunner_browserhistory.so=40704, 0, x86_64 linux g++-4 full-config, 2011-10-30T09:57:21
/home/cer/.config/Trolltech.conf:usr\lib64\kde4\kget_browser_integration.so=40805, 0, x86_64 linux g++-4 full-config, 2016-05-09T09:56:33

...

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Felix Miata-3
In reply to this post by L A Walsh
L A Walsh composed on 2017-06-13 12:34 (UTC-0700):

> Let me rephrase a previous Q --
.
> When some program tries to show a URL, it invokes
> your "default browser".  How does it know what your
> default browser is and where is that set?
.
> Is it a symlink somewhere in your home directory,
> or a text file with the browser name in it?  Or what?
.
IMO, looks like, unless you are using Plasma, in which case Knurpht already
answered for it specifically, a good starting point is here:
https://wiki.archlinux.org/index.php/Default_applications
which indicates WRT XDG compliant DEs/WMs:

~/.config/mimeapps.list is for user overrides
/etc/xdg/mimeapps.list is for global overrides
/usr/share/applications/mimeapps.list is for distro defaults

e.g., for Chrome web browser to override de/distro/global HTML file default of
Firefox:

file:
        ~/.local/share/applications/mimeapps.list
content:
        [Default Applications]
        text/html=google-chrome.desktop
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Dave Howorth-3
In reply to this post by Carlos E. R.-2
On Wed, 14 Jun 2017 00:20:26 +0200
"Carlos E. R." <[hidden email]> wrote:

> On 2017-06-14 00:13, Knurpht - Gertjan Lettink wrote:
> > Op dinsdag 13 juni 2017 23:17:27 CEST schreef John Andersen:  
> >> On 06/13/2017 01:51 PM, Carlos E. R. wrote:  
> >>>> in xfce it is something similar but not systemsettings5.  
> >>>
> >>> But maybe it can be queried somehow across desktops. :-?  
> >>
> >> I would hope not.  
>
> Why not?
>
> >> Look, linda needs a single site solution.  This doesn't have
> >> to be a world generic solution.  
>
> It would help others.
>
> >> She can build and ship the entire command line or what ever she
> >> needs.  The command line can query and environmental or use any
> >> number of means to accomplish this, even if it needs custom tweaks
> >> on each desk.  
> >
> > A 'grep -i browser ~/.config/*' results in
> > kdeglobals:BrowserApplication=google-chrome.desktop
> > which is ( on this machine ) the default browser.
> >  
>
> Here it finds nothing. I use XFCE, but KDE is also installed.

Here it finds nothing also - just a bunch of Is a directory errors.
grep -ir shows lots of hits - too many for my terminal history to
scroll back through. A lot of the hits seem to be due to chromium,
which is NOT my default browser. So I think the technique requires some
refinement.

I run an LXDE desktop.

Cheers, Dave

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

James Knott
In reply to this post by L A Walsh
On 06/13/2017 03:34 PM, L A Walsh wrote:

> Let me rephrase a previous Q --
>
> When some program tries to show a URL, it invokes
> your "default browser".  How does it know what your
> default browser is and where is that set?
>
> Is it a symlink somewhere in your home directory,
> or a text file with the browser name in it?  Or what?
>
>

In Desktop settings > Personalization > Applications



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Carlos E. R.-2
On 2017-06-14 03:23, James Knott wrote:

> On 06/13/2017 03:34 PM, L A Walsh wrote:
>> Let me rephrase a previous Q --
>>
>> When some program tries to show a URL, it invokes
>> your "default browser".  How does it know what your
>> default browser is and where is that set?
>>
>> Is it a symlink somewhere in your home directory,
>> or a text file with the browser name in it?  Or what?
>>
>>
>
> In Desktop settings > Personalization > Applications
But how does an application that wants to call the default browser know
which one it is? The above is how does the user set it up. The question
is how does an application know.

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Anton Aylward-2
In reply to this post by L A Walsh
On 13/06/17 03:34 PM, L A Walsh wrote:

> Let me rephrase a previous Q --
>
> When some program tries to show a URL, it invokes
> your "default browser".  How does it know what your
> default browser is and where is that set?
>
> Is it a symlink somewhere in your home directory,
> or a text file with the browser name in it?  Or what?
>
> Thanks!
> linda
>
>


in many of the situations, what happens is xdg-open is called:

EG: xdg-open 'http://www.freedesktop.org/'

Opens the freedesktop.org website in the user's default browser.

xdg-open /tmp/foobar.png

Opens the PNG image file /tmp/foobar.png in the user's default image viewing
application.

RTFM.

Of course typing a the command prompt

        xdg<tab> shows a fe more, like

> xdg-settings --help
xdg-settings ? get various settings from the desktop environment

Synopsis

xdg-settings { get | check | set } {property} [subproperty] [value]

xdg-settings { --help | --list | --manual | --version }

Use 'man xdg-settings' or 'xdg-settings --manual' for additional info.


And hence

> xdg-settings --list
Known properties:
  default-url-scheme-handler    Default handler for URL scheme
  default-web-browser           Default web browser

and so, onto

> xdg-settings get default-web-browser
firefox

WOW.
And that works regardless of the DM I'm using.
WOW!

--
         A: Yes.
     >   Q: Are you sure?
     >>  A: Because it reverses the logical flow of conversation.
     >>> Q: Why is top posting frowned upon?


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Carlos E. R.-2
On 2017-06-14 03:39, Anton Aylward wrote:

> On 13/06/17 03:34 PM, L A Walsh wrote:
>> Let me rephrase a previous Q --
>>
>> When some program tries to show a URL, it invokes
>> your "default browser".  How does it know what your
>> default browser is and where is that set?
>>
>> Is it a symlink somewhere in your home directory,
>> or a text file with the browser name in it?  Or what?
>>
>> Thanks!
>> linda
>>
>>
>
>
> in many of the situations, what happens is xdg-open is called:
>
> EG: xdg-open 'http://www.freedesktop.org/'
>
> Opens the freedesktop.org website in the user's default browser.
>
> xdg-open /tmp/foobar.png
>
> Opens the PNG image file /tmp/foobar.png in the user's default image viewing
> application.
>
> RTFM.
>
> Of course typing a the command prompt
>
> xdg<tab> shows a fe more, like
>
>> xdg-settings --help
> xdg-settings ? get various settings from the desktop environment
>
> Synopsis
>
> xdg-settings { get | check | set } {property} [subproperty] [value]
>
> xdg-settings { --help | --list | --manual | --version }
>
> Use 'man xdg-settings' or 'xdg-settings --manual' for additional info.
>
>
> And hence
>
>> xdg-settings --list
> Known properties:
>   default-url-scheme-handler    Default handler for URL scheme
>   default-web-browser           Default web browser
>
> and so, onto
>
>> xdg-settings get default-web-browser
> firefox
>
> WOW.
> And that works regardless of the DM I'm using.
> WOW!
>
I knew it! I knew it! :-)

I mean, I knew there must be a desktop independent way. Thank you! :-)))

Let's try it.

cer@Telcontar:~> xdg-settings get default-web-browser
cer@Telcontar:~>

Oops.

cer@Isengard:~> xdg-settings get default-web-browser
cer@Isengard:~>

Oops. Does not work on my two computers that are running this instant.
Sigh...

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

John Andersen-2
On 06/13/2017 06:46 PM, Carlos E. R. wrote:

> I knew it! I knew it! :-)
>
> I mean, I knew there must be a desktop independent way. Thank you! :-)))
>
> Let's try it.
>
> cer@Telcontar:~> xdg-settings get default-web-browser
> cer@Telcontar:~>
>
> Oops.
>
> cer@Isengard:~> xdg-settings get default-web-browser
> cer@Isengard:~>
>
> Oops. Does not work on my two computers that are running this instant.
> Sigh...
But what happens when you just do:
    xdg-open 'http://www.freedesktop.org/'

Does that work?

--
After all is said and done, more is said than done.


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Patrick Shanahan-2
* John Andersen <[hidden email]> [06-13-17 21:52]:

> On 06/13/2017 06:46 PM, Carlos E. R. wrote:
> > I knew it! I knew it! :-)
> >
> > I mean, I knew there must be a desktop independent way. Thank you! :-)))
> >
> > Let's try it.
> >
> > cer@Telcontar:~> xdg-settings get default-web-browser
> > cer@Telcontar:~>
> >
> > Oops.
> >
> > cer@Isengard:~> xdg-settings get default-web-browser
> > cer@Isengard:~>
> >
> > Oops. Does not work on my two computers that are running this instant.
> > Sigh...
>
> But what happens when you just do:
>     xdg-open 'http://www.freedesktop.org/'
>
> Does that work?

does here, but xdg-settings get default-web-browser also returns "firefox"



--
(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri
Registered Linux User #207535                    @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo                    paka @ IRCnet freenode

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Dave Howorth-3
In reply to this post by Carlos E. R.-2
On Wed, 14 Jun 2017 03:46:09 +0200
"Carlos E. R." <[hidden email]> wrote:

> On 2017-06-14 03:39, Anton Aylward wrote:  
> >> xdg-settings get default-web-browser  
> > firefox
> >
> > WOW.
> > And that works regardless of the DM I'm using.
> > WOW!
> >  
>
> I knew it! I knew it! :-)
>
> I mean, I knew there must be a desktop independent way. Thank
> you! :-)))
>
> Let's try it.
>
> cer@Telcontar:~> xdg-settings get default-web-browser
> cer@Telcontar:~>  
>
> Oops.
>
> cer@Isengard:~> xdg-settings get default-web-browser
> cer@Isengard:~>  
>
> Oops. Does not work on my two computers that are running this instant.
> Sigh...
>

Here:
$ xdg-settings get default-web-browser
firefox.desktop

???

But I do think Anton is correct about the intended mechanism.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Carlos E. R.-2
In reply to this post by John Andersen-2
On 2017-06-14 03:50, John Andersen wrote:

> On 06/13/2017 06:46 PM, Carlos E. R. wrote:
>> I knew it! I knew it! :-)
>>
>> I mean, I knew there must be a desktop independent way. Thank you! :-)))
>>
>> Let's try it.
>>
>> cer@Telcontar:~> xdg-settings get default-web-browser
>> cer@Telcontar:~>
>>
>> Oops.
>>
>> cer@Isengard:~> xdg-settings get default-web-browser
>> cer@Isengard:~>
>>
>> Oops. Does not work on my two computers that are running this instant.
>> Sigh...
>
> But what happens when you just do:
>     xdg-open 'http://www.freedesktop.org/'
>
> Does that work?
Yes.

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Dave Howorth-3
> > But what happens when you just do:
> >     xdg-open 'http://www.freedesktop.org/'
> >
> > Does that work?  

Kind of:

$ xdg-open 'http://www.freedesktop.org/'
1497447908456
addons.webextension.{f209234a-76f0-4735-9920-eb62507a54cd}
WARN Loading extension '{f209234a-76f0-4735-9920-eb62507a54cd}':
Reading manifest: Error processing background.persistent: Event pages
are not currently supported. This will run as a persistent background
page. 1497447908460
addons.webextension.{f209234a-76f0-4735-9920-eb62507a54cd}
WARN Loading extension '{f209234a-76f0-4735-9920-eb62507a54cd}':
Reading manifest: Error processing version_name: An unexpected property
was found in the WebExtension manifest. 1497447908480
addons.webextension.{f209234a-76f0-4735-9920-eb62507a54cd} WARN
Please specify whether you want browser_style or not in your
browser_action options.

but firefox does open the page

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set? (getting closer)

L A Walsh
In reply to this post by Carlos E. R.-2
P.s. please respond to me if you want me to read something.
Otherwise my filters don't know it's something addressed
to me (because it isn't) and don't alert me to new
responses ...

:-(

Carlos E. R. wrote:
> Here it finds nothing. I use XFCE, but KDE is also installed.
> grep: /home/cer/.config/Thunar: Is a directory
> /home/cer/.config/Trolltech.conf:usr\lib64\kde4\kget_browser_integration.so=40704, 0, x86_64 linux g++-4 full-config, 2011-10-30T09:28:49
>  
====
Same thing here:
/home/law/.config/Trolltech.conf:usr\lib64\kde4\krunner_browserhistory.so=40806,
0, x86_64 linux g++-4 full-config, 2014-11-14T13:35:34
....
===================================================================
Felix Miata wrote:
> ~/.config/mimeapps.list is for user overrides
> /etc/xdg/mimeapps.list is for global overrides
> /usr/share/applications/mimeapps.list is for distro defaults
>  
I don't have any of those files. ^^^
> Firefox:
>
> file:
> ~/.local/share/applications/mimeapps.list
>  
^^^ but did have this one.   Yey! Closer!

Says to execute firefox.desktop?  Not firefox?

How does it get to firefox from firefox.desktop?

Thanks!






--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

L A Walsh
In reply to this post by Anton Aylward-2
Anton Aylward wrote:
> EG: xdg-open 'http://www.freedesktop.org/'
---
    That works on my system to bring up
FF on my linbox...  So where does xdg-open look
and how can I tell it to open "foobar.sh" in ~/bin?

    I.e. that tells me something that uses "where
the default browser is set", but doesn't really tell
me where it is set.  (maybe that firefox.desktop).
But even there, I have to figure out how "firefox.desktop"
gets turned into an app-execution.


Same with several other associations in that
~/.local/share/applications/mimeapps.list...


    FWIW...
    I asked on the Dbus list how to send messages from
my linux box's dbus to my windows-box dbus, and they
said no one has ever done that and no one knows how
or has an example.  Lovely.

Wonderful thing, this Dbus, Didn't Unix Corba become
Windows COM for local and DCOM for distributed about
20 years ago in Win98 -- basically, a complexified
RPC, so apps could talk from one computer to another?

Or.. wasn't it in the late 80's that Sun advertised
with the phrase "the Network is the Computer"...?







--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Where is default browser set?

Anton Aylward-2
On 18/06/17 06:06 AM, L A Walsh wrote:
> That works on my system to bring up
> FF on my linbox...  So where does xdg-open look

Worst case:

   strace xdg-open ....

--
         A: Yes.
     >   Q: Are you sure?
     >>  A: Because it reverses the logical flow of conversation.
     >>> Q: Why is top posting frowned upon?


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

1234