Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting a default application for a .webloc file

1,017 views
Skip to first unread message

John Hill

unread,
Feb 25, 2018, 7:15:40 AM2/25/18
to
I decided I wanted to set a .webloc to open with Chrome instead of
Firefox (my default browser). So I went to Get Info/Open with and tried
to change it (it was set to Safari (Default), not Firefox, BTW). I
failed; the response was:

You can't change the item "Typical name for a site.webloc" to always
open in the selected application.
The item is either locked or damaged, or in a folder you don't have
permission to modify (error code -10823).

This is followed by another alert:
The operation can't be completed.
An unexpected error occurred (error code -10823).

According to Sharing and Permissions,

You can read and write

Name Privilege
john (Me) Read & Write
staff Read only
everyone Read only

Changing all three to Read & Write had no effect.

I have tried this with a random selection of .webloc files in different
folders, all of which give the same result.

But I can change the default application for other types of file (.jpg,
.pages, even .dmg) in the same folders as the .webloc files.

Also, I can Open With a selected browser when I right-click on a .webloc
file, just as I can with any other file.

What is going on here? I'm not desperate to find a fix, but I hate
unexplained situations.

J.

--
Please reply to yclept at outlook dot com.

John Hill

unread,
Feb 27, 2018, 6:49:51 AM2/27/18
to
This appears to be an old problem, to which no solution has been found.
Seems that .webloc files will always open in the default browser, and if
you tinker about and appear to change the browser for a specific .webloc
file, what actually happens is that the default browser is changed.

However, Open With seems to be OK.

J.

Bruce Horrocks

unread,
Mar 2, 2018, 6:38:23 PM3/2/18
to
Have you tried the marked answer from this page?
<https://discussions.apple.com/thread/7609953>

--
Bruce Horrocks
Surrey
England
(bruce at scorecrow dot com)

John Hill

unread,
Mar 3, 2018, 4:55:03 AM3/3/18
to
Bruce Horrocks <07....@scorecrow.com> wrote:

> On 27/02/2018 11:49, John Hill wrote:
> > John Hill <ne...@erewhon.invalid> wrote:
> >> I decided I wanted to set a .webloc to open with Chrome instead of
> >> Firefox (my default browser). So I went to Get Info/Open with and tried
> >> to change it (it was set to Safari (Default), not Firefox, BTW). I
> >> failed; the response was:
> >>
> >> You can't change the item "Typical name for a site.webloc" to always
> >> open in the selected application.
> >> The item is either locked or damaged, or in a folder you don't have
> >> permission to modify (error code -10823).
> >>
> >> This is followed by another alert:
> >> The operation can't be completed.
> >> An unexpected error occurred (error code -10823).
> >>
> >> Snip...
> >
> > This appears to be an old problem, to which no solution has been found.
> > Seems that .webloc files will always open in the default browser, and if
> > you tinker about and appear to change the browser for a specific .webloc
> > file, what actually happens is that the default browser is changed.
> >
> > However, Open With seems to be OK.
>
>
> Have you tried the marked answer from this page?
> <https://discussions.apple.com/thread/7609953>

Yes, I had found and noted this article (and some others, mostly dating
from mid 2016 which suggests that it was around this time it began). All
it does is change the web browser. Individual weblocs conform to the new
browser setting.

Other articles suggest, eg, that the .webloc extension is changed e.g.
to a .text file, which can have its Open With changed, and then changed
back to .webloc. I can't recollect the details now, but if you do
succeed in changing the default then it is changed for all oher weblocs,
i.e. the default browser is changed.

As a matter if interest, did you try changing Open With on a .webloc on
your Mac, and with what result?

Bruce Horrocks

unread,
Mar 3, 2018, 6:04:57 PM3/3/18
to
Ah, I see. I thought you wanted all of them changed.

> Other articles suggest, eg, that the .webloc extension is changed e.g.
> to a .text file, which can have its Open With changed, and then changed
> back to .webloc. I can't recollect the details now, but if you do
> succeed in changing the default then it is changed for all oher weblocs,
> i.e. the default browser is changed.
>
> As a matter if interest, did you try changing Open With on a .webloc on
> your Mac, and with what result?

I get the same error you did when trying to change an individual file.

When you change a text file to be opened by Chrome instead of the
default TextEdit, then the text file has an extended attribute set which
tells LaunchServices to handle that particular file differently.

In terminal:

$ xattr -px com.apple.LaunchServices.OpenWith test.txt
62 70 6C 69 73 74 30 30 D3 01 02 03 04 05 06 57
76 65 72 73 69 6F 6E 54 70 61 74 68 5F 10 10 62
75 6E 64 6C 65 69 64 65 6E 74 69 66 69 65 72 10
00 5F 10 2B 2F 55 73 65 72 73 2F 62 72 75 63 65
2F 41 70 70 6C 69 63 61 74 69 6F 6E 73 2F 47 6F
6F 67 6C 65 20 43 68 72 6F 6D 65 2E 61 70 70 5F
10 11 63 6F 6D 2E 67 6F 6F 67 6C 65 2E 43 68 72
6F 6D 65 08 0F 17 1C 2F 31 5F 00 00 00 00 00 00
01 01 00 00 00 00 00 00 00 07 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 73

Unfortunately it is a binary blob of data, rather than XML or something
more readable. A quick scan of the Internet suggests that it is a binary
plist containing a dictionary with 3 keys but I can't easily find the
values needed for Chrome.

So I then tried copying the contents of the webloc file over the top,
but making sure to retain the xattr. The result, unfortunately, still
fails to open in Chrome.

And I thought it was just Windows that excelled at this kind of dicking
about with magic bits of binary...

John Hill

unread,
Mar 4, 2018, 4:02:23 AM3/4/18
to
There must be someting deep down that changed in the midde of 2016. The
webloc in question opened in Chrome until fairly recently - I only
noticed the change a month ago.

It seems to be across El Cap and later.

Ah, well.

J
0 new messages