LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (http://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   GUI - trashy question (http://www.linuxquestions.org/questions/linux-enterprise-47/gui-trashy-question-4175448947/)

yaximik 02-06-2013 07:37 PM

GUI - trashy question
 
Hello,

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?

amani 02-07-2013 12:03 PM

shift+ delete?
In kde right-click on menu button etc

yaximik 02-09-2013 10:37 AM

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.

shivaa 02-10-2013 12:32 AM

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.

yaximik 02-11-2013 08:27 AM

Quote:

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.

shivaa 02-11-2013 10:42 AM

Quote:

Originally Posted by yaximik (Post 4889054)
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.

yaximik 02-12-2013 09:08 AM

Thanks, this is indeed helpful. Now I need to figure out what got broken and how to fix it.

yaximik 02-15-2013 02:58 PM

Quote:

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?

shivaa 02-15-2013 07:55 PM

Invoke (as root):
Code:

~$ find / -name "trash" -print


All times are GMT -5. The time now is 12:30 PM.