This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Desktop Entry of Type=Link

Tags: None
(comma "," separated)
cf.21758
Registered Member
Posts
1
Karma
0

Desktop Entry of Type=Link

Sun Feb 15, 2009 9:04 pm
Example:
------------------------
Real URL: "http://www.google.com/abc$def"
------------------------
".desktop" created by KDE whith the contextual menu:

[Desktop Entry]
Encoding=UTF-8
Icon=www
Type=Link
URL[$e]=http://www.google.com/abc$$def
------------------------


I have many questions:

1- "URL[$e]"
I know that "[$e]" mean that the value is a "dynamic value",
but why the recent version of KDE (3.5 or 4.2) always put a "[$e]" even if it's not necessary?
Anyway, Gnome do not understand the "[$e]", and it make the ".desktop" useless in Gnome.
Why the ".desktop" created by KDE are not compatible with Gnome?

Also, the "[$e]" do not seem to make a lot of difference in how KDE decode the URL.


2- "$$"
If the URL contain a "$" KDE will escape it. Example:
"http://www.google.com/abc$def" --> "http://www.google.com/abc$$def"

This is also incompatible with Gnome.
If we try to use it, KDE will see "abc$def" and Gnome will see "abc$$def", and the URL in the browser will not be the same one.
It do not work better in the other direction.
If the data in the ".desktop" is "abc$def", Gnome will read it correctly, but KDE will cut it to "abc".

How someone can create a ".desktop" that will work in both KDE and Gnome?
What is the official way to do that?


3- "Icon=www"
The icons of KDE 3.5 and KDE 4.2 are not the same.
For "http" KDE 3.5 will use "Icon=www" and KDE 4.2 will use "Icon=text-html".

How we can create a ".desktop" that will look good in both desktop?

Also what is the official set of icons for "http", "ftp", "news", "mailto"?

Example:
http: www
ftp: ftp
news: knode
mailto: mail_new


4- "$HOME"
The Desktop Entry of Type=Link can also point to a local file. Ex:
"URL[$e]=$HOME/Documents/text.txt"

In this case the "$" is usefull, and I hope there is a way to keep that and be compatible with Gnome.


5-
If I want to write a program that read a ".desktop" file, what is the good way to deal with "URL[$e]" and "$"?

Last edited by cf.21758 on Sun Feb 15, 2009 9:41 pm, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: Desktop Entry of Type=Link

Mon Feb 16, 2009 3:45 am
KDE 4 follows the XDG Icon Naming specification, while KDE 3 does not. Apart from making both use different *.desktop files I do not know of any way to provide different icons ( You could create the icon text-html for KDE 3 and place that in $HOME/.local/share/icons )

I believe KDE will not escape a URL if it is just "URL=". This would also make GNOME behave. Unforunately GNOME does not support [$e] in any way, so the $HOME URL will never work.

I believe KDesktopFile ( part of kdelibs ) will provide you with a KDE compliant way of reading *.desktop files.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

RE: Desktop Entry of Type=Link

Wed Feb 18, 2009 2:55 pm
My guess is that [$e] and the escaping/duplication of the $ in the URL is actually bug.

It looks like the URL is treated like a path entry, i.e. KConfigGroup::writePathEntry()

Instead of keeping it as an unchanged URL.

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan