Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my RHEL58 (Gnome dektop) suddenly desktop's Trash stopped working. When I move something to Trash, it does not show up in desktop's Trash, but files do show in ~/.Trash. Yet, to delete from this folder, the only available GUI option is "Move to Trash", which just restores the same content in ~/.Trash without showing anything in the Trash on desktop. As the icon on desktop is always empty, "Empty Trash" option is disabled. The only way is to use rm -f from CLI, either with full pathname or from within ~/Trash.
I tried reboot the box, but nothing changed. How to fix the problem and make GUI work as it supposed to be?
My GUI is Gnome, but nevertheless in right-click menu Delete is greyed-out as Trash on desktop is always empty even though ~/.Trash keeps accumulating stuff every time Move To Trash command is issued. The only way to get rid of deleted stuff is to open ~/.Trash and do " rm -fR * ", which is cumbersome. I guess somehow Trash icon on desktop got disconnected from ~/.Trash folder. Is there a way to repair this? Unlike other links, Trash Properties do not allow this kind of repair.
First thing is, Empty Trash option will be available (i.e. enabled) only when there will be something inside it. If Trash folder is already empty, then Empty Trash option will show as disabled i.e grayed out.
Second, anything you remove using rm command or CLI, will not move into Trash folder. But anything you choose, using right click on it from GUI, to Move to Trash will go into Trash folder.
Meanwhile, if you want to move items to Trash from command line, you can try:-
Code:
~$ sudo apt-get install trash-cli # Install trash-cli
~$ trash-put file1 file2 # Put files in the trash
~$ trash-list # List files in trash
~$ trash-empty # Empty trash
However, in your present case, Trash folder is already empty.
First thing is, Empty Trash option will be available (i.e. enabled) only when there will be something inside it. If Trash folder is already empty, then Empty Trash option will show as disabled i.e grayed out.
First, thanks for enlightening me on what is known since Mac GUI was introduced, what, in '80s? That is truly an eye-opener.
Quote:
Second, anything you remove using rm command or CLI, will not move into Trash folder. But anything you choose, using right click on it from GUI, to Move to Trash will go into Trash folder.
First, I wrote twice already that moving items into Trash using right-click stopped working as supposed. Items go to ~/.Trash, but do not show up in desktop's Trash. Second, where in my two previous posts did I say I wanted to move items into the Trash using CLI? One must be a real CLI fanatic doing that when right-click on any item offers this option right away.
So I try to reiterate third time - I have to use CLI to delete items, which were intended to be deleted by right-click on them and selecting Move to Trash. The problem is that these items do not show up in the desktop Trash, so it remains empty and, thus, cannot be emptied from the Thrash menu as Empty Trash is obviously greyed out.
However, all items moved to the Trash end up and keep accumulating in ~/.Trash, which is a folder in my home directory. I dare to make a wild guess that desktop's Trash is an alias of this folder and somehow this link got broken and all the desktop's Trash functionality us lost. But I reserve the right to be wrong.
My question was how to restore desktop's Trash function. As anyone can see, Trash properties do not offer the possibility of seeing and repairing what it is linked to, which can be done for links or for other desktop launchers.
First, I wrote twice already that moving items into Trash using right-click stopped working as supposed. Items go to ~/.Trash, but do not show up in desktop's Trash. Second, where in my two previous posts did I say I wanted to move items into the Trash using CLI? One must be a real CLI fanatic doing that when right-click on any item offers this option right away.
Both Trash folder are different. One is ~/.Trash which is in your home directory. While second one, that you see on desktop, is a shortcut icon of ~/.gconf/apps/nautilus/desktop-metadata/trash.
Desktop Trash in gnome is generally handled by Nautilus file browser. Anything you Move to Trash using GUI, moves to desktop Trash. While rm will either delete the file completely or will move it to ~/.Trash.
In order clear content of ~/Trash folder using CLI:
Code:
~$ rm -rf ~/.Trash/*
Note: Be careful while invoke rm -rf command, so it do not delete any other files.
Both Trash folder are different. One is ~/.Trash which is in your home directory. While second one, that you see on desktop, is a shortcut icon of ~/.gconf/apps/nautilus/desktop-metadata/trash.
Desktop Trash in gnome is generally handled by Nautilus file browser. Anything you Move to Trash using GUI, moves to desktop Trash. While rm will either delete the file completely or will move it to ~/.Trash.
Nope. On my system, anything I Move to Trash using GUI immediately shows up in ~/.Trash. There is no folder desktop-metadata/ in ~/.gconf/apps/nautilus/ as it contains only icon-view/, list_view/ and preferences/, and %gconf.xml. rm immediately deletes stuff without moving anywhere.
So it appears still that desktop Trash is indeed a shortcut to ~/.Trash, but it is either broken or the Trash application is not working. Any place else where it can found?
I hate to think that the only way is to reinstall Gnome, but may be I can reinstall nautilus only?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.