• desktop entry appear with ~/.local/share/applications binding

    From InThech@21:1/5 to All on Sat Aug 6 11:44:46 2022
    ~$ cat .local/share/applications/test.desktop
    [Desktop Entry]
    Name=test123
    Exec=echo TEST
    Type=Application

    https://pasteboard.co/fuNEb9CLBHtO.png
    OK, it appear.

    ~$ mv -i .local/share/applications/test.desktop /var/tmp/applications/
    ~$ sudo mount --bind /var/tmp/applications .local/share/applications

    https://pasteboard.co/sIc4BYAEH64I.png
    It does not appear.

    Why?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From InThech@21:1/5 to All on Sat Aug 6 13:25:37 2022
    Il 06/08/22 11:44, InThech ha scritto:
    ~$ cat .local/share/applications/test.desktop
    [Desktop Entry]
    Name=test123
    Exec=echo TEST
    Type=Application

    https://pasteboard.co/fuNEb9CLBHtO.png
    OK, it appear.

    ~$ mv -i .local/share/applications/test.desktop /var/tmp/applications/
    ~$ sudo mount --bind /var/tmp/applications .local/share/applications

    https://pasteboard.co/sIc4BYAEH64I.png
    It does not appear.

    Why?

    SUBJECT CORRECTION:
    Replace *appear* with *not appear*

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Sat Aug 6 16:45:21 2022
    Please only post to one group to avoid confusion.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan N. Little@21:1/5 to InThech on Sat Aug 6 11:37:08 2022
    InThech wrote:
    Il 06/08/22 11:44, InThech ha scritto:
    ~$ cat .local/share/applications/test.desktop
    [Desktop Entry]
    Name=test123
    Exec=echo TEST
    Type=Application

    https://pasteboard.co/fuNEb9CLBHtO.png
    OK, it appear.

    ~$ mv -i .local/share/applications/test.desktop /var/tmp/applications/
    ~$ sudo mount --bind /var/tmp/applications .local/share/applications

    Don't do this. Install custom app shortcuts in your own profile, not at
    the system level because (especially if this is a modified version of a
    system app) would be replaced after app update.


    https://pasteboard.co/sIc4BYAEH64I.png
    It does not appear.

    Why?

    SUBJECT CORRECTION:
    Replace *appear* with *not appear*

    The correct way to do this is with a command, that "registers" the
    .desktop shortcut. Also you can use commands to validate and fix any
    errors possibly in your custom .desktop file.

    You were correct the .desktop file does belongs in
    ~/.local/share/applications. Here is a better way to accomplish this:

    1) Compose .desktop file temporally in an easily accessible directory,
    not directly in the hidden ~/.local/share/applications

    ex. ~/MyCustomizations/test.desktop

    2) Validate its format to make sure you haven't made any boo-boos with:

    desktop-file-validate ~/MyCustomizations/test.desktop

    3) If is passes then install it into ~/.local/share/applications/ with:
    (note this is a one line command, ignore the wrap)

    desktop-file-install --dir=~/.local/share/applications ~/MyCustomizations/test.desktop

    4) Now you will see the "app" in your app search. Also you now have a
    handy copy in ~/MyCustomizations/ for anytime you want to make
    modifications.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sativa GNutella@21:1/5 to InThech on Sun Aug 7 00:39:58 2022
    InThech <spam@a.b> Wrote in message:r
    ~$ cat .local/share/applications/test.desktop[Desktop Entry]Name=test123Exec=echo TESTType=Applicationhttps://pasteboard.co/fuNEb9CLBHtO.pngOK, it appear.~$ mv -i .local/share/applications/test.desktop /var/tmp/applications/~$ sudo mount --bind /var/
    tmp/applications .local/share/applicationshttps://pasteboard.co/sIc4BYAEH64I.pngIt does not appear.Why?

    I only copy an existing .desktop file and change it a little,
    copying the Firefox . desktop file shows how much options there
    are, and how to provide an icon.
    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From InThech@21:1/5 to All on Mon Aug 8 13:23:14 2022
    Il 06/08/22 17:37, Jonathan N. Little ha scritto:
    desktop-file-install --dir=~/.local/share/applications ~/MyCustomizations/test.desktop

    $ desktop-file-install --dir=~/.local/share/applications
    tor-translate.desktop
    $ ls ~/.local/share/applications/tor-translate.desktop
    ls: impossibile accedere a '/home/rino/.local/share/applications/tor-translate.desktop': File o
    directory non esistente

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan N. Little@21:1/5 to InThech on Mon Aug 8 12:50:40 2022
    InThech wrote:
    Il 06/08/22 17:37, Jonathan N. Little ha scritto:
    desktop-file-install --dir=~/.local/share/applications
    ~/MyCustomizations/test.desktop

    $ desktop-file-install --dir=~/.local/share/applications tor-translate.desktop
    $ ls ~/.local/share/applications/tor-translate.desktop
    ls: impossibile accedere a '/home/rino/.local/share/applications/tor-translate.desktop': File o directory non esistente


    Sorry I think you have to specify either absolute path:

    /home/rino/.local/share/applications

    or:

    relative to PWD but do not use '~/'

    Okay just confirm it:

    ~/$ mkdir demo
    ~/$ cd demo
    ~/demo$ nano demo.desktop
    ~/demo$ cat demo.desktop

    [Desktop Entry]
    Name=Demo
    Exec=zenity --info --text="Hello World!"
    Type=Application

    # Okay now I will validate it:
    ~/demo$ desktop-file-validate demo.desktop

    # It returns nothing so all is well. You can add something like
    BadParam=bogus to the file and desktop-file-validate will show you your
    error.

    ~/demo$ pwd
    /home/jonathan/demo
    ~/demo$ ls
    '~' demo.desktop

    # Just showing you where I am in this subdirectory with the demo.desktop
    file, now let's try and install it using '~/':

    ~/demo$ desktop-file-install --dir=~/.local/share/applications demo.desktop

    ~/demo$ ls ~/.local/share/applications/demo.desktop
    ls: cannot access
    '/home/jonathan/.local/share/applications/demo.desktop': No such file or directory

    # Confirms that this does not work, but if I use a relative path as so:

    ~/demo$ desktop-file-install --dir=../.local/share/applications demo.desktop

    ~/demo$ ls ~/.local/share/applications/demo.desktop /home/jonathan/.local/share/applications/demo.desktop

    # There we go, the .desktop file is installed. Also I could of course
    use the absolute path.

    HTH


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From InThech@21:1/5 to All on Tue Aug 9 11:40:44 2022
    Il 08/08/22 18:50, Jonathan N. Little ha scritto:
    ...

    thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)