Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-10-18 03:29:21

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
LinuxFirefox 131.0

How to add a menu entry to the desktop popup menu ?

I'd like to run some scripts by right-click on the desktop and select them from the desktop popup menu.

These scripts are already added to the whisker menu and to Thunar's custom actions
where they show up in a sub menu 'Tools', displayed for all files and dirs.

In Thunar this works perfectly fine.

On the desktop popup menu I also see the sub menu but it is empty.

What am I doing wrong here ?

Offline

#2 2024-10-18 10:17:40

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 537
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

Where did you put the scripts? Have you created .desktop files the each script?


Siduction
Debian Sid
Xfce 4.18

Offline

#3 2024-10-19 01:45:25

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

eriefisher wrote:

Where did you put the scripts? Have you created .desktop files the each script?

All scripts are located in a central script folder at ~/Documents/Scripts.
.Desktop files have been created and are located at ~/.local/share/applications

scripts run fine from terminal, from desktop menu and from Thunar popup menu as custom action.

They don't show up in menu entries of the desktop popup.

Thunar custom action settings:
- the appearance conditions are set as File pattern/Range *
- Appears if selection contains  all boxes checked.
- Command contains identical entry as the .desktop file
- Submenu  Tools  -> ok in Thunar, shows up on DesktopPopupMenu but is empty !

Offline

#4 2024-10-19 11:03:13

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 537
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

In the .desktop files there should be a line "Categories". Whatever is on the line will determine it's placement in the menu. I find it strange that it shows up in the Whisker Menu but not the desktop menu. Did you manually edit the Whisker Menu?


Siduction
Debian Sid
Xfce 4.18

Offline

#5 2024-10-19 11:11:23

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

eriefisher wrote:

Did you manually edit the Whisker Menu?

Yes, indeed I did.
Do I need an extra category to show on the desktop ?

Here the entry for categories:
Categories=System;Utility;

Last edited by FrankBKK (2024-10-19 11:17:10)

Offline

#6 2024-10-19 12:38:53

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 537
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

You should just be able to drag it to the desktop or copy it there to show up provided you allow desktop icons.

There is a menu editing tool but the name escapes me right now. Once the Category is created you can add it to the Category line in the .desktop file and it should show up. For instance if you add a Tools sub menu to the desktop menu and add Tools to the Category line then it will show up there. Formatting is important in both the menu file(xml) and the .desktop file.

The menu file is in /etc/xdg/menus/xfce-applications.menu

You can see the format and edit it or add to it. I suggest you make a working copy and leave the original alone for a back up. I think once you have what you want you can leave it in ~/.menu and it will be preferred over the default file.

https://wiki.xfce.org/howto/customize-menu

Last edited by eriefisher (2024-10-19 13:07:52)


Siduction
Debian Sid
Xfce 4.18

Offline

#7 2024-10-19 13:40:18

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

eriefisher wrote:

There is a menu editing tool but the name escapes me right now. Once the Category is created you can add it to the Category line in the .desktop file and it should show up.

Thanks for the infos - I just tried as you described but to no avail.

I will dig a bit deeper in the XFCE docs and will report back....

Added later 15 h 46 min 36 s:
Reading up on all XFCE docs I could get my hands on things still did not work -
there was simply no way that popup menu entry would show up no matter which way I tried
to configure things.

So as a last straw I tried it on another system and things worked exactly as documented and
also suggested here.

It seems Linux Mint does things a bit differently.

Unfortunately I could not find any documentation on how exactly Mint modifies the XFCE configuration but from the looks of it ANY menu entries that are not created/modified via
menulibre are ignored when displaying a menu.

Once I added an additional category entry 'menulibre-new-directory' to my manually created entries they would show up, at least in the standard whisker menu.

Regarding the popup menu there is still no luck - it seems with the exception of some selected Thunar custom actions Mint is preventing any additional entries.

Offline

#8 2024-10-20 10:04:21

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,499
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

On the desktop popup menu I also see the sub menu but it is empty.

I think you might be experiencing this bug.

It was fixed with this merge/commit in xfdesktop 4.19.1 but does not appear to have been backported to the 4.18 branch.


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

#9 2024-10-20 11:19:05

FrankBKK
Member
From: far away
Registered: 2024-03-05
Posts: 14
LinuxFirefox 131.0

Re: How to add a menu entry to the desktop popup menu ?

that could explain it - thanks for the info !

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 9 queries executed - Memory usage: 557.81 KiB (Peak: 574.66 KiB) ]