You are not logged in.
Hello everyone,
I'm having some trouble with XFCE desktop custom actions. I've successfully added some custom actions using Thunar's custom action editor, but I want also to remove some of the "default actions". Let's say I want to remove options like "Copy" and "Cut", to leave a more minimal contextual menu.
I was wondering if there is a configuration file where these "default actions" can be found, so I can remove them (and add my own in the same file).
Thanks in advance!
Last edited by m3cubo (2023-02-27 18:08:19)
Offline
Hello and welcome.
That context menu is hard-coded - you can't remove the upper sections without changing the code. However, Custom Actions now allow you to create menus and submenus within that context menu. You can make it cleaner by adding only a "Custom Actions..." menuitem on the context menu and burying all the custom actions in the submenu.
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
Thanks for your answer, ToZ! I supposed it could be hard-coded. I founded this, so maybe I could try to build it later: https://askubuntu.com/questions/337225/ … -in-thunar
I have find a tutorial that you linked in another post (about submenus), so I will put it here in case is useful: https://wiki.xfce.org/howto/customize-m … _sub-menus
Also, I have another question. Did you see the "Ø Digi" label in the image that I posted? That "Ø" should be the icon, which is correctly displayed in the Thunar window, but not in the Desktop. So, the name of custom action (Digi) is shown, and also the script associated is running fine. Did you know why the icon (which is an absolute path) is not displayed in the Desktop contextual menu?
Again, thanks for your help! (It is the first time I am registered in the forum, but your messages have been a help since I started using XFCE a few years ago)
Last edited by m3cubo (2023-02-26 11:27:21)
Offline
Also, I have another question. Did you see the "Ø Digi" label in the image that I posted? That "Ø" should be the icon, which is correctly displayed in the Thunar window, but not in the Desktop. So, the name of custom action (Digi) is shown, and also the script associated is running fine. Did you know why the icon (which is an absolute path) is not displayed in the Desktop contextual menu?
What version of xfdesktop and thunar are you running?
As for the icon you are trying to use, is it one from your icon theme of a custom one? Can you post back the Digi section from your ~/.config/Thunar/uca.xml file?
Again, thanks for your help! (It is the first time I am registered in the forum, but your messages have been a help since I started using XFCE a few years ago)
No worries - glad the info was useful.
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
I'm using xfdesktop version 4.16.0, and Xfce 4.16.
This is the fragment of ~/.config/Thunar/uca.xml:
(I am using an absolute path, it's an icon inside my folder user (/home/mint/))
<action>
<icon>/home/mint/DESKTOP/Visual/Icons/Digi/Icon.png</icon>
<name>Digi</name>
<unique-id>1660931731098047-1</unique-id>
<command>exo-open --working-directory %f --launch TerminalEmulator</command>
<description/>
<patterns>*</patterns>
<directories/>
</action>
Last edited by m3cubo (2023-02-27 14:16:53)
Offline
Can you try just using an icon name from your theme to see if it works (e.g. gtk-edit)? I vaguely remember a bug about icons using an absolute pathname in 4.16. Let me see if I can find it.
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
Yes, if I use a default icon it is shown in the Thunar window, and in the Desktop:
Offline
Try putting /home/mint/DESKTOP/Visual/Icons/Digi/Icon.png into ~/.icons (create the directory if it doesn't exist). And then for the custom action, just use "Icon".
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
Thanks! I have created the ~/.icons directory, and stored the image there. Then, the image can be searched like this:
And then, the image appeared in the desktop menu of custom actions also, not only in the Thunar window.
Thanks ToZ! I will mark it as solved. Have a nice day!
Offline
[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 556.53 KiB (Peak: 573.38 KiB) ]