meaning of URL[$e] in a desktop file

I’m having an issue with lxqt it doesn’t show ~/Desktop/Home.desktop as an launcher but a simple text file
it turned out to be two issues

  1. lxqt does not recognize the line
    URL$e]=$HOME

  2. pcmanfm-qt does not support the $HOME variable
    I opened an issue at the lxqt git page but they don’t know what URL$e] is I’m wondering if some of the kde experts know the meaning of it?

I suppose this Home.desktop comes from Plasma? :wink:

I opened an issue at the lxqt git page but they don’t know what URL$e] is I’m wondering if some of the kde experts know the meaning of it?

Well, Home.desktop is a desktop file of type “Link” (same as a “desktop shortcut” in Windows), the URL key specifies the URL this should link too.
See also Desktop Entry Specification

|URL
|
|If entry is Link type, the URL to access.|

IOW: URL=$HOME means this is a link/shortcut to $HOME.

(I’m not sure at the moment what the $e] is for though.)

You could achieve the same by setting “Type=Application” and adding “Exec=xdg-open $HOME” or similar.

PS: pcman-qt should have no need to “support” $HOME, this is an environment variable that should be expanded to /home/xxx/ (or whatever the user’s home directory is) by the (command line) shell.

wolfi@amiga:~> echo $HOME
/home/wolfi

yes it’s the home desktop launcher from plasma5
a google search revealed a possibility that [e$] means that the url contains special characters (in this case $) which should be passed to the application
https://forum.kde.org/viewtopic.php?t=32909
I really didn’t want to edit that file but adding “Type=Application” and adding “Exec=xdg-open $HOME” seams like a good compromise
regarding $HOME I do believe it’s an lxqt (pcmanfm-qt) bug as pasting that into the address bar opens / not /home

edit
that opened a new bug
executing

> xdg-open $HOME
/usr/bin/xdg-open: line 885: pcmanfm: command not found

I don’t have pcmanfm installed but pcmanfm-qt :stuck_out_tongue:

I think it actually means that the value should be evaluated by a shell (so that $HOME would get expanded to /home/xxx/)…
Judging from Development/Tutorials/KCM HowTo - KDE TechBase
(that’s actually documentation for how to create a systemsettings module, but that also uses standard .desktop files, with some special X-KDE-* extentions)

You can also make the value of this key depend on the output of a program, using the “$e]” key suffix. For example:

Hidden$e]=$(if test -e /dev/js*; then echo "false"; else echo "true"; fi)

This example executes the given code in a shell and uses the stdout output for the Hidden value (so it’s either Hidden=true or Hidden=false).

You could try to use “URL=/home/xxx/” instead, maybe LXQT would support this?

that opened a new bug
executing

> xdg-open $HOME
/usr/bin/xdg-open: line 885: pcmanfm: command not found

I don’t have pcmanfm installed but pcmanfm-qt :stuck_out_tongue:

Well, xdg-open should use the default file manager, whatever that is.
Apparently it has hardcoded pacmanfm for both LXDE and LXQT though. Or put differently, it treats LXQT equal to LXDE, and uses its LXDE code path which runs pacmanfm.
I’d regard this as bug (or “missing feature”) in xdg-open…

You could of course also use “pcmanfm-qt” instead of “xdg-open”, but then it would use pcmanfm-qt in Plasma as well.
It is possible to “hide” a desktop file in certain desktops or only show it on certain desktops though, via the OnlyShowIn and NotShowIn keys. So you could create two, one that’s only displayed by Plasma and one that’s only displayed by LXQT, if you want that.

the lxqt devs said it’s a known issue with libfm
the solution that works for me is a simple one just use absolute paths replace

URL$e]=$HOME

with

URL=/home/me

I’m writing this as a fix if another plasma 5 and lxqt user finds the non working Home desktop icon annoying