Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-04-12 13:43:40

mccfrank
Member
Registered: 2013-11-02
Posts: 33

[SOLVED| Is "OnlySHowIn" working ?

I have a desktop file in /home/frank/Desktop which has "OnlyShowIn=LXDE" in it, but it still appears in my XFCE desktop.  Is XFCE ignoring the line?
Appreciate any help.

Last edited by mccfrank (2024-04-13 03:00:22)


It's what you learn after you know it all that makes the difference.

Offline

#2 2024-04-12 22:03:41

eight.bit.al
Member
Registered: 2022-06-09
Posts: 75

Re: [SOLVED| Is "OnlySHowIn" working ?

If I understand the problem, a file on the desktop will not be processed, so the system won't read the "OnlyShowIn=LXDE"

A .desktop file in the right directories will be processed. Really need more info.

2³bit

Last edited by eight.bit.al (2024-04-12 22:05:30)


Fight against surveillance capitalism.

Offline

#3 2024-04-12 22:19:27

mccfrank
Member
Registered: 2013-11-02
Posts: 33

Re: [SOLVED| Is "OnlySHowIn" working ?

Its simple. I created a desktop file ( logout-LXDE.desktop). It's sitting in the ~/Desktop directory. In the file I have as one of the directives "OnlyShowIn=LXDE". In XFCE, the file still appears on my desktop despite the directive basically telling XFCE NOT to display it.  Seems to me XFCE is ignoring the directive. I checked and the environment variable DesktopSession is set to XFCE.


It's what you learn after you know it all that makes the difference.

Offline

#4 2024-04-12 23:09:37

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

Re: [SOLVED| Is "OnlySHowIn" working ?

"OnlyShowIn" is an element of the freedesktop menu spec which means it is only relevant in xdg-compliant menu systems - the desktop is not such a menu system.


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

Offline

#5 2024-04-12 23:44:41

mccfrank
Member
Registered: 2013-11-02
Posts: 33

Re: [SOLVED| Is "OnlySHowIn" working ?

Ah now I see ! I had (wrongly) assumed if that directive were in a desktop file, then the system would not display it on the desktop. Obviously it does, but as you pointed out, it is excluded from the menu system.  Is there no way to prevent a desktop file created for one desktop environment to not be displayed in another desktop environment ? I guess not.


It's what you learn after you know it all that makes the difference.

Offline

#6 2024-04-13 00:50:29

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

Re: [SOLVED| Is "OnlySHowIn" working ?

mccfrank wrote:

Is there no way to prevent a desktop file created for one desktop environment to not be displayed in another desktop environment ?

Not directly through Xfce, but you might be able to work around it using xdg-user-dirs. If you look at ~/.config/user-dirs.dirs, you will see that DESKTOP points to ~/Desktop. You could create DE-specific Desktop directories (e.g. Desktop-Xfce, Desktop-LXDE, Desktop-KDE) and place the DE-specific apps in each of those folders and just set xdg's DESKTOP value to the proper Desktop file. Your environment variables already identify the desktop:

echo $XDG_CURRENT_DESKTOP

...so you could create a shell start up script that evaluates that variable and set sets the proper xdg DESKTOP directory. See: https://wiki.archlinux.org/title/XDG_user_directories.


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

Offline

#7 2024-04-13 02:51:30

mccfrank
Member
Registered: 2013-11-02
Posts: 33

Re: [SOLVED| Is "OnlySHowIn" working ?

Ah! That's a great idea.  Thank you very much.


It's what you learn after you know it all that makes the difference.

Offline

Board footer

Powered by FluxBB