Results 1 to 5 of 5

Thread: meaning of URL[$e] in a desktop file

  1. #1
    Join Date
    Sep 2008
    Posts
    2,997

    Default 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?

  2. #2

    Default Re: meaning of URL[$e] in a desktop file

    Quote Originally Posted by I_A View Post
    I'm having an issue with lxqt it doesn't show ~/Desktop/Home.desktop as an launcher but a simple text file
    I suppose this Home.desktop comes from Plasma?

    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 https://standards.freedesktop.org/de...ecognized-keys
    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.
    Code:
    wolfi@amiga:~> echo $HOME
    /home/wolfi
    Last edited by wolfi323; 26-Feb-2018 at 08:11.

  3. #3
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: meaning of URL[$e] in a desktop file

    Quote Originally Posted by wolfi323 View Post
    I suppose this Home.desktop comes from Plasma?


    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 https://standards.freedesktop.org/de...ecognized-keys


    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.
    Code:
    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
    Code:
    > xdg-open $HOME
    /usr/bin/xdg-open: line 885: pcmanfm: command not found
    I don't have pcmanfm installed but pcmanfm-qt
    Last edited by I_A; 26-Feb-2018 at 08:23.

  4. #4

    Default Re: meaning of URL[$e] in a desktop file

    Quote Originally Posted by I_A View Post
    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 think it actually means that the value should be evaluated by a shell (so that $HOME would get expanded to /home/xxx/)...
    Judging from https://techbase.kde.org/Development...ials/KCM_HowTo
    (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:
    Code:
    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
    Code:
    > xdg-open $HOME
    /usr/bin/xdg-open: line 885: pcmanfm: command not found
    I don't have pcmanfm installed but pcmanfm-qt
    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.
    Last edited by wolfi323; 26-Feb-2018 at 09:20.

  5. #5
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: meaning of URL[$e] in a desktop file

    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
    Code:
    URL[$e]=$HOME
    with
    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •