Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-09-07 12:48:55

tortilla
Member
Registered: 2021-06-14
Posts: 32

.desktop files in other directory then ~/.local/share/applications [s]

Hi,

When the changes are made in the .desktop files stored directly in

~/applications

then those changes are immediately visible.

I have tested some .desktop files not stored in the ~/applications folder, but in another folder in the path /home/username/Documents/appsdir. And I have hardlinked the folder to

ln -s ~/applications/my-hardlink /home/username/Documents/appsdir

in the folder ~/applications. The .desktop entries from the "appsdir" are also shown in the main menu and are found in the xfce4-appfinder. Only it takes a while until these items or changes in these items from "appsdir" take effect in xfce4-appfinder.

These changes are effective at the latest when the user logs out and logs in again. My question is - is there a way to make these changes visible in xfce4-appfinder without having to logout?

Thank You!

Edit 2022-09-08: changed Title

Last edited by tortilla (2022-09-08 11:59:03)

Offline

#2 2022-09-07 20:22:52

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: .desktop files in other directory then ~/.local/share/applications [s]

tortilla wrote:

Hi,

When the changes are made in the .desktop files stored directly in

~/applications

then those changes are immediately visible.

Do you mean ~/.local/share/applications? "~/applications" isn't a named directory in the menu spec unless you have $XDG_DATA_DIRS set to $HOME.

I have tested some .desktop files not stored in the ~/applications folder, but in another folder in the path /home/username/Documents/appsdir. And I have hardlinked the folder to

ln -s ~/applications/my-hardlink /home/username/Documents/appsdir

This is actually a symbolic (soft) link you've created by passing the "-s" parameter.

These changes are effective at the latest when the user logs out and logs in again. My question is - is there a way to make these changes visible in xfce4-appfinder without having to logout?

xfce4-appfinder can run in daemon mode (see "Keep running instance in background" setting in its preferences). Does killing any running preference work then?

pkill xfce4-appfinder

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#3 2022-09-08 05:56:19

tortilla
Member
Registered: 2021-06-14
Posts: 32

Re: .desktop files in other directory then ~/.local/share/applications [s]

Thanks for the help @ToZ!

ToZ wrote:

Do you mean ~/.local/share/applications?

That's right, I mistyped.

ToZ wrote:

This is actually a symbolic (soft) link you've created by passing the "-s" parameter.

Good attention. Yes I have linked

/home/username/Documents/appsdir

in

~/.local/share/applications

with a softlink.

ToZ wrote:

Does killing any running preference work then?

Yes, the one with

pkill xfce4-appfinder

is much more time saving compared to constant logout and login. Question: Does repeated multiple killing jeopardize the stability of the xfce4-appfinder-application? The contents in my

/home/username/Documents/appsdir

folder are constantly changing and the Appfinder functionality is most valuable when the xfce4-appfinder- searchresults takes into account all recent changes in the queries.

ToZ wrote:

(see "Keep running instance in background" setting in its preferences).

Can I change the option "Keep running instance in background" via the GUI or in a txt file? Or is this only possible via terminal commands? The research on the topic "Keep running instance in background" gives me only results on the change with terminal commands.

Last edited by tortilla (2022-09-08 06:24:21)

Offline

#4 2022-09-08 06:52:47

KBar
Moderator
Registered: 2021-11-05
Posts: 689

Re: .desktop files in other directory then ~/.local/share/applications [s]

Preferences are shown in a graphical dialog:

HKyL4JUl.pngimAj19Il.png


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#5 2022-09-08 10:24:10

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: .desktop files in other directory then ~/.local/share/applications [s]

You can also change the setting via:

xfconf-query -c xfce4-appfinder -p /enable-service -T

...to toggle it or:

xfconf-query -c xfce4-appfinder -p /enable-service -s false
xfconf-query -c xfce4-appfinder -p /enable-service -s true

...to specifically set it off or on.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#6 2022-09-08 11:57:49

tortilla
Member
Registered: 2021-06-14
Posts: 32

Re: .desktop files in other directory then ~/.local/share/applications [s]

OK, disabling "Keep running instance in background" in the GUI works fine. And when creating the soft link in the folder

~/.local/share/applications

the .desktop entries stored in the linked folder are immediately displayed even without xfce4-appfinder restart. After removing the soft link, the window must be closed and xfce4-appfinder restarted for the changes to take effect.

Thank You for Help!

Last edited by tortilla (2022-09-08 12:58:12)

Offline

Board footer

Powered by FluxBB