Discussion:
Type=Webapp
Genghis Khan
2016-01-05 04:43:54 UTC
Permalink
Hallo,


I would like to propose a new type of Desktop shortcut.

Type=Webapp

Instead of having to repeat a Register Protocol Handler
procedure to add a "webapp", I suggest to create a .desktop
file to directory .local/share/applications/ instead of or
in addition to this procedure for two reasons:

1. Not to have to repeat this procedure with every web
browser.

2. The ability to access a "webapp" with a click on a
hyperlink in applications that are not web browsers.

Referring to API:
window.navigator.registerProtocolHandler(protocol, uri, title);

Type=Webapp is mostly, if not solely, intended for
associating web browsers with protocol MIME types.

Example Desktop Entry File (KiwiIRC as an example)

[Desktop Entry]
Version=2.0
Type=Webapp
NoDisplay=true
Name=KiwiIRC
Comment=Chat over the Internet Relay Chat network
Link=https://irc.freedesktop.org/%u
Icon=kiwiirc
MimeType=x-scheme-handler/irc;
Actions=Nickname;Register;MOTD; #actions might be useful

Please post your opinions and thoughts.


With regards,
--GK
Genghis Khan
2016-01-06 11:47:13 UTC
Permalink
This might also be used for editing documents with online
word processors or spreadsheet editors etc.

> Sent: Tuesday, January 05, 2016 at 6:43 AM
> From: "Genghis Khan" <***@gmx.ca>
> To: ***@lists.freedesktop.org
> Subject: Type=Webapp
>
> Hallo,
>
>
> I would like to propose a new type of Desktop shortcut.
>
> Type=Webapp
>
> Instead of having to repeat a Register Protocol Handler
> procedure to add a "webapp", I suggest to create a .desktop
> file to directory .local/share/applications/ instead of or
> in addition to this procedure for two reasons:
>
> 1. Not to have to repeat this procedure with every web
> browser.
>
> 2. The ability to access a "webapp" with a click on a
> hyperlink in applications that are not web browsers.
>
> Referring to API:
> window.navigator.registerProtocolHandler(protocol, uri, title);
>
> Type=Webapp is mostly, if not solely, intended for
> associating web browsers with protocol MIME types.
>
> Example Desktop Entry File (KiwiIRC as an example)
>
> [Desktop Entry]
> Version=2.0
> Type=Webapp
> NoDisplay=true
> Name=KiwiIRC
> Comment=Chat over the Internet Relay Chat network
> Link=https://irc.freedesktop.org/%u
> Icon=kiwiirc
> MimeType=x-scheme-handler/irc;
> Actions=Nickname;Register;MOTD; #actions might be useful
>
> Please post your opinions and thoughts.
>
>
> With regards,
> --GK
>
Genghis Khan
2016-01-07 08:39:04 UTC
Permalink
Hello Giles,

Please pardon me for being unclear.

I have answered to your queries, but, if you may, please
elaborate on the following part of your message:

> so is it intended purely for the "application" argument of
> "xdg-mime default"? If not, what does it do?

See rest of message below.

> Sent: Wednesday, January 06, 2016 at 5:34 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: Type=Webapp
>
> Genghis,
>
> I think this needs additional explanation. My guess is that
> such entries are not expected to be visible (NoDisplay=true),
> so is it intended purely for the "application" argument of
> "xdg-mime default"? If not, what does it do?
>

Yes, mostly, but not exclusively.

Such entries are mostly to be used with invoking protocols such
as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.

Yet these entries may also be used as standalone launchers and,
as such, are to be visible (NoDisplay=false).

> How do you expect a Desktop File of this type to be activated?
> What do you expect to happen when such an entry is activated
> (there is no Exec key)?
>

Indeed, there is no Exec key, only Link key, and such launchers
would be activated with a default web browser, similarly to entries
of Type=Link.

> The meaning of the Link item is unclear. The spec defines the
> %u substitution as handling a URL, but yours is already in the
> tail of a URL.
>

Yes, this is because I did not figure of a better way to realize it,
so I did it in a similar manner to how it is done within web browsers
with what is known as "smart bookmarks". See http://ptaff.ca/smart/

> Thanks,
>
> Giles
>
> -----Original Message-----
> From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> Sent: 06 January 2016 11:47 AM
> To: ***@lists.freedesktop.org
> Subject: Re: Type=Webapp
>
> This might also be used for editing documents with online
> word processors or spreadsheet editors etc.
>
> > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > From: "Genghis Khan" <***@gmx.ca>
> > To: ***@lists.freedesktop.org
> > Subject: Type=Webapp
> >
> > Hallo,
> >
> >
> > I would like to propose a new type of Desktop shortcut.
> >
> > Type=Webapp
> >
> > Instead of having to repeat a Register Protocol Handler
> > procedure to add a "webapp", I suggest to create a .desktop
> > file to directory .local/share/applications/ instead of or
> > in addition to this procedure for two reasons:
> >
> > 1. Not to have to repeat this procedure with every web
> > browser.
> >
> > 2. The ability to access a "webapp" with a click on a
> > hyperlink in applications that are not web browsers.
> >
> > Referring to API:
> > window.navigator.registerProtocolHandler(protocol, uri, title);
> >
> > Type=Webapp is mostly, if not solely, intended for
> > associating web browsers with protocol MIME types.
> >
> > Example Desktop Entry File (KiwiIRC as an example)
> >
> > [Desktop Entry]
> > Version=2.0
> > Type=Webapp
> > NoDisplay=true
> > Name=KiwiIRC
> > Comment=Chat over the Internet Relay Chat network
> > Link=https://irc.freedesktop.org/%u
> > Icon=kiwiirc
> > MimeType=x-scheme-handler/irc;
> > Actions=Nickname;Register;MOTD; #actions might be useful
> >
> > Please post your opinions and thoughts.
> >
> >
> > With regards,
> > --GK
> >
>
Giles Atkinson
2016-01-07 10:47:10 UTC
Permalink
Genghis,

> Please pardon me for being unclear.

I did not think your posting unclear, but the details need to be worked out and described unambiguously before a new file sub-type can be added to the spec. The existing specification could use some improvements in this area (see below).

> I have answered to your queries, but, if you may, please
> elaborate on the following part of your message:

>> so is it intended purely for the "application" argument of
>> "xdg-mime default"? If not, what does it do?

In my (limited) experience adding a desktop file with a MimeType line does not register a new MIME data handler with the Desktop system. In fact it seems to have no effect at all. I have tested KDE, Unity and (IIRC) GNOME. To add a handler, the "xdg-mime default" must be used to associate the MIME type with the desktop file.

The spec says this about the MimeType key:

The MimeType key is used to indicate the MIME Types that an application knows how to handle. It is expected that for some applications this list could become long. An application is expected to be able to reasonably open files of these types using the command listed in the Exec key.

There should be no priority for MIME Types in this field, or any form of priority in the desktop file. Priority for applications is handled external to the .desktop files.


That suggests that there is no requirement for the key to do anything by itself.

> Indeed, there is no Exec key, only Link key, and such launchers
> would be activated with a default web browser, similarly to entries
> of Type=Link.

>> The meaning of the Link item is unclear. The spec defines the
>> %u substitution as handling a URL, but yours is already in the
>> tail of a URL.

> Yes, this is because I did not figure of a better way to realize it,
> so I did it in a similar manner to how it is done within web browsers
> with what is known as "smart bookmarks". See http://ptaff.ca/smart/

My French is not great, but if I interpreted that correctly, you are proposing nothing more than a parameterised variant of a Link desktop file. That seems a good idea, but it is not clear that it needs a new sub-type. Have you considered the alternative of extending the Link format?

I notice that the current spec does not describe the expected behaviour of Link and Directory files at all!

Thanks,

Giles


-----Original Message-----
From: Genghis Khan [mailto:***@gmx.ca]
Sent: 07 January 2016 8:39 AM
To: Giles Atkinson
Cc: ***@lists.freedesktop.org
Subject: Re: RE: Type=Webapp

Hello Giles,

Please pardon me for being unclear.

I have answered to your queries, but, if you may, please
elaborate on the following part of your message:

> so is it intended purely for the "application" argument of
> "xdg-mime default"? If not, what does it do?

See rest of message below.

> Sent: Wednesday, January 06, 2016 at 5:34 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: Type=Webapp
>
> Genghis,
>
> I think this needs additional explanation. My guess is that
> such entries are not expected to be visible (NoDisplay=true),
> so is it intended purely for the "application" argument of
> "xdg-mime default"? If not, what does it do?
>

Yes, mostly, but not exclusively.

Such entries are mostly to be used with invoking protocols such
as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.

Yet these entries may also be used as standalone launchers and,
as such, are to be visible (NoDisplay=false).

> How do you expect a Desktop File of this type to be activated?
> What do you expect to happen when such an entry is activated
> (there is no Exec key)?
>

Indeed, there is no Exec key, only Link key, and such launchers
would be activated with a default web browser, similarly to entries
of Type=Link.

> The meaning of the Link item is unclear. The spec defines the
> %u substitution as handling a URL, but yours is already in the
> tail of a URL.
>

Yes, this is because I did not figure of a better way to realize it,
so I did it in a similar manner to how it is done within web browsers
with what is known as "smart bookmarks". See http://ptaff.ca/smart/

> Thanks,
>
> Giles
>
> -----Original Message-----
> From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> Sent: 06 January 2016 11:47 AM
> To: ***@lists.freedesktop.org
> Subject: Re: Type=Webapp
>
> This might also be used for editing documents with online
> word processors or spreadsheet editors etc.
>
> > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > From: "Genghis Khan" <***@gmx.ca>
> > To: ***@lists.freedesktop.org
> > Subject: Type=Webapp
> >
> > Hallo,
> >
> >
> > I would like to propose a new type of Desktop shortcut.
> >
> > Type=Webapp
> >
> > Instead of having to repeat a Register Protocol Handler
> > procedure to add a "webapp", I suggest to create a .desktop
> > file to directory .local/share/applications/ instead of or
> > in addition to this procedure for two reasons:
> >
> > 1. Not to have to repeat this procedure with every web
> > browser.
> >
> > 2. The ability to access a "webapp" with a click on a
> > hyperlink in applications that are not web browsers.
> >
> > Referring to API:
> > window.navigator.registerProtocolHandler(protocol, uri, title);
> >
> > Type=Webapp is mostly, if not solely, intended for
> > associating web browsers with protocol MIME types.
> >
> > Example Desktop Entry File (KiwiIRC as an example)
> >
> > [Desktop Entry]
> > Version=2.0
> > Type=Webapp
> > NoDisplay=true
> > Name=KiwiIRC
> > Comment=Chat over the Internet Relay Chat network
> > Link=https://irc.freedesktop.org/%u
> > Icon=kiwiirc
> > MimeType=x-scheme-handler/irc;
> > Actions=Nickname;Register;MOTD; #actions might be useful
> >
> > Please post your opinions and thoughts.
> >
> >
> > With regards,
> > --GK
> >
>
Genghis Khan
2016-01-07 15:54:56 UTC
Permalink
Hallo,

> Sent: Thursday, January 07, 2016 at 12:47 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: RE: Type=Webapp
>
> Genghis,
>
> > Please pardon me for being unclear.
>
> I did not think your posting unclear, but the details need
> to be worked out and described unambiguously before a new
> file sub-type can be added to the spec. The existing
> specification could use some improvements in this area (see
> below).
>

Thank you. It was a note to myself ;-)

> > I have answered to your queries, but, if you may, please
> > elaborate on the following part of your message:
>
> >> so is it intended purely for the "application" argument of
> >> "xdg-mime default"? If not, what does it do?
>
> In my (limited) experience adding a desktop file with a MimeType
> line does not register a new MIME data handler with the Desktop
> system. In fact it seems to have no effect at all. I have
> tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> "xdg-mime default" must be used to associate the MIME type with
> the desktop file.
>

Yes, indeed so. Now, I understand what you meant by "xdg-mime".

Webapp launchers are to be included, by user demand, in:
defaults.list
mimeapps.list

> The spec says this about the MimeType key:
>
> The MimeType key is used to indicate the MIME Types that an
> application knows how to handle. It is expected that for some
> applications this list could become long. An application is
> expected to be able to reasonably open files of these types using
> the command listed in the Exec key.
>
> There should be no priority for MIME Types in this field, or any
> form of priority in the desktop file. Priority for applications
> is handled external to the .desktop files.
>
>
> That suggests that there is no requirement for the key to do
> anything by itself.
>

Desktop Entry of type Webapp, which is, eventually, a hybrid of
types Application and Link would certainly use "xdg-mime" as it
is with Application type and would behave as a Desktop Entry of
type Application.

> > Indeed, there is no Exec key, only Link key, and such
> > launchers would be activated with a default web browser,
> > similarly to entries of Type=Link.
>
> >> The meaning of the Link item is unclear. The spec
> >> defines the %u substitution as handling a URL, but yours
> >> is already in the tail of a URL.
>
> > Yes, this is because I did not figure of a better way to
> > realize it, so I did it in a similar manner to how it is
> > done within web browsers with what is known as "smart
> > bookmarks". See http://ptaff.ca/smart/
>
> My French is not great, but if I interpreted that correctly,
> you are proposing nothing more than a parameterised variant
> of a Link desktop file.

I think so, yes.

> That seems a good idea, but it is not clear that it needs a
> new sub-type. Have you considered the alternative of
> extending the Link format?
>

No, I don't think we need to extend the link format, because
it is almost identical to Application type, they are both a
Desktop Entry, but I could be wrong.

> I notice that the current spec does not describe the expected
> behaviour of Link and Directory files at all!
>

This is not directly related to our issue, am I correct?
What is Directory file?

> Thanks,
>
> Giles
>
>
> -----Original Message-----
> From: Genghis Khan [mailto:***@gmx.ca]
> Sent: 07 January 2016 8:39 AM
> To: Giles Atkinson
> Cc: ***@lists.freedesktop.org
> Subject: Re: RE: Type=Webapp
>
> Hello Giles,
>
> Please pardon me for being unclear.
>
> I have answered to your queries, but, if you may, please
> elaborate on the following part of your message:
>
> > so is it intended purely for the "application" argument of
> > "xdg-mime default"? If not, what does it do?
>
> See rest of message below.
>
> > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: Type=Webapp
> >
> > Genghis,
> >
> > I think this needs additional explanation. My guess is that
> > such entries are not expected to be visible (NoDisplay=true),
> > so is it intended purely for the "application" argument of
> > "xdg-mime default"? If not, what does it do?
> >
>
> Yes, mostly, but not exclusively.
>
> Such entries are mostly to be used with invoking protocols such
> as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
>
> Yet these entries may also be used as standalone launchers and,
> as such, are to be visible (NoDisplay=false).
>
> > How do you expect a Desktop File of this type to be activated?
> > What do you expect to happen when such an entry is activated
> > (there is no Exec key)?
> >
>
> Indeed, there is no Exec key, only Link key, and such launchers
> would be activated with a default web browser, similarly to entries
> of Type=Link.
>
> > The meaning of the Link item is unclear. The spec defines the
> > %u substitution as handling a URL, but yours is already in the
> > tail of a URL.
> >
>
> Yes, this is because I did not figure of a better way to realize it,
> so I did it in a similar manner to how it is done within web browsers
> with what is known as "smart bookmarks". See http://ptaff.ca/smart/
>
> > Thanks,
> >
> > Giles
> >
> > -----Original Message-----
> > From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> > Sent: 06 January 2016 11:47 AM
> > To: ***@lists.freedesktop.org
> > Subject: Re: Type=Webapp
> >
> > This might also be used for editing documents with online
> > word processors or spreadsheet editors etc.
> >
> > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > From: "Genghis Khan" <***@gmx.ca>
> > > To: ***@lists.freedesktop.org
> > > Subject: Type=Webapp
> > >
> > > Hallo,
> > >
> > >
> > > I would like to propose a new type of Desktop shortcut.
> > >
> > > Type=Webapp
> > >
> > > Instead of having to repeat a Register Protocol Handler
> > > procedure to add a "webapp", I suggest to create a .desktop
> > > file to directory .local/share/applications/ instead of or
> > > in addition to this procedure for two reasons:
> > >
> > > 1. Not to have to repeat this procedure with every web
> > > browser.
> > >
> > > 2. The ability to access a "webapp" with a click on a
> > > hyperlink in applications that are not web browsers.
> > >
> > > Referring to API:
> > > window.navigator.registerProtocolHandler(protocol, uri, title);
> > >
> > > Type=Webapp is mostly, if not solely, intended for
> > > associating web browsers with protocol MIME types.
> > >
> > > Example Desktop Entry File (KiwiIRC as an example)
> > >
> > > [Desktop Entry]
> > > Version=2.0
> > > Type=Webapp
> > > NoDisplay=true
> > > Name=KiwiIRC
> > > Comment=Chat over the Internet Relay Chat network
> > > Link=https://irc.freedesktop.org/%u
> > > Icon=kiwiirc
> > > MimeType=x-scheme-handler/irc;
> > > Actions=Nickname;Register;MOTD; #actions might be useful
> > >
> > > Please post your opinions and thoughts.
> > >
> > >
> > > With regards,
> > > --GK
> > >
> >
>
Giles Atkinson
2016-01-07 17:57:55 UTC
Permalink
Genghis,

>> That seems a good idea, but it is not clear that it needs a
>> new sub-type. Have you considered the alternative of
>> extending the Link format?

> No, I don't think we need to extend the link format, because
> it is almost identical to Application type, they are both a
>Desktop Entry, but I could be wrong.

What I mean is that I think the "Type=Webapp" is not needed, and your example could look like this.

[Desktop Entry]
Version=1.1
Type=Link
NoDisplay=true
Name=KiwiIRC
Comment=Chat over the Internet Relay Chat network
Link=https://irc.freedesktop.org/%u
Icon=kiwiirc
MimeType=x-scheme-handler/irc;
Actions=Nickname;Register;MOTD; #actions might be useful

So what would be added is the new key "Link" that defines a URI with substitution(s).The Desktop file could also contain the "URL" key, to specify a separate URI to be used when no parameter is passed. And Link type Desktop files can now have Actions, with their own Link and URL keys.

>> I notice that the current spec does not describe the expected
>> behaviour of Link and Directory files at all!

> This is not directly related to our issue, am I correct?

Yes, I think so.

> What is Directory file?

A special type of Desktop file. I think it is used only with the XDG Menu spec.

Giles

-----Original Message-----
From: Genghis Khan [mailto:***@gmx.ca]
Sent: 07 January 2016 3:55 PM
To: Giles Atkinson
Cc: ***@lists.freedesktop.org
Subject: Re: RE: RE: Type=Webapp

Hallo,

> Sent: Thursday, January 07, 2016 at 12:47 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: RE: Type=Webapp
>
> Genghis,
>
> > Please pardon me for being unclear.
>
> I did not think your posting unclear, but the details need
> to be worked out and described unambiguously before a new
> file sub-type can be added to the spec. The existing
> specification could use some improvements in this area (see
> below).
>

Thank you. It was a note to myself ;-)

> > I have answered to your queries, but, if you may, please
> > elaborate on the following part of your message:
>
> >> so is it intended purely for the "application" argument of
> >> "xdg-mime default"? If not, what does it do?
>
> In my (limited) experience adding a desktop file with a MimeType
> line does not register a new MIME data handler with the Desktop
> system. In fact it seems to have no effect at all. I have
> tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> "xdg-mime default" must be used to associate the MIME type with
> the desktop file.
>

Yes, indeed so. Now, I understand what you meant by "xdg-mime".

Webapp launchers are to be included, by user demand, in:
defaults.list
mimeapps.list

> The spec says this about the MimeType key:
>
> The MimeType key is used to indicate the MIME Types that an
> application knows how to handle. It is expected that for some
> applications this list could become long. An application is
> expected to be able to reasonably open files of these types using
> the command listed in the Exec key.
>
> There should be no priority for MIME Types in this field, or any
> form of priority in the desktop file. Priority for applications
> is handled external to the .desktop files.
>
>
> That suggests that there is no requirement for the key to do
> anything by itself.
>

Desktop Entry of type Webapp, which is, eventually, a hybrid of
types Application and Link would certainly use "xdg-mime" as it
is with Application type and would behave as a Desktop Entry of
type Application.

> > Indeed, there is no Exec key, only Link key, and such
> > launchers would be activated with a default web browser,
> > similarly to entries of Type=Link.
>
> >> The meaning of the Link item is unclear. The spec
> >> defines the %u substitution as handling a URL, but yours
> >> is already in the tail of a URL.
>
> > Yes, this is because I did not figure of a better way to
> > realize it, so I did it in a similar manner to how it is
> > done within web browsers with what is known as "smart
> > bookmarks". See http://ptaff.ca/smart/
>
> My French is not great, but if I interpreted that correctly,
> you are proposing nothing more than a parameterised variant
> of a Link desktop file.

I think so, yes.

> That seems a good idea, but it is not clear that it needs a
> new sub-type. Have you considered the alternative of
> extending the Link format?
>

No, I don't think we need to extend the link format, because
it is almost identical to Application type, they are both a
Desktop Entry, but I could be wrong.

> I notice that the current spec does not describe the expected
> behaviour of Link and Directory files at all!
>

This is not directly related to our issue, am I correct?
What is Directory file?

> Thanks,
>
> Giles
>
>
> -----Original Message-----
> From: Genghis Khan [mailto:***@gmx.ca]
> Sent: 07 January 2016 8:39 AM
> To: Giles Atkinson
> Cc: ***@lists.freedesktop.org
> Subject: Re: RE: Type=Webapp
>
> Hello Giles,
>
> Please pardon me for being unclear.
>
> I have answered to your queries, but, if you may, please
> elaborate on the following part of your message:
>
> > so is it intended purely for the "application" argument of
> > "xdg-mime default"? If not, what does it do?
>
> See rest of message below.
>
> > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: Type=Webapp
> >
> > Genghis,
> >
> > I think this needs additional explanation. My guess is that
> > such entries are not expected to be visible (NoDisplay=true),
> > so is it intended purely for the "application" argument of
> > "xdg-mime default"? If not, what does it do?
> >
>
> Yes, mostly, but not exclusively.
>
> Such entries are mostly to be used with invoking protocols such
> as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
>
> Yet these entries may also be used as standalone launchers and,
> as such, are to be visible (NoDisplay=false).
>
> > How do you expect a Desktop File of this type to be activated?
> > What do you expect to happen when such an entry is activated
> > (there is no Exec key)?
> >
>
> Indeed, there is no Exec key, only Link key, and such launchers
> would be activated with a default web browser, similarly to entries
> of Type=Link.
>
> > The meaning of the Link item is unclear. The spec defines the
> > %u substitution as handling a URL, but yours is already in the
> > tail of a URL.
> >
>
> Yes, this is because I did not figure of a better way to realize it,
> so I did it in a similar manner to how it is done within web browsers
> with what is known as "smart bookmarks". See http://ptaff.ca/smart/
>
> > Thanks,
> >
> > Giles
> >
> > -----Original Message-----
> > From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> > Sent: 06 January 2016 11:47 AM
> > To: ***@lists.freedesktop.org
> > Subject: Re: Type=Webapp
> >
> > This might also be used for editing documents with online
> > word processors or spreadsheet editors etc.
> >
> > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > From: "Genghis Khan" <***@gmx.ca>
> > > To: ***@lists.freedesktop.org
> > > Subject: Type=Webapp
> > >
> > > Hallo,
> > >
> > >
> > > I would like to propose a new type of Desktop shortcut.
> > >
> > > Type=Webapp
> > >
> > > Instead of having to repeat a Register Protocol Handler
> > > procedure to add a "webapp", I suggest to create a .desktop
> > > file to directory .local/share/applications/ instead of or
> > > in addition to this procedure for two reasons:
> > >
> > > 1. Not to have to repeat this procedure with every web
> > > browser.
> > >
> > > 2. The ability to access a "webapp" with a click on a
> > > hyperlink in applications that are not web browsers.
> > >
> > > Referring to API:
> > > window.navigator.registerProtocolHandler(protocol, uri, title);
> > >
> > > Type=Webapp is mostly, if not solely, intended for
> > > associating web browsers with protocol MIME types.
> > >
> > > Example Desktop Entry File (KiwiIRC as an example)
> > >
> > > [Desktop Entry]
> > > Version=2.0
> > > Type=Webapp
> > > NoDisplay=true
> > > Name=KiwiIRC
> > > Comment=Chat over the Internet Relay Chat network
> > > Link=https://irc.freedesktop.org/%u
> > > Icon=kiwiirc
> > > MimeType=x-scheme-handler/irc;
> > > Actions=Nickname;Register;MOTD; #actions might be useful
> > >
> > > Please post your opinions and thoughts.
> > >
> > >
> > > With regards,
> > > --GK
> > >
> >
>
Genghis Khan
2016-01-08 07:32:57 UTC
Permalink
Hallo Giles,

> Sent: Thursday, January 07, 2016 at 7:57 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: RE: RE: Type=Webapp
>
> Genghis,
>
> >> That seems a good idea, but it is not clear that it needs a
> >> new sub-type. Have you considered the alternative of
> >> extending the Link format?
>
> > No, I don't think we need to extend the link format, because
> > it is almost identical to Application type, they are both a
> >Desktop Entry, but I could be wrong.
>
> What I mean is that I think the "Type=Webapp" is not needed,
> and your example could look like this.
>
> [Desktop Entry]
> Version=1.1
> Type=Link
> NoDisplay=true
> Name=KiwiIRC
> Comment=Chat over the Internet Relay Chat network
> Link=https://irc.freedesktop.org/%u
> Icon=kiwiirc
> MimeType=x-scheme-handler/irc;
> Actions=Nickname;Register;MOTD; #actions might be useful
>
> So what would be added is the new key "Link" that defines a
> URI with substitution(s).The Desktop file could also contain
> the "URL" key, to specify a separate URI to be used when no
> parameter is passed. And Link type Desktop files can now
> have Actions, with their own Link and URL keys.
>

This is something beyond me. I just posted an idea; the rest,
if this idea is acceptable, is to be discussed by others.

I would love it to be realized in the most flexible and
extendable way that would even make Webapps to integrate
seamlessly on Linux desktops.

With that said, I want to point out that I am absolutely against
the trend of attempting to turn user desktop and the WWW to one;
I am also against the idea of what is known as "Cloud computing".

> >> I notice that the current spec does not describe the expected
> >> behaviour of Link and Directory files at all!
>
> > This is not directly related to our issue, am I correct?
>
> Yes, I think so.
>
> > What is Directory file?
>
> A special type of Desktop file. I think it is used only with the XDG Menu spec.
>
> Giles
>
> -----Original Message-----
> From: Genghis Khan [mailto:***@gmx.ca]
> Sent: 07 January 2016 3:55 PM
> To: Giles Atkinson
> Cc: ***@lists.freedesktop.org
> Subject: Re: RE: RE: Type=Webapp
>
> Hallo,
>
> > Sent: Thursday, January 07, 2016 at 12:47 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: RE: Type=Webapp
> >
> > Genghis,
> >
> > > Please pardon me for being unclear.
> >
> > I did not think your posting unclear, but the details need
> > to be worked out and described unambiguously before a new
> > file sub-type can be added to the spec. The existing
> > specification could use some improvements in this area (see
> > below).
> >
>
> Thank you. It was a note to myself ;-)
>
> > > I have answered to your queries, but, if you may, please
> > > elaborate on the following part of your message:
> >
> > >> so is it intended purely for the "application" argument of
> > >> "xdg-mime default"? If not, what does it do?
> >
> > In my (limited) experience adding a desktop file with a MimeType
> > line does not register a new MIME data handler with the Desktop
> > system. In fact it seems to have no effect at all. I have
> > tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> > "xdg-mime default" must be used to associate the MIME type with
> > the desktop file.
> >
>
> Yes, indeed so. Now, I understand what you meant by "xdg-mime".
>
> Webapp launchers are to be included, by user demand, in:
> defaults.list
> mimeapps.list
>
> > The spec says this about the MimeType key:
> >
> > The MimeType key is used to indicate the MIME Types that an
> > application knows how to handle. It is expected that for some
> > applications this list could become long. An application is
> > expected to be able to reasonably open files of these types using
> > the command listed in the Exec key.
> >
> > There should be no priority for MIME Types in this field, or any
> > form of priority in the desktop file. Priority for applications
> > is handled external to the .desktop files.
> >
> >
> > That suggests that there is no requirement for the key to do
> > anything by itself.
> >
>
> Desktop Entry of type Webapp, which is, eventually, a hybrid of
> types Application and Link would certainly use "xdg-mime" as it
> is with Application type and would behave as a Desktop Entry of
> type Application.
>
> > > Indeed, there is no Exec key, only Link key, and such
> > > launchers would be activated with a default web browser,
> > > similarly to entries of Type=Link.
> >
> > >> The meaning of the Link item is unclear. The spec
> > >> defines the %u substitution as handling a URL, but yours
> > >> is already in the tail of a URL.
> >
> > > Yes, this is because I did not figure of a better way to
> > > realize it, so I did it in a similar manner to how it is
> > > done within web browsers with what is known as "smart
> > > bookmarks". See http://ptaff.ca/smart/
> >
> > My French is not great, but if I interpreted that correctly,
> > you are proposing nothing more than a parameterised variant
> > of a Link desktop file.
>
> I think so, yes.
>
> > That seems a good idea, but it is not clear that it needs a
> > new sub-type. Have you considered the alternative of
> > extending the Link format?
> >
>
> No, I don't think we need to extend the link format, because
> it is almost identical to Application type, they are both a
> Desktop Entry, but I could be wrong.
>
> > I notice that the current spec does not describe the expected
> > behaviour of Link and Directory files at all!
> >
>
> This is not directly related to our issue, am I correct?
> What is Directory file?
>
> > Thanks,
> >
> > Giles
> >
> >
> > -----Original Message-----
> > From: Genghis Khan [mailto:***@gmx.ca]
> > Sent: 07 January 2016 8:39 AM
> > To: Giles Atkinson
> > Cc: ***@lists.freedesktop.org
> > Subject: Re: RE: Type=Webapp
> >
> > Hello Giles,
> >
> > Please pardon me for being unclear.
> >
> > I have answered to your queries, but, if you may, please
> > elaborate on the following part of your message:
> >
> > > so is it intended purely for the "application" argument of
> > > "xdg-mime default"? If not, what does it do?
> >
> > See rest of message below.
> >
> > > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > > From: "Giles Atkinson" <***@citrix.com>
> > > To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > Subject: RE: Type=Webapp
> > >
> > > Genghis,
> > >
> > > I think this needs additional explanation. My guess is that
> > > such entries are not expected to be visible (NoDisplay=true),
> > > so is it intended purely for the "application" argument of
> > > "xdg-mime default"? If not, what does it do?
> > >
> >
> > Yes, mostly, but not exclusively.
> >
> > Such entries are mostly to be used with invoking protocols such
> > as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
> >
> > Yet these entries may also be used as standalone launchers and,
> > as such, are to be visible (NoDisplay=false).
> >
> > > How do you expect a Desktop File of this type to be activated?
> > > What do you expect to happen when such an entry is activated
> > > (there is no Exec key)?
> > >
> >
> > Indeed, there is no Exec key, only Link key, and such launchers
> > would be activated with a default web browser, similarly to entries
> > of Type=Link.
> >
> > > The meaning of the Link item is unclear. The spec defines the
> > > %u substitution as handling a URL, but yours is already in the
> > > tail of a URL.
> > >
> >
> > Yes, this is because I did not figure of a better way to realize it,
> > so I did it in a similar manner to how it is done within web browsers
> > with what is known as "smart bookmarks". See http://ptaff.ca/smart/
> >
> > > Thanks,
> > >
> > > Giles
> > >
> > > -----Original Message-----
> > > From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> > > Sent: 06 January 2016 11:47 AM
> > > To: ***@lists.freedesktop.org
> > > Subject: Re: Type=Webapp
> > >
> > > This might also be used for editing documents with online
> > > word processors or spreadsheet editors etc.
> > >
> > > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > > From: "Genghis Khan" <***@gmx.ca>
> > > > To: ***@lists.freedesktop.org
> > > > Subject: Type=Webapp
> > > >
> > > > Hallo,
> > > >
> > > >
> > > > I would like to propose a new type of Desktop shortcut.
> > > >
> > > > Type=Webapp
> > > >
> > > > Instead of having to repeat a Register Protocol Handler
> > > > procedure to add a "webapp", I suggest to create a .desktop
> > > > file to directory .local/share/applications/ instead of or
> > > > in addition to this procedure for two reasons:
> > > >
> > > > 1. Not to have to repeat this procedure with every web
> > > > browser.
> > > >
> > > > 2. The ability to access a "webapp" with a click on a
> > > > hyperlink in applications that are not web browsers.
> > > >
> > > > Referring to API:
> > > > window.navigator.registerProtocolHandler(protocol, uri, title);
> > > >
> > > > Type=Webapp is mostly, if not solely, intended for
> > > > associating web browsers with protocol MIME types.
> > > >
> > > > Example Desktop Entry File (KiwiIRC as an example)
> > > >
> > > > [Desktop Entry]
> > > > Version=2.0
> > > > Type=Webapp
> > > > NoDisplay=true
> > > > Name=KiwiIRC
> > > > Comment=Chat over the Internet Relay Chat network
> > > > Link=https://irc.freedesktop.org/%u
> > > > Icon=kiwiirc
> > > > MimeType=x-scheme-handler/irc;
> > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > >
> > > > Please post your opinions and thoughts.
> > > >
> > > >
> > > > With regards,
> > > > --GK
> > > >
> > >
> >
>
Genghis Khan
2016-01-09 12:08:03 UTC
Permalink
Giles,

Below is a note I forgot to add in my last message.

> Sent: Thursday, January 07, 2016 at 7:57 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: RE: RE: Type=Webapp
>
> Genghis,
>
> >> That seems a good idea, but it is not clear that it needs a
> >> new sub-type. Have you considered the alternative of
> >> extending the Link format?
>
> > No, I don't think we need to extend the link format, because
> > it is almost identical to Application type, they are both a
> >Desktop Entry, but I could be wrong.
>
> What I mean is that I think the "Type=Webapp" is not needed,
> and your example could look like this.
>
> [Desktop Entry]
> Version=1.1
> Type=Link
> NoDisplay=true
> Name=KiwiIRC
> Comment=Chat over the Internet Relay Chat network
> Link=https://irc.freedesktop.org/%u
> Icon=kiwiirc
> MimeType=x-scheme-handler/irc;
> Actions=Nickname;Register;MOTD; #actions might be useful
>
> So what would be added is the new key "Link" that defines a
> URI with substitution(s).The Desktop file could also contain
> the "URL" key, to specify a separate URI to be used when no
> parameter is passed. And Link type Desktop files can now
> have Actions, with their own Link and URL keys.
>

I do not know how to realize it in the est way, but please take
into consideration, if you did not, that one might want to use
a Webapp to handle a protocol (e.g. feed: for RSS feeds) where
we use NoDisplay=true, and also to use a Webapp as is, which is
a case where we *would not* use NoDisplay=true.

Examples: Chat clients and Feed Readers (TinyTinyRSS).

Sometimes, I would want to subscribe to a feed with TinyTinyRSS,
and sometimes, I would want to check for news updates.

> >> I notice that the current spec does not describe the expected
> >> behaviour of Link and Directory files at all!
>
> > This is not directly related to our issue, am I correct?
>
> Yes, I think so.
>
> > What is Directory file?
>
> A special type of Desktop file. I think it is used only with the
> XDG Menu spec.
>
> Giles
>
> -----Original Message-----
> From: Genghis Khan [mailto:***@gmx.ca]
> Sent: 07 January 2016 3:55 PM
> To: Giles Atkinson
> Cc: ***@lists.freedesktop.org
> Subject: Re: RE: RE: Type=Webapp
>
> Hallo,
>
> > Sent: Thursday, January 07, 2016 at 12:47 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: RE: Type=Webapp
> >
> > Genghis,
> >
> > > Please pardon me for being unclear.
> >
> > I did not think your posting unclear, but the details need
> > to be worked out and described unambiguously before a new
> > file sub-type can be added to the spec. The existing
> > specification could use some improvements in this area (see
> > below).
> >
>
> Thank you. It was a note to myself ;-)
>
> > > I have answered to your queries, but, if you may, please
> > > elaborate on the following part of your message:
> >
> > >> so is it intended purely for the "application" argument of
> > >> "xdg-mime default"? If not, what does it do?
> >
> > In my (limited) experience adding a desktop file with a MimeType
> > line does not register a new MIME data handler with the Desktop
> > system. In fact it seems to have no effect at all. I have
> > tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> > "xdg-mime default" must be used to associate the MIME type with
> > the desktop file.
> >
>
> Yes, indeed so. Now, I understand what you meant by "xdg-mime".
>
> Webapp launchers are to be included, by user demand, in:
> defaults.list
> mimeapps.list
>
> > The spec says this about the MimeType key:
> >
> > The MimeType key is used to indicate the MIME Types that an
> > application knows how to handle. It is expected that for some
> > applications this list could become long. An application is
> > expected to be able to reasonably open files of these types using
> > the command listed in the Exec key.
> >
> > There should be no priority for MIME Types in this field, or any
> > form of priority in the desktop file. Priority for applications
> > is handled external to the .desktop files.
> >
> >
> > That suggests that there is no requirement for the key to do
> > anything by itself.
> >
>
> Desktop Entry of type Webapp, which is, eventually, a hybrid of
> types Application and Link would certainly use "xdg-mime" as it
> is with Application type and would behave as a Desktop Entry of
> type Application.
>
> > > Indeed, there is no Exec key, only Link key, and such
> > > launchers would be activated with a default web browser,
> > > similarly to entries of Type=Link.
> >
> > >> The meaning of the Link item is unclear. The spec
> > >> defines the %u substitution as handling a URL, but yours
> > >> is already in the tail of a URL.
> >
> > > Yes, this is because I did not figure of a better way to
> > > realize it, so I did it in a similar manner to how it is
> > > done within web browsers with what is known as "smart
> > > bookmarks". See http://ptaff.ca/smart/
> >
> > My French is not great, but if I interpreted that correctly,
> > you are proposing nothing more than a parameterised variant
> > of a Link desktop file.
>
> I think so, yes.
>
> > That seems a good idea, but it is not clear that it needs a
> > new sub-type. Have you considered the alternative of
> > extending the Link format?
> >
>
> No, I don't think we need to extend the link format, because
> it is almost identical to Application type, they are both a
> Desktop Entry, but I could be wrong.
>
> > I notice that the current spec does not describe the expected
> > behaviour of Link and Directory files at all!
> >
>
> This is not directly related to our issue, am I correct?
> What is Directory file?
>
> > Thanks,
> >
> > Giles
> >
> >
> > -----Original Message-----
> > From: Genghis Khan [mailto:***@gmx.ca]
> > Sent: 07 January 2016 8:39 AM
> > To: Giles Atkinson
> > Cc: ***@lists.freedesktop.org
> > Subject: Re: RE: Type=Webapp
> >
> > Hello Giles,
> >
> > Please pardon me for being unclear.
> >
> > I have answered to your queries, but, if you may, please
> > elaborate on the following part of your message:
> >
> > > so is it intended purely for the "application" argument of
> > > "xdg-mime default"? If not, what does it do?
> >
> > See rest of message below.
> >
> > > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > > From: "Giles Atkinson" <***@citrix.com>
> > > To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > Subject: RE: Type=Webapp
> > >
> > > Genghis,
> > >
> > > I think this needs additional explanation. My guess is that
> > > such entries are not expected to be visible (NoDisplay=true),
> > > so is it intended purely for the "application" argument of
> > > "xdg-mime default"? If not, what does it do?
> > >
> >
> > Yes, mostly, but not exclusively.
> >
> > Such entries are mostly to be used with invoking protocols such
> > as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
> >
> > Yet these entries may also be used as standalone launchers and,
> > as such, are to be visible (NoDisplay=false).
> >
> > > How do you expect a Desktop File of this type to be activated?
> > > What do you expect to happen when such an entry is activated
> > > (there is no Exec key)?
> > >
> >
> > Indeed, there is no Exec key, only Link key, and such launchers
> > would be activated with a default web browser, similarly to entries
> > of Type=Link.
> >
> > > The meaning of the Link item is unclear. The spec defines the
> > > %u substitution as handling a URL, but yours is already in the
> > > tail of a URL.
> > >
> >
> > Yes, this is because I did not figure of a better way to realize it,
> > so I did it in a similar manner to how it is done within web browsers
> > with what is known as "smart bookmarks". See http://ptaff.ca/smart/
> >
> > > Thanks,
> > >
> > > Giles
> > >
> > > -----Original Message-----
> > > From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> > > Sent: 06 January 2016 11:47 AM
> > > To: ***@lists.freedesktop.org
> > > Subject: Re: Type=Webapp
> > >
> > > This might also be used for editing documents with online
> > > word processors or spreadsheet editors etc.
> > >
> > > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > > From: "Genghis Khan" <***@gmx.ca>
> > > > To: ***@lists.freedesktop.org
> > > > Subject: Type=Webapp
> > > >
> > > > Hallo,
> > > >
> > > >
> > > > I would like to propose a new type of Desktop shortcut.
> > > >
> > > > Type=Webapp
> > > >
> > > > Instead of having to repeat a Register Protocol Handler
> > > > procedure to add a "webapp", I suggest to create a .desktop
> > > > file to directory .local/share/applications/ instead of or
> > > > in addition to this procedure for two reasons:
> > > >
> > > > 1. Not to have to repeat this procedure with every web
> > > > browser.
> > > >
> > > > 2. The ability to access a "webapp" with a click on a
> > > > hyperlink in applications that are not web browsers.
> > > >
> > > > Referring to API:
> > > > window.navigator.registerProtocolHandler(protocol, uri, title);
> > > >
> > > > Type=Webapp is mostly, if not solely, intended for
> > > > associating web browsers with protocol MIME types.
> > > >
> > > > Example Desktop Entry File (KiwiIRC as an example)
> > > >
> > > > [Desktop Entry]
> > > > Version=2.0
> > > > Type=Webapp
> > > > NoDisplay=true
> > > > Name=KiwiIRC
> > > > Comment=Chat over the Internet Relay Chat network
> > > > Link=https://irc.freedesktop.org/%u
> > > > Icon=kiwiirc
> > > > MimeType=x-scheme-handler/irc;
> > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > >
> > > > Please post your opinions and thoughts.
> > > >
> > > >
> > > > With regards,
> > > > --GK
> > > >
> > >
> >
>
Genghis Khan
2016-01-11 06:20:32 UTC
Permalink
Please ignore my last post.
This is what Type=Link already provides.

Giles, would you like to send an enhancement request to the
bug tracker?

> Sent: Saturday, January 09, 2016 at 2:08 PM
> From: "Genghis Khan" <***@gmx.ca>
> To: "Giles Atkinson" <***@citrix.com>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: Re: RE: RE: RE: Type=Webapp
>
> Giles,
>
> Below is a note I forgot to add in my last message.
>
> > Sent: Thursday, January 07, 2016 at 7:57 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: RE: RE: Type=Webapp
> >
> > Genghis,
> >
> > >> That seems a good idea, but it is not clear that it needs a
> > >> new sub-type. Have you considered the alternative of
> > >> extending the Link format?
> >
> > > No, I don't think we need to extend the link format, because
> > > it is almost identical to Application type, they are both a
> > >Desktop Entry, but I could be wrong.
> >
> > What I mean is that I think the "Type=Webapp" is not needed,
> > and your example could look like this.
> >
> > [Desktop Entry]
> > Version=1.1
> > Type=Link
> > NoDisplay=true
> > Name=KiwiIRC
> > Comment=Chat over the Internet Relay Chat network
> > Link=https://irc.freedesktop.org/%u
> > Icon=kiwiirc
> > MimeType=x-scheme-handler/irc;
> > Actions=Nickname;Register;MOTD; #actions might be useful
> >
> > So what would be added is the new key "Link" that defines a
> > URI with substitution(s).The Desktop file could also contain
> > the "URL" key, to specify a separate URI to be used when no
> > parameter is passed. And Link type Desktop files can now
> > have Actions, with their own Link and URL keys.
> >
>
> I do not know how to realize it in the est way, but please take
> into consideration, if you did not, that one might want to use
> a Webapp to handle a protocol (e.g. feed: for RSS feeds) where
> we use NoDisplay=true, and also to use a Webapp as is, which is
> a case where we *would not* use NoDisplay=true.
>
> Examples: Chat clients and Feed Readers (TinyTinyRSS).
>
> Sometimes, I would want to subscribe to a feed with TinyTinyRSS,
> and sometimes, I would want to check for news updates.
>

Type=Link already does it.

> > >> I notice that the current spec does not describe the expected
> > >> behaviour of Link and Directory files at all!
> >
> > > This is not directly related to our issue, am I correct?
> >
> > Yes, I think so.
> >
> > > What is Directory file?
> >
> > A special type of Desktop file. I think it is used only with the
> > XDG Menu spec.
> >
> > Giles
> >
> > -----Original Message-----
> > From: Genghis Khan [mailto:***@gmx.ca]
> > Sent: 07 January 2016 3:55 PM
> > To: Giles Atkinson
> > Cc: ***@lists.freedesktop.org
> > Subject: Re: RE: RE: Type=Webapp
> >
> > Hallo,
> >
> > > Sent: Thursday, January 07, 2016 at 12:47 PM
> > > From: "Giles Atkinson" <***@citrix.com>
> > > To: "'Genghis Khan'" <***@gmx.ca>
> > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > Subject: RE: RE: Type=Webapp
> > >
> > > Genghis,
> > >
> > > > Please pardon me for being unclear.
> > >
> > > I did not think your posting unclear, but the details need
> > > to be worked out and described unambiguously before a new
> > > file sub-type can be added to the spec. The existing
> > > specification could use some improvements in this area (see
> > > below).
> > >
> >
> > Thank you. It was a note to myself ;-)
> >
> > > > I have answered to your queries, but, if you may, please
> > > > elaborate on the following part of your message:
> > >
> > > >> so is it intended purely for the "application" argument of
> > > >> "xdg-mime default"? If not, what does it do?
> > >
> > > In my (limited) experience adding a desktop file with a MimeType
> > > line does not register a new MIME data handler with the Desktop
> > > system. In fact it seems to have no effect at all. I have
> > > tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> > > "xdg-mime default" must be used to associate the MIME type with
> > > the desktop file.
> > >
> >
> > Yes, indeed so. Now, I understand what you meant by "xdg-mime".
> >
> > Webapp launchers are to be included, by user demand, in:
> > defaults.list
> > mimeapps.list
> >
> > > The spec says this about the MimeType key:
> > >
> > > The MimeType key is used to indicate the MIME Types that an
> > > application knows how to handle. It is expected that for some
> > > applications this list could become long. An application is
> > > expected to be able to reasonably open files of these types using
> > > the command listed in the Exec key.
> > >
> > > There should be no priority for MIME Types in this field, or any
> > > form of priority in the desktop file. Priority for applications
> > > is handled external to the .desktop files.
> > >
> > >
> > > That suggests that there is no requirement for the key to do
> > > anything by itself.
> > >
> >
> > Desktop Entry of type Webapp, which is, eventually, a hybrid of
> > types Application and Link would certainly use "xdg-mime" as it
> > is with Application type and would behave as a Desktop Entry of
> > type Application.
> >
> > > > Indeed, there is no Exec key, only Link key, and such
> > > > launchers would be activated with a default web browser,
> > > > similarly to entries of Type=Link.
> > >
> > > >> The meaning of the Link item is unclear. The spec
> > > >> defines the %u substitution as handling a URL, but yours
> > > >> is already in the tail of a URL.
> > >
> > > > Yes, this is because I did not figure of a better way to
> > > > realize it, so I did it in a similar manner to how it is
> > > > done within web browsers with what is known as "smart
> > > > bookmarks". See http://ptaff.ca/smart/
> > >
> > > My French is not great, but if I interpreted that correctly,
> > > you are proposing nothing more than a parameterised variant
> > > of a Link desktop file.
> >
> > I think so, yes.
> >
> > > That seems a good idea, but it is not clear that it needs a
> > > new sub-type. Have you considered the alternative of
> > > extending the Link format?
> > >
> >
> > No, I don't think we need to extend the link format, because
> > it is almost identical to Application type, they are both a
> > Desktop Entry, but I could be wrong.
> >
> > > I notice that the current spec does not describe the expected
> > > behaviour of Link and Directory files at all!
> > >
> >
> > This is not directly related to our issue, am I correct?
> > What is Directory file?
> >
> > > Thanks,
> > >
> > > Giles
> > >
> > >
> > > -----Original Message-----
> > > From: Genghis Khan [mailto:***@gmx.ca]
> > > Sent: 07 January 2016 8:39 AM
> > > To: Giles Atkinson
> > > Cc: ***@lists.freedesktop.org
> > > Subject: Re: RE: Type=Webapp
> > >
> > > Hello Giles,
> > >
> > > Please pardon me for being unclear.
> > >
> > > I have answered to your queries, but, if you may, please
> > > elaborate on the following part of your message:
> > >
> > > > so is it intended purely for the "application" argument of
> > > > "xdg-mime default"? If not, what does it do?
> > >
> > > See rest of message below.
> > >
> > > > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > > > From: "Giles Atkinson" <***@citrix.com>
> > > > To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > Subject: RE: Type=Webapp
> > > >
> > > > Genghis,
> > > >
> > > > I think this needs additional explanation. My guess is that
> > > > such entries are not expected to be visible (NoDisplay=true),
> > > > so is it intended purely for the "application" argument of
> > > > "xdg-mime default"? If not, what does it do?
> > > >
> > >
> > > Yes, mostly, but not exclusively.
> > >
> > > Such entries are mostly to be used with invoking protocols such
> > > as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
> > >
> > > Yet these entries may also be used as standalone launchers and,
> > > as such, are to be visible (NoDisplay=false).
> > >
> > > > How do you expect a Desktop File of this type to be activated?
> > > > What do you expect to happen when such an entry is activated
> > > > (there is no Exec key)?
> > > >
> > >
> > > Indeed, there is no Exec key, only Link key, and such launchers
> > > would be activated with a default web browser, similarly to entries
> > > of Type=Link.
> > >
> > > > The meaning of the Link item is unclear. The spec defines the
> > > > %u substitution as handling a URL, but yours is already in the
> > > > tail of a URL.
> > > >
> > >
> > > Yes, this is because I did not figure of a better way to realize it,
> > > so I did it in a similar manner to how it is done within web browsers
> > > with what is known as "smart bookmarks". See http://ptaff.ca/smart/
> > >
> > > > Thanks,
> > > >
> > > > Giles
> > > >
> > > > -----Original Message-----
> > > > From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> > > > Sent: 06 January 2016 11:47 AM
> > > > To: ***@lists.freedesktop.org
> > > > Subject: Re: Type=Webapp
> > > >
> > > > This might also be used for editing documents with online
> > > > word processors or spreadsheet editors etc.
> > > >
> > > > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > > > From: "Genghis Khan" <***@gmx.ca>
> > > > > To: ***@lists.freedesktop.org
> > > > > Subject: Type=Webapp
> > > > >
> > > > > Hallo,
> > > > >
> > > > >
> > > > > I would like to propose a new type of Desktop shortcut.
> > > > >
> > > > > Type=Webapp
> > > > >
> > > > > Instead of having to repeat a Register Protocol Handler
> > > > > procedure to add a "webapp", I suggest to create a .desktop
> > > > > file to directory .local/share/applications/ instead of or
> > > > > in addition to this procedure for two reasons:
> > > > >
> > > > > 1. Not to have to repeat this procedure with every web
> > > > > browser.
> > > > >
> > > > > 2. The ability to access a "webapp" with a click on a
> > > > > hyperlink in applications that are not web browsers.
> > > > >
> > > > > Referring to API:
> > > > > window.navigator.registerProtocolHandler(protocol, uri, title);
> > > > >
> > > > > Type=Webapp is mostly, if not solely, intended for
> > > > > associating web browsers with protocol MIME types.
> > > > >
> > > > > Example Desktop Entry File (KiwiIRC as an example)
> > > > >
> > > > > [Desktop Entry]
> > > > > Version=2.0
> > > > > Type=Webapp
> > > > > NoDisplay=true
> > > > > Name=KiwiIRC
> > > > > Comment=Chat over the Internet Relay Chat network
> > > > > Link=https://irc.freedesktop.org/%u
> > > > > Icon=kiwiirc
> > > > > MimeType=x-scheme-handler/irc;
> > > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > > >
> > > > > Please post your opinions and thoughts.
> > > > >
> > > > >
> > > > > With regards,
> > > > > --GK
> > > > >
> > > >
> > >
> >
> _______________________________________________
> xdg mailing list
> ***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
Giles Atkinson
2016-01-13 18:43:42 UTC
Permalink
Genghis,

I think it is not completely defined yet, as the handling of parameters may be more complex than it looks. Since the desktop file will be claiming one or more URI schemes, it must be able to handle complete URIs of those schemes. But your original proposal was to handle URI fragments, and format them into a template URI. The template for complete URIs may need to be different to that for fragments. I think that could be handled by allowing multiple Link lines with different substitution keys:

[Desktop Entry]
Version=1.1
Type=Link
NoDisplay=false
Name=KiwiIRC
Comment=Chat over the Internet Relay Chat network
Link=https://irc.freedesktop.org/server/%u
Link=https://irc.freedesktop.org/handle/%s
Icon=kiwiirc
MimeType=x-scheme-handler/irc;
Actions=Nickname;Register;MOTD; #actions might be useful

Here '%s' is a fragment substitution. The desktop software must parse the string it is given to see if it is a valid URI for a scheme that the Desktop File claims. If so, it looks for a Link line with %u substitution. Othersise it looks for one with %s.

It would also be good to handle ordinary MIME types and file data. But I think that will require a new spec for a method to pass a URI and file(s) to a browser, with the files becoming default uploads if the page requests them.

Does this make sense?

Giles

-----Original Message-----
From: Genghis Khan [mailto:***@gmx.ca]
Sent: 11 January 2016 6:21 AM
To: Giles Atkinson
Cc: ***@lists.freedesktop.org
Subject: Re: RE: RE: RE: Type=Webapp

Please ignore my last post.
This is what Type=Link already provides.

Giles, would you like to send an enhancement request to the
bug tracker?

> Sent: Saturday, January 09, 2016 at 2:08 PM
> From: "Genghis Khan" <***@gmx.ca>
> To: "Giles Atkinson" <***@citrix.com>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: Re: RE: RE: RE: Type=Webapp
>
> Giles,
>
> Below is a note I forgot to add in my last message.
>
> > Sent: Thursday, January 07, 2016 at 7:57 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: RE: RE: Type=Webapp
> >
> > Genghis,
> >
> > >> That seems a good idea, but it is not clear that it needs a
> > >> new sub-type. Have you considered the alternative of
> > >> extending the Link format?
> >
> > > No, I don't think we need to extend the link format, because
> > > it is almost identical to Application type, they are both a
> > >Desktop Entry, but I could be wrong.
> >
> > What I mean is that I think the "Type=Webapp" is not needed,
> > and your example could look like this.
> >
> > [Desktop Entry]
> > Version=1.1
> > Type=Link
> > NoDisplay=true
> > Name=KiwiIRC
> > Comment=Chat over the Internet Relay Chat network
> > Link=https://irc.freedesktop.org/%u
> > Icon=kiwiirc
> > MimeType=x-scheme-handler/irc;
> > Actions=Nickname;Register;MOTD; #actions might be useful
> >
> > So what would be added is the new key "Link" that defines a
> > URI with substitution(s).The Desktop file could also contain
> > the "URL" key, to specify a separate URI to be used when no
> > parameter is passed. And Link type Desktop files can now
> > have Actions, with their own Link and URL keys.
> >
>
> I do not know how to realize it in the est way, but please take
> into consideration, if you did not, that one might want to use
> a Webapp to handle a protocol (e.g. feed: for RSS feeds) where
> we use NoDisplay=true, and also to use a Webapp as is, which is
> a case where we *would not* use NoDisplay=true.
>
> Examples: Chat clients and Feed Readers (TinyTinyRSS).
>
> Sometimes, I would want to subscribe to a feed with TinyTinyRSS,
> and sometimes, I would want to check for news updates.
>

Type=Link already does it.

> > >> I notice that the current spec does not describe the expected
> > >> behaviour of Link and Directory files at all!
> >
> > > This is not directly related to our issue, am I correct?
> >
> > Yes, I think so.
> >
> > > What is Directory file?
> >
> > A special type of Desktop file. I think it is used only with the
> > XDG Menu spec.
> >
> > Giles
> >
> > -----Original Message-----
> > From: Genghis Khan [mailto:***@gmx.ca]
> > Sent: 07 January 2016 3:55 PM
> > To: Giles Atkinson
> > Cc: ***@lists.freedesktop.org
> > Subject: Re: RE: RE: Type=Webapp
> >
> > Hallo,
> >
> > > Sent: Thursday, January 07, 2016 at 12:47 PM
> > > From: "Giles Atkinson" <***@citrix.com>
> > > To: "'Genghis Khan'" <***@gmx.ca>
> > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > Subject: RE: RE: Type=Webapp
> > >
> > > Genghis,
> > >
> > > > Please pardon me for being unclear.
> > >
> > > I did not think your posting unclear, but the details need
> > > to be worked out and described unambiguously before a new
> > > file sub-type can be added to the spec. The existing
> > > specification could use some improvements in this area (see
> > > below).
> > >
> >
> > Thank you. It was a note to myself ;-)
> >
> > > > I have answered to your queries, but, if you may, please
> > > > elaborate on the following part of your message:
> > >
> > > >> so is it intended purely for the "application" argument of
> > > >> "xdg-mime default"? If not, what does it do?
> > >
> > > In my (limited) experience adding a desktop file with a MimeType
> > > line does not register a new MIME data handler with the Desktop
> > > system. In fact it seems to have no effect at all. I have
> > > tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> > > "xdg-mime default" must be used to associate the MIME type with
> > > the desktop file.
> > >
> >
> > Yes, indeed so. Now, I understand what you meant by "xdg-mime".
> >
> > Webapp launchers are to be included, by user demand, in:
> > defaults.list
> > mimeapps.list
> >
> > > The spec says this about the MimeType key:
> > >
> > > The MimeType key is used to indicate the MIME Types that an
> > > application knows how to handle. It is expected that for some
> > > applications this list could become long. An application is
> > > expected to be able to reasonably open files of these types using
> > > the command listed in the Exec key.
> > >
> > > There should be no priority for MIME Types in this field, or any
> > > form of priority in the desktop file. Priority for applications
> > > is handled external to the .desktop files.
> > >
> > >
> > > That suggests that there is no requirement for the key to do
> > > anything by itself.
> > >
> >
> > Desktop Entry of type Webapp, which is, eventually, a hybrid of
> > types Application and Link would certainly use "xdg-mime" as it
> > is with Application type and would behave as a Desktop Entry of
> > type Application.
> >
> > > > Indeed, there is no Exec key, only Link key, and such
> > > > launchers would be activated with a default web browser,
> > > > similarly to entries of Type=Link.
> > >
> > > >> The meaning of the Link item is unclear. The spec
> > > >> defines the %u substitution as handling a URL, but yours
> > > >> is already in the tail of a URL.
> > >
> > > > Yes, this is because I did not figure of a better way to
> > > > realize it, so I did it in a similar manner to how it is
> > > > done within web browsers with what is known as "smart
> > > > bookmarks". See http://ptaff.ca/smart/
> > >
> > > My French is not great, but if I interpreted that correctly,
> > > you are proposing nothing more than a parameterised variant
> > > of a Link desktop file.
> >
> > I think so, yes.
> >
> > > That seems a good idea, but it is not clear that it needs a
> > > new sub-type. Have you considered the alternative of
> > > extending the Link format?
> > >
> >
> > No, I don't think we need to extend the link format, because
> > it is almost identical to Application type, they are both a
> > Desktop Entry, but I could be wrong.
> >
> > > I notice that the current spec does not describe the expected
> > > behaviour of Link and Directory files at all!
> > >
> >
> > This is not directly related to our issue, am I correct?
> > What is Directory file?
> >
> > > Thanks,
> > >
> > > Giles
> > >
> > >
> > > -----Original Message-----
> > > From: Genghis Khan [mailto:***@gmx.ca]
> > > Sent: 07 January 2016 8:39 AM
> > > To: Giles Atkinson
> > > Cc: ***@lists.freedesktop.org
> > > Subject: Re: RE: Type=Webapp
> > >
> > > Hello Giles,
> > >
> > > Please pardon me for being unclear.
> > >
> > > I have answered to your queries, but, if you may, please
> > > elaborate on the following part of your message:
> > >
> > > > so is it intended purely for the "application" argument of
> > > > "xdg-mime default"? If not, what does it do?
> > >
> > > See rest of message below.
> > >
> > > > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > > > From: "Giles Atkinson" <***@citrix.com>
> > > > To: "'Genghis Khan'" <***@gmx.ca>, "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > Subject: RE: Type=Webapp
> > > >
> > > > Genghis,
> > > >
> > > > I think this needs additional explanation. My guess is that
> > > > such entries are not expected to be visible (NoDisplay=true),
> > > > so is it intended purely for the "application" argument of
> > > > "xdg-mime default"? If not, what does it do?
> > > >
> > >
> > > Yes, mostly, but not exclusively.
> > >
> > > Such entries are mostly to be used with invoking protocols such
> > > as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
> > >
> > > Yet these entries may also be used as standalone launchers and,
> > > as such, are to be visible (NoDisplay=false).
> > >
> > > > How do you expect a Desktop File of this type to be activated?
> > > > What do you expect to happen when such an entry is activated
> > > > (there is no Exec key)?
> > > >
> > >
> > > Indeed, there is no Exec key, only Link key, and such launchers
> > > would be activated with a default web browser, similarly to entries
> > > of Type=Link.
> > >
> > > > The meaning of the Link item is unclear. The spec defines the
> > > > %u substitution as handling a URL, but yours is already in the
> > > > tail of a URL.
> > > >
> > >
> > > Yes, this is because I did not figure of a better way to realize it,
> > > so I did it in a similar manner to how it is done within web browsers
> > > with what is known as "smart bookmarks". See http://ptaff.ca/smart/
> > >
> > > > Thanks,
> > > >
> > > > Giles
> > > >
> > > > -----Original Message-----
> > > > From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
> > > > Sent: 06 January 2016 11:47 AM
> > > > To: ***@lists.freedesktop.org
> > > > Subject: Re: Type=Webapp
> > > >
> > > > This might also be used for editing documents with online
> > > > word processors or spreadsheet editors etc.
> > > >
> > > > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > > > From: "Genghis Khan" <***@gmx.ca>
> > > > > To: ***@lists.freedesktop.org
> > > > > Subject: Type=Webapp
> > > > >
> > > > > Hallo,
> > > > >
> > > > >
> > > > > I would like to propose a new type of Desktop shortcut.
> > > > >
> > > > > Type=Webapp
> > > > >
> > > > > Instead of having to repeat a Register Protocol Handler
> > > > > procedure to add a "webapp", I suggest to create a .desktop
> > > > > file to directory .local/share/applications/ instead of or
> > > > > in addition to this procedure for two reasons:
> > > > >
> > > > > 1. Not to have to repeat this procedure with every web
> > > > > browser.
> > > > >
> > > > > 2. The ability to access a "webapp" with a click on a
> > > > > hyperlink in applications that are not web browsers.
> > > > >
> > > > > Referring to API:
> > > > > window.navigator.registerProtocolHandler(protocol, uri, title);
> > > > >
> > > > > Type=Webapp is mostly, if not solely, intended for
> > > > > associating web browsers with protocol MIME types.
> > > > >
> > > > > Example Desktop Entry File (KiwiIRC as an example)
> > > > >
> > > > > [Desktop Entry]
> > > > > Version=2.0
> > > > > Type=Webapp
> > > > > NoDisplay=true
> > > > > Name=KiwiIRC
> > > > > Comment=Chat over the Internet Relay Chat network
> > > > > Link=https://irc.freedesktop.org/%u
> > > > > Icon=kiwiirc
> > > > > MimeType=x-scheme-handler/irc;
> > > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > > >
> > > > > Please post your opinions and thoughts.
> > > > >
> > > > >
> > > > > With regards,
> > > > > --GK
> > > > >
> > > >
> > >
> >
> _______________________________________________
> xdg mailing list
> ***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
Genghis Khan
2016-01-23 11:45:52 UTC
Permalink
> Sent: Wednesday, January 13, 2016 at 8:43 PM
> From: "Giles Atkinson" <***@citrix.com>
> To: "'Genghis Khan'" <***@gmx.ca>
> Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: RE: RE: RE: RE: Type=Webapp
>
> Genghis,
>
> I think it is not completely defined yet, as the handling of
> parameters may be more complex than it looks. Since the desktop file
> will be claiming one or more URI schemes, it must be able to handle
> complete URIs of those schemes. But your original proposal was to
> handle URI fragments, and format them into a template URI. The
> template for complete URIs may need to be different to that for
> fragments. I think that could be handled by allowing multiple Link
> lines with different substitution keys:
>
> [Desktop Entry]
> Version=1.1
> Type=Link
> NoDisplay=false
> Name=KiwiIRC
> Comment=Chat over the Internet Relay Chat network
> Link=https://irc.freedesktop.org/server/%u
> Link=https://irc.freedesktop.org/handle/%s
> Icon=kiwiirc
> MimeType=x-scheme-handler/irc;
> Actions=Nickname;Register;MOTD; #actions might be useful
>
> Here '%s' is a fragment substitution. The desktop software must
> parse the string it is given to see if it is a valid URI for a scheme
> that the Desktop File claims. If so, it looks for a Link line with
> %u substitution. Othersise it looks for one with %s.
>
> It would also be good to handle ordinary MIME types and file data.
> But I think that will require a new spec for a method to pass a URI
> and file(s) to a browser, with the files becoming default uploads if
> the page requests them.
>
> Does this make sense?
>

I don't know.

I suggest to open a bug report for enhancement, and discuss everything
on the bug tracker.

> Giles
>
> -----Original Message-----
> From: Genghis Khan [mailto:***@gmx.ca]
> Sent: 11 January 2016 6:21 AM
> To: Giles Atkinson
> Cc: ***@lists.freedesktop.org
> Subject: Re: RE: RE: RE: Type=Webapp
>
> Please ignore my last post.
> This is what Type=Link already provides.
>
> Giles, would you like to send an enhancement request to the
> bug tracker?
>
> > Sent: Saturday, January 09, 2016 at 2:08 PM
> > From: "Genghis Khan" <***@gmx.ca>
> > To: "Giles Atkinson" <***@citrix.com>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: Re: RE: RE: RE: Type=Webapp
> >
> > Giles,
> >
> > Below is a note I forgot to add in my last message.
> >
> > > Sent: Thursday, January 07, 2016 at 7:57 PM
> > > From: "Giles Atkinson" <***@citrix.com>
> > > To: "'Genghis Khan'" <***@gmx.ca>
> > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > Subject: RE: RE: RE: Type=Webapp
> > >
> > > Genghis,
> > >
> > > >> That seems a good idea, but it is not clear that it needs a
> > > >> new sub-type. Have you considered the alternative of
> > > >> extending the Link format?
> > >
> > > > No, I don't think we need to extend the link format, because
> > > > it is almost identical to Application type, they are both a
> > > >Desktop Entry, but I could be wrong.
> > >
> > > What I mean is that I think the "Type=Webapp" is not needed,
> > > and your example could look like this.
> > >
> > > [Desktop Entry]
> > > Version=1.1
> > > Type=Link
> > > NoDisplay=true
> > > Name=KiwiIRC
> > > Comment=Chat over the Internet Relay Chat network
> > > Link=https://irc.freedesktop.org/%u
> > > Icon=kiwiirc
> > > MimeType=x-scheme-handler/irc;
> > > Actions=Nickname;Register;MOTD; #actions might be useful
> > >
> > > So what would be added is the new key "Link" that defines a
> > > URI with substitution(s).The Desktop file could also contain
> > > the "URL" key, to specify a separate URI to be used when no
> > > parameter is passed. And Link type Desktop files can now
> > > have Actions, with their own Link and URL keys.
> > >
> >
> > I do not know how to realize it in the est way, but please take
> > into consideration, if you did not, that one might want to use
> > a Webapp to handle a protocol (e.g. feed: for RSS feeds) where
> > we use NoDisplay=true, and also to use a Webapp as is, which is
> > a case where we *would not* use NoDisplay=true.
> >
> > Examples: Chat clients and Feed Readers (TinyTinyRSS).
> >
> > Sometimes, I would want to subscribe to a feed with TinyTinyRSS,
> > and sometimes, I would want to check for news updates.
> >
>
> Type=Link already does it.
>
> > > >> I notice that the current spec does not describe the expected
> > > >> behaviour of Link and Directory files at all!
> > >
> > > > This is not directly related to our issue, am I correct?
> > >
> > > Yes, I think so.
> > >
> > > > What is Directory file?
> > >
> > > A special type of Desktop file. I think it is used only with the
> > > XDG Menu spec.
> > >
> > > Giles
> > >
> > > -----Original Message-----
> > > From: Genghis Khan [mailto:***@gmx.ca]
> > > Sent: 07 January 2016 3:55 PM
> > > To: Giles Atkinson
> > > Cc: ***@lists.freedesktop.org
> > > Subject: Re: RE: RE: Type=Webapp
> > >
> > > Hallo,
> > >
> > > > Sent: Thursday, January 07, 2016 at 12:47 PM
> > > > From: "Giles Atkinson" <***@citrix.com>
> > > > To: "'Genghis Khan'" <***@gmx.ca>
> > > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > Subject: RE: RE: Type=Webapp
> > > >
> > > > Genghis,
> > > >
> > > > > Please pardon me for being unclear.
> > > >
> > > > I did not think your posting unclear, but the details need
> > > > to be worked out and described unambiguously before a new
> > > > file sub-type can be added to the spec. The existing
> > > > specification could use some improvements in this area (see
> > > > below).
> > > >
> > >
> > > Thank you. It was a note to myself ;-)
> > >
> > > > > I have answered to your queries, but, if you may, please
> > > > > elaborate on the following part of your message:
> > > >
> > > > >> so is it intended purely for the "application" argument of
> > > > >> "xdg-mime default"? If not, what does it do?
> > > >
> > > > In my (limited) experience adding a desktop file with a MimeType
> > > > line does not register a new MIME data handler with the Desktop
> > > > system. In fact it seems to have no effect at all. I have
> > > > tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> > > > "xdg-mime default" must be used to associate the MIME type with
> > > > the desktop file.
> > > >
> > >
> > > Yes, indeed so. Now, I understand what you meant by "xdg-mime".
> > >
> > > Webapp launchers are to be included, by user demand, in:
> > > defaults.list
> > > mimeapps.list
> > >
> > > > The spec says this about the MimeType key:
> > > >
> > > > The MimeType key is used to indicate the MIME Types that an
> > > > application knows how to handle. It is expected that for some
> > > > applications this list could become long. An application is
> > > > expected to be able to reasonably open files of these types
> > > > using the command listed in the Exec key.
> > > >
> > > > There should be no priority for MIME Types in this field, or any
> > > > form of priority in the desktop file. Priority for applications
> > > > is handled external to the .desktop files.
> > > >
> > > >
> > > > That suggests that there is no requirement for the key to do
> > > > anything by itself.
> > > >
> > >
> > > Desktop Entry of type Webapp, which is, eventually, a hybrid of
> > > types Application and Link would certainly use "xdg-mime" as it
> > > is with Application type and would behave as a Desktop Entry of
> > > type Application.
> > >
> > > > > Indeed, there is no Exec key, only Link key, and such
> > > > > launchers would be activated with a default web browser,
> > > > > similarly to entries of Type=Link.
> > > >
> > > > >> The meaning of the Link item is unclear. The spec
> > > > >> defines the %u substitution as handling a URL, but yours
> > > > >> is already in the tail of a URL.
> > > >
> > > > > Yes, this is because I did not figure of a better way to
> > > > > realize it, so I did it in a similar manner to how it is
> > > > > done within web browsers with what is known as "smart
> > > > > bookmarks". See http://ptaff.ca/smart/
> > > >
> > > > My French is not great, but if I interpreted that correctly,
> > > > you are proposing nothing more than a parameterised variant
> > > > of a Link desktop file.
> > >
> > > I think so, yes.
> > >
> > > > That seems a good idea, but it is not clear that it needs a
> > > > new sub-type. Have you considered the alternative of
> > > > extending the Link format?
> > > >
> > >
> > > No, I don't think we need to extend the link format, because
> > > it is almost identical to Application type, they are both a
> > > Desktop Entry, but I could be wrong.
> > >
> > > > I notice that the current spec does not describe the expected
> > > > behaviour of Link and Directory files at all!
> > > >
> > >
> > > This is not directly related to our issue, am I correct?
> > > What is Directory file?
> > >
> > > > Thanks,
> > > >
> > > > Giles
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Genghis Khan [mailto:***@gmx.ca]
> > > > Sent: 07 January 2016 8:39 AM
> > > > To: Giles Atkinson
> > > > Cc: ***@lists.freedesktop.org
> > > > Subject: Re: RE: Type=Webapp
> > > >
> > > > Hello Giles,
> > > >
> > > > Please pardon me for being unclear.
> > > >
> > > > I have answered to your queries, but, if you may, please
> > > > elaborate on the following part of your message:
> > > >
> > > > > so is it intended purely for the "application" argument of
> > > > > "xdg-mime default"? If not, what does it do?
> > > >
> > > > See rest of message below.
> > > >
> > > > > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > > > > From: "Giles Atkinson" <***@citrix.com>
> > > > > To: "'Genghis Khan'" <***@gmx.ca>,
> > > > > "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > > Subject: RE: Type=Webapp
> > > > >
> > > > > Genghis,
> > > > >
> > > > > I think this needs additional explanation. My guess is that
> > > > > such entries are not expected to be visible (NoDisplay=true),
> > > > > so is it intended purely for the "application" argument of
> > > > > "xdg-mime default"? If not, what does it do?
> > > > >
> > > >
> > > > Yes, mostly, but not exclusively.
> > > >
> > > > Such entries are mostly to be used with invoking protocols such
> > > > as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
> > > >
> > > > Yet these entries may also be used as standalone launchers and,
> > > > as such, are to be visible (NoDisplay=false).
> > > >
> > > > > How do you expect a Desktop File of this type to be activated?
> > > > > What do you expect to happen when such an entry is activated
> > > > > (there is no Exec key)?
> > > > >
> > > >
> > > > Indeed, there is no Exec key, only Link key, and such launchers
> > > > would be activated with a default web browser, similarly to
> > > > entries of Type=Link.
> > > >
> > > > > The meaning of the Link item is unclear. The spec defines the
> > > > > %u substitution as handling a URL, but yours is already in the
> > > > > tail of a URL.
> > > > >
> > > >
> > > > Yes, this is because I did not figure of a better way to
> > > > realize it, so I did it in a similar manner to how it is done
> > > > within web browsers with what is known as "smart bookmarks".
> > > > See http://ptaff.ca/smart/
> > > >
> > > > > Thanks,
> > > > >
> > > > > Giles
> > > > >
> > > > > -----Original Message-----
> > > > > From: xdg [mailto:xdg-***@lists.freedesktop.org] On
> > > > > Behalf Of Genghis Khan Sent: 06 January 2016 11:47 AM
> > > > > To: ***@lists.freedesktop.org
> > > > > Subject: Re: Type=Webapp
> > > > >
> > > > > This might also be used for editing documents with online
> > > > > word processors or spreadsheet editors etc.
> > > > >
> > > > > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > > > > From: "Genghis Khan" <***@gmx.ca>
> > > > > > To: ***@lists.freedesktop.org
> > > > > > Subject: Type=Webapp
> > > > > >
> > > > > > Hallo,
> > > > > >
> > > > > >
> > > > > > I would like to propose a new type of Desktop shortcut.
> > > > > >
> > > > > > Type=Webapp
> > > > > >
> > > > > > Instead of having to repeat a Register Protocol Handler
> > > > > > procedure to add a "webapp", I suggest to create a .desktop
> > > > > > file to directory .local/share/applications/ instead of or
> > > > > > in addition to this procedure for two reasons:
> > > > > >
> > > > > > 1. Not to have to repeat this procedure with every web
> > > > > > browser.
> > > > > >
> > > > > > 2. The ability to access a "webapp" with a click on a
> > > > > > hyperlink in applications that are not web browsers.
> > > > > >
> > > > > > Referring to API:
> > > > > > window.navigator.registerProtocolHandler(protocol, uri,
> > > > > > title);
> > > > > >
> > > > > > Type=Webapp is mostly, if not solely, intended for
> > > > > > associating web browsers with protocol MIME types.
> > > > > >
> > > > > > Example Desktop Entry File (KiwiIRC as an example)
> > > > > >
> > > > > > [Desktop Entry]
> > > > > > Version=2.0
> > > > > > Type=Webapp
> > > > > > NoDisplay=true
> > > > > > Name=KiwiIRC
> > > > > > Comment=Chat over the Internet Relay Chat network
> > > > > > Link=https://irc.freedesktop.org/%u
> > > > > > Icon=kiwiirc
> > > > > > MimeType=x-scheme-handler/irc;
> > > > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > > > >
> > > > > > Please post your opinions and thoughts.
> > > > > >
> > > > > >
> > > > > > With regards,
> > > > > > --GK
> > > > > >
> > > > >
> > > >
> > >
> > _______________________________________________
> > xdg mailing list
> > ***@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/xdg
> >
>
Genghis Khan
2016-02-17 11:49:09 UTC
Permalink
Hello Giles,

I have opened a bug report for xdg-app.
I could not add your email address to CC.

See https://bugs.freedesktop.org/show_bug.cgi?id=94191

> Sent: Saturday, January 23, 2016 at 1:45 PM
> From: "Genghis Khan" <***@gmx.ca>
> To: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: Re: RE: RE: RE: RE: Type=Webapp
>
>
>
> > Sent: Wednesday, January 13, 2016 at 8:43 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: RE: RE: RE: Type=Webapp
> >
> > Genghis,
> >
> > I think it is not completely defined yet, as the handling of
> > parameters may be more complex than it looks. Since the desktop file
> > will be claiming one or more URI schemes, it must be able to handle
> > complete URIs of those schemes. But your original proposal was to
> > handle URI fragments, and format them into a template URI. The
> > template for complete URIs may need to be different to that for
> > fragments. I think that could be handled by allowing multiple Link
> > lines with different substitution keys:
> >
> > [Desktop Entry]
> > Version=1.1
> > Type=Link
> > NoDisplay=false
> > Name=KiwiIRC
> > Comment=Chat over the Internet Relay Chat network
> > Link=https://irc.freedesktop.org/server/%u
> > Link=https://irc.freedesktop.org/handle/%s
> > Icon=kiwiirc
> > MimeType=x-scheme-handler/irc;
> > Actions=Nickname;Register;MOTD; #actions might be useful
> >
> > Here '%s' is a fragment substitution. The desktop software must
> > parse the string it is given to see if it is a valid URI for a scheme
> > that the Desktop File claims. If so, it looks for a Link line with
> > %u substitution. Othersise it looks for one with %s.
> >
> > It would also be good to handle ordinary MIME types and file data.
> > But I think that will require a new spec for a method to pass a URI
> > and file(s) to a browser, with the files becoming default uploads if
> > the page requests them.
> >
> > Does this make sense?
> >
>
> I don't know.
>
> I suggest to open a bug report for enhancement, and discuss everything
> on the bug tracker.
>
> > Giles
> >
> > -----Original Message-----
> > From: Genghis Khan [mailto:***@gmx.ca]
> > Sent: 11 January 2016 6:21 AM
> > To: Giles Atkinson
> > Cc: ***@lists.freedesktop.org
> > Subject: Re: RE: RE: RE: Type=Webapp
> >
> > Please ignore my last post.
> > This is what Type=Link already provides.
> >
> > Giles, would you like to send an enhancement request to the
> > bug tracker?
> >
> > > Sent: Saturday, January 09, 2016 at 2:08 PM
> > > From: "Genghis Khan" <***@gmx.ca>
> > > To: "Giles Atkinson" <***@citrix.com>
> > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > Subject: Re: RE: RE: RE: Type=Webapp
> > >
> > > Giles,
> > >
> > > Below is a note I forgot to add in my last message.
> > >
> > > > Sent: Thursday, January 07, 2016 at 7:57 PM
> > > > From: "Giles Atkinson" <***@citrix.com>
> > > > To: "'Genghis Khan'" <***@gmx.ca>
> > > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > Subject: RE: RE: RE: Type=Webapp
> > > >
> > > > Genghis,
> > > >
> > > > >> That seems a good idea, but it is not clear that it needs a
> > > > >> new sub-type. Have you considered the alternative of
> > > > >> extending the Link format?
> > > >
> > > > > No, I don't think we need to extend the link format, because
> > > > > it is almost identical to Application type, they are both a
> > > > >Desktop Entry, but I could be wrong.
> > > >
> > > > What I mean is that I think the "Type=Webapp" is not needed,
> > > > and your example could look like this.
> > > >
> > > > [Desktop Entry]
> > > > Version=1.1
> > > > Type=Link
> > > > NoDisplay=true
> > > > Name=KiwiIRC
> > > > Comment=Chat over the Internet Relay Chat network
> > > > Link=https://irc.freedesktop.org/%u
> > > > Icon=kiwiirc
> > > > MimeType=x-scheme-handler/irc;
> > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > >
> > > > So what would be added is the new key "Link" that defines a
> > > > URI with substitution(s).The Desktop file could also contain
> > > > the "URL" key, to specify a separate URI to be used when no
> > > > parameter is passed. And Link type Desktop files can now
> > > > have Actions, with their own Link and URL keys.
> > > >
> > >
> > > I do not know how to realize it in the est way, but please take
> > > into consideration, if you did not, that one might want to use
> > > a Webapp to handle a protocol (e.g. feed: for RSS feeds) where
> > > we use NoDisplay=true, and also to use a Webapp as is, which is
> > > a case where we *would not* use NoDisplay=true.
> > >
> > > Examples: Chat clients and Feed Readers (TinyTinyRSS).
> > >
> > > Sometimes, I would want to subscribe to a feed with TinyTinyRSS,
> > > and sometimes, I would want to check for news updates.
> > >
> >
> > Type=Link already does it.
> >
> > > > >> I notice that the current spec does not describe the expected
> > > > >> behaviour of Link and Directory files at all!
> > > >
> > > > > This is not directly related to our issue, am I correct?
> > > >
> > > > Yes, I think so.
> > > >
> > > > > What is Directory file?
> > > >
> > > > A special type of Desktop file. I think it is used only with the
> > > > XDG Menu spec.
> > > >
> > > > Giles
> > > >
> > > > -----Original Message-----
> > > > From: Genghis Khan [mailto:***@gmx.ca]
> > > > Sent: 07 January 2016 3:55 PM
> > > > To: Giles Atkinson
> > > > Cc: ***@lists.freedesktop.org
> > > > Subject: Re: RE: RE: Type=Webapp
> > > >
> > > > Hallo,
> > > >
> > > > > Sent: Thursday, January 07, 2016 at 12:47 PM
> > > > > From: "Giles Atkinson" <***@citrix.com>
> > > > > To: "'Genghis Khan'" <***@gmx.ca>
> > > > > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > > Subject: RE: RE: Type=Webapp
> > > > >
> > > > > Genghis,
> > > > >
> > > > > > Please pardon me for being unclear.
> > > > >
> > > > > I did not think your posting unclear, but the details need
> > > > > to be worked out and described unambiguously before a new
> > > > > file sub-type can be added to the spec. The existing
> > > > > specification could use some improvements in this area (see
> > > > > below).
> > > > >
> > > >
> > > > Thank you. It was a note to myself ;-)
> > > >
> > > > > > I have answered to your queries, but, if you may, please
> > > > > > elaborate on the following part of your message:
> > > > >
> > > > > >> so is it intended purely for the "application" argument of
> > > > > >> "xdg-mime default"? If not, what does it do?
> > > > >
> > > > > In my (limited) experience adding a desktop file with a MimeType
> > > > > line does not register a new MIME data handler with the Desktop
> > > > > system. In fact it seems to have no effect at all. I have
> > > > > tested KDE, Unity and (IIRC) GNOME. To add a handler, the
> > > > > "xdg-mime default" must be used to associate the MIME type with
> > > > > the desktop file.
> > > > >
> > > >
> > > > Yes, indeed so. Now, I understand what you meant by "xdg-mime".
> > > >
> > > > Webapp launchers are to be included, by user demand, in:
> > > > defaults.list
> > > > mimeapps.list
> > > >
> > > > > The spec says this about the MimeType key:
> > > > >
> > > > > The MimeType key is used to indicate the MIME Types that an
> > > > > application knows how to handle. It is expected that for some
> > > > > applications this list could become long. An application is
> > > > > expected to be able to reasonably open files of these types
> > > > > using the command listed in the Exec key.
> > > > >
> > > > > There should be no priority for MIME Types in this field, or any
> > > > > form of priority in the desktop file. Priority for applications
> > > > > is handled external to the .desktop files.
> > > > >
> > > > >
> > > > > That suggests that there is no requirement for the key to do
> > > > > anything by itself.
> > > > >
> > > >
> > > > Desktop Entry of type Webapp, which is, eventually, a hybrid of
> > > > types Application and Link would certainly use "xdg-mime" as it
> > > > is with Application type and would behave as a Desktop Entry of
> > > > type Application.
> > > >
> > > > > > Indeed, there is no Exec key, only Link key, and such
> > > > > > launchers would be activated with a default web browser,
> > > > > > similarly to entries of Type=Link.
> > > > >
> > > > > >> The meaning of the Link item is unclear. The spec
> > > > > >> defines the %u substitution as handling a URL, but yours
> > > > > >> is already in the tail of a URL.
> > > > >
> > > > > > Yes, this is because I did not figure of a better way to
> > > > > > realize it, so I did it in a similar manner to how it is
> > > > > > done within web browsers with what is known as "smart
> > > > > > bookmarks". See http://ptaff.ca/smart/
> > > > >
> > > > > My French is not great, but if I interpreted that correctly,
> > > > > you are proposing nothing more than a parameterised variant
> > > > > of a Link desktop file.
> > > >
> > > > I think so, yes.
> > > >
> > > > > That seems a good idea, but it is not clear that it needs a
> > > > > new sub-type. Have you considered the alternative of
> > > > > extending the Link format?
> > > > >
> > > >
> > > > No, I don't think we need to extend the link format, because
> > > > it is almost identical to Application type, they are both a
> > > > Desktop Entry, but I could be wrong.
> > > >
> > > > > I notice that the current spec does not describe the expected
> > > > > behaviour of Link and Directory files at all!
> > > > >
> > > >
> > > > This is not directly related to our issue, am I correct?
> > > > What is Directory file?
> > > >
> > > > > Thanks,
> > > > >
> > > > > Giles
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Genghis Khan [mailto:***@gmx.ca]
> > > > > Sent: 07 January 2016 8:39 AM
> > > > > To: Giles Atkinson
> > > > > Cc: ***@lists.freedesktop.org
> > > > > Subject: Re: RE: Type=Webapp
> > > > >
> > > > > Hello Giles,
> > > > >
> > > > > Please pardon me for being unclear.
> > > > >
> > > > > I have answered to your queries, but, if you may, please
> > > > > elaborate on the following part of your message:
> > > > >
> > > > > > so is it intended purely for the "application" argument of
> > > > > > "xdg-mime default"? If not, what does it do?
> > > > >
> > > > > See rest of message below.
> > > > >
> > > > > > Sent: Wednesday, January 06, 2016 at 5:34 PM
> > > > > > From: "Giles Atkinson" <***@citrix.com>
> > > > > > To: "'Genghis Khan'" <***@gmx.ca>,
> > > > > > "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > > > > > Subject: RE: Type=Webapp
> > > > > >
> > > > > > Genghis,
> > > > > >
> > > > > > I think this needs additional explanation. My guess is that
> > > > > > such entries are not expected to be visible (NoDisplay=true),
> > > > > > so is it intended purely for the "application" argument of
> > > > > > "xdg-mime default"? If not, what does it do?
> > > > > >
> > > > >
> > > > > Yes, mostly, but not exclusively.
> > > > >
> > > > > Such entries are mostly to be used with invoking protocols such
> > > > > as irc://, sip:, tox:, xmpp: or files such as ODT, TXT etc.
> > > > >
> > > > > Yet these entries may also be used as standalone launchers and,
> > > > > as such, are to be visible (NoDisplay=false).
> > > > >
> > > > > > How do you expect a Desktop File of this type to be activated?
> > > > > > What do you expect to happen when such an entry is activated
> > > > > > (there is no Exec key)?
> > > > > >
> > > > >
> > > > > Indeed, there is no Exec key, only Link key, and such launchers
> > > > > would be activated with a default web browser, similarly to
> > > > > entries of Type=Link.
> > > > >
> > > > > > The meaning of the Link item is unclear. The spec defines the
> > > > > > %u substitution as handling a URL, but yours is already in the
> > > > > > tail of a URL.
> > > > > >
> > > > >
> > > > > Yes, this is because I did not figure of a better way to
> > > > > realize it, so I did it in a similar manner to how it is done
> > > > > within web browsers with what is known as "smart bookmarks".
> > > > > See http://ptaff.ca/smart/
> > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Giles
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: xdg [mailto:xdg-***@lists.freedesktop.org] On
> > > > > > Behalf Of Genghis Khan Sent: 06 January 2016 11:47 AM
> > > > > > To: ***@lists.freedesktop.org
> > > > > > Subject: Re: Type=Webapp
> > > > > >
> > > > > > This might also be used for editing documents with online
> > > > > > word processors or spreadsheet editors etc.
> > > > > >
> > > > > > > Sent: Tuesday, January 05, 2016 at 6:43 AM
> > > > > > > From: "Genghis Khan" <***@gmx.ca>
> > > > > > > To: ***@lists.freedesktop.org
> > > > > > > Subject: Type=Webapp
> > > > > > >
> > > > > > > Hallo,
> > > > > > >
> > > > > > >
> > > > > > > I would like to propose a new type of Desktop shortcut.
> > > > > > >
> > > > > > > Type=Webapp
> > > > > > >
> > > > > > > Instead of having to repeat a Register Protocol Handler
> > > > > > > procedure to add a "webapp", I suggest to create a .desktop
> > > > > > > file to directory .local/share/applications/ instead of or
> > > > > > > in addition to this procedure for two reasons:
> > > > > > >
> > > > > > > 1. Not to have to repeat this procedure with every web
> > > > > > > browser.
> > > > > > >
> > > > > > > 2. The ability to access a "webapp" with a click on a
> > > > > > > hyperlink in applications that are not web browsers.
> > > > > > >
> > > > > > > Referring to API:
> > > > > > > window.navigator.registerProtocolHandler(protocol, uri,
> > > > > > > title);
> > > > > > >
> > > > > > > Type=Webapp is mostly, if not solely, intended for
> > > > > > > associating web browsers with protocol MIME types.
> > > > > > >
> > > > > > > Example Desktop Entry File (KiwiIRC as an example)
> > > > > > >
> > > > > > > [Desktop Entry]
> > > > > > > Version=2.0
> > > > > > > Type=Webapp
> > > > > > > NoDisplay=true
> > > > > > > Name=KiwiIRC
> > > > > > > Comment=Chat over the Internet Relay Chat network
> > > > > > > Link=https://irc.freedesktop.org/%u
> > > > > > > Icon=kiwiirc
> > > > > > > MimeType=x-scheme-handler/irc;
> > > > > > > Actions=Nickname;Register;MOTD; #actions might be useful
> > > > > > >
> > > > > > > Please post your opinions and thoughts.
> > > > > > >
> > > > > > >
> > > > > > > With regards,
> > > > > > > --GK
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > _______________________________________________
> > > xdg mailing list
> > > ***@lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/xdg
> > >
> >
> _______________________________________________
> xdg mailing list
> ***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
Giles Atkinson
2016-02-22 18:10:16 UTC
Permalink
Genghis,

I have been thinking about this some more, and I think the extension of Type=Link is
probably not needed. I can not see how it can do anything that can not be done
with Type=Exec and a small shell script. That will also be more portable, as the
behaviour of destkop files varies among desktop environments.

As far as I can tell, Type=Link is itself redundant. I can see no difference in behaviour
between these two desktop files:

[Desktop Entry]
Version=1.0
Type=Link
Name=Link to BBC
URL=http://www.bbc.co.uk
Icon=BBC

[Desktop Entry]
Version=1.0
Type=Exec
Name=Link to BBC
Exec=xdg-open http://www.bbc.co.uk
Icon=BBC

My guess is that Type=Link was defined before the xdg-utils programs.

Giles

-----Original Message-----
From: Genghis Khan [mailto:***@gmx.ca]
Sent: 17 February 2016 11:49 AM
To: ***@lists.freedesktop.org
Cc: Giles Atkinson
Subject: Re: RE: RE: RE: RE: Type=Webapp

Hello Giles,

I have opened a bug report for xdg-app.
I could not add your email address to CC.

See https://bugs.freedesktop.org/show_bug.cgi?id=94191

> Sent: Saturday, January 23, 2016 at 1:45 PM
> From: "Genghis Khan" <***@gmx.ca>
> To: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> Subject: Re: RE: RE: RE: RE: Type=Webapp
>
>
>
> > Sent: Wednesday, January 13, 2016 at 8:43 PM
> > From: "Giles Atkinson" <***@citrix.com>
> > To: "'Genghis Khan'" <***@gmx.ca>
> > Cc: "***@lists.freedesktop.org" <***@lists.freedesktop.org>
> > Subject: RE: RE: RE: RE: Type=Webapp
> >
> > Genghis,
> >
> > I think it is not completely defined yet, as the handling of
> > parameters may be more complex than it looks. Since the desktop file
> > will be claiming one or more URI schemes, it must be able to handle
> > complete URIs of those schemes. But your original proposal was to
> > handle URI fragments, and format them into a template URI. The
> > template for complete URIs may need to be different to that for
> > fragments. I think that could be handled by allowing multiple Link
> > lines with different substitution keys:
> >
> > [Desktop Entry]
> > Version=1.1
> > Type=Link
> > NoDisplay=false
> > Name=KiwiIRC
> > Comment=Chat over the Internet Relay Chat network
> > Link=https://irc.freedesktop.org/server/%u
> > Link=https://irc.freedesktop.org/handle/%s
> > Icon=kiwiirc
> > MimeType=x-scheme-handler/irc;
> > Actions=Nickname;Register;MOTD; #actions might be useful
> >
> > Here '%s' is a fragment substitution. The desktop software must
> > parse the string it is given to see if it is a valid URI for a scheme
> > that the Desktop File claims. If so, it looks for a Link line with
> > %u substitution. Othersise it looks for one with %s.
> >
> > It would also be good to handle ordinary MIME types and file data.
> > But I think that will require a new spec for a method to pass a URI
> > and file(s) to a browser, with the files becoming default uploads if
> > the page requests them.
> >
> > Does this make sense?
> >
>
> I don't know.
>
> I suggest to open a bug report for enhancement, and discuss everything
> on the bug tracker.
>
> > Giles
David Faure
2016-02-27 19:13:59 UTC
Permalink
On Monday 22 February 2016 18:10:16 Giles Atkinson wrote:
> Genghis,
>
> I have been thinking about this some more, and I think the extension of Type=Link is
> probably not needed. I can not see how it can do anything that can not be done
> with Type=Exec and a small shell script. That will also be more portable, as the
> behaviour of destkop files varies among desktop environments.
>
> As far as I can tell, Type=Link is itself redundant. I can see no difference in behaviour
> between these two desktop files:
>
> [Desktop Entry]
> Version=1.0
> Type=Link
> Name=Link to BBC
> URL=http://www.bbc.co.uk
> Icon=BBC
>
> [Desktop Entry]
> Version=1.0
> Type=Exec
> Name=Link to BBC
> Exec=xdg-open http://www.bbc.co.uk
> Icon=BBC

There are a few differences, depending on context. E.g. in konqueror clicking on the Type=Link
desktop file will open that URL in that same window, rather than launching a separate executable.

Similarly, Type=Link with URL=file:///tmp will allow a file manager to just navigate to that directory
rather than launching something else -- therefore it's a way to have symlinks that support translations.

> My guess is that Type=Link was defined before the xdg-utils programs.

That is correct, but not a sufficient argument for obsolescence.

--
David Faure, ***@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
Giles Atkinson
2016-01-06 17:23:50 UTC
Permalink
Genghis,

I think this needs additional explanation. My guess is that such entries are not expected to be visible (NoDisplay=true), so is it intended purely for the "application" argument of "xdg-mime default"? If not, what does it do? How do you expect a Desktop File of this type to be activated? What do you expect to happen when such an entry is activated (there is no Exec key)?

The meaning of the Link item is unclear. The spec defines the %u substitution as handling a URL, but yours is already in the tail of a URL.

Thanks,

Giles

-----Original Message-----
From: xdg [mailto:xdg-***@lists.freedesktop.org] On Behalf Of Genghis Khan
Sent: 06 January 2016 11:47 AM
To: ***@lists.freedesktop.org
Subject: Re: Type=Webapp

This might also be used for editing documents with online
word processors or spreadsheet editors etc.

> Sent: Tuesday, January 05, 2016 at 6:43 AM
> From: "Genghis Khan" <***@gmx.ca>
> To: ***@lists.freedesktop.org
> Subject: Type=Webapp
>
> Hallo,
>
>
> I would like to propose a new type of Desktop shortcut.
>
> Type=Webapp
>
> Instead of having to repeat a Register Protocol Handler
> procedure to add a "webapp", I suggest to create a .desktop
> file to directory .local/share/applications/ instead of or
> in addition to this procedure for two reasons:
>
> 1. Not to have to repeat this procedure with every web
> browser.
>
> 2. The ability to access a "webapp" with a click on a
> hyperlink in applications that are not web browsers.
>
> Referring to API:
> window.navigator.registerProtocolHandler(protocol, uri, title);
>
> Type=Webapp is mostly, if not solely, intended for
> associating web browsers with protocol MIME types.
>
> Example Desktop Entry File (KiwiIRC as an example)
>
> [Desktop Entry]
> Version=2.0
> Type=Webapp
> NoDisplay=true
> Name=KiwiIRC
> Comment=Chat over the Internet Relay Chat network
> Link=https://irc.freedesktop.org/%u
> Icon=kiwiirc
> MimeType=x-scheme-handler/irc;
> Actions=Nickname;Register;MOTD; #actions might be useful
>
> Please post your opinions and thoughts.
>
>
> With regards,
> --GK
>
_______________________________________________
xdg mailing list
***@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg
Loading...