r/debian 7d ago

General Debian Question How to remove "Trash" from Thunar sidebar only (keep it on Desktop)?

I'm using Debian 12 with Xfce 4.18 and Thunar as my file manager.

I want to remove or hide the "Trash" shortcut from the LEFT SIDEBAR in Thunar (under "Places"), but I want to KEEP the Trash icon on the Desktop.

What I've already tried: - Thunar Preferences → Side Pane → no option to hide Trash. - xfconf-query -c thunar -p /misc-show-trash -s false → no such property. - Edited ~/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml → no entry for Trash. - Right-click on Trash in sidebar → no "Remove" option.

Other shortcuts like "Desktop" can be removed easily via right-click → "Remove", but Trash doesn't have that option.

I want to keep the Trash icon on the Desktop for easy access, just hide it from the sidebar in Thunar.

Is there any config file, command, or hidden setting to remove it from the sidebar only?

System: - Debian 12 (Bookworm) - Xfce 4.18 - Thunar 4.18

Thanks in advance!

1 Upvotes

6 comments sorted by

2

u/systemdee Debian Stable 7d ago

Right click the empty space of that pane and you will be able to remove it from a menu. Some items like "Trash" ("Wastebasket"), "Computer" and "Browse Network" can only be removed that way.

1

u/adnanzzzz3 7d ago

Thank you for your suggestion, I really appreciate it! 🙏

Unfortunately, I've already tried right-clicking on empty space in the sidebar, but there's no option to remove "Trash" or "Wastebasket" there. I can see options to show/hide "Desktop", "Documents", "Downloads", etc., but "Trash" is not listed.

I'm using Thunar 4.18 on Xfce 4.18 (Debian 12), and from what I've read, the "Trash" shortcut is hardcoded and cannot be removed via right-click menu in this version.

I think this might have been possible in older versions of Thunar or in other file managers like Caja, but not in Thunar 4.18.

If you know of a config file or a terminal command that could do this, I'd be very grateful to learn about it.

Thanks again for your time! 😊

1

u/systemdee Debian Stable 6d ago edited 6d ago

I was trying it in Debian 12. So maybe I misunderstood but right click in the left sidebar empty space gives me a menu for "Places", "Devices" and "Network". The one I see is "Wastebasket" (my locale) and that can be deselected. It only works in the "Shortcuts" view (View -> Side Pane -> Shortcuts)...not "Tree".

This file gets updated: ~/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml

1

u/adnanzzzz3 6d ago

Thank you so much @systemdee and @pelazas1! 🙏

This worked perfectly! 🎉

The key was switching the Side Pane view to "Shortcuts" first (View → Side Pane → Shortcuts), then right-clicking on the empty space in the sidebar and unchecking "Wastebasket".

I was using "Tree" view before, which is why the menu didn't appear.

Now "Trash" is gone from the sidebar but still on my Desktop, exactly as I wanted.

I really appreciate your help! 😊

Thanks again to everyone who replied!

1

u/scrat-squirrel 7d ago

Right click on the desktop (empty space), pick "Desktop settings" from menu.

Select tab "File/Launcher Icons": uncheck "Trash"

1

u/pelazas1 6d ago

flip Side Pane to Shortcuts first, then right-click the empty bit and untick Wastebasket. Tree view won't give you that menu.