Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is a nice and straightforward question: how can I disable the Trash Can in Gnome running on CentOS/RHEL 6.4?

I know I can use Shift + Del, instead of Del to bypass the Trash; but how can I completely disable it?

Or otherwise, how can I remap Del to Shift + Del?

share|improve this question
    
You probably don't want to remap the del key. –  Herman Torjussen Apr 7 '13 at 10:09
    
@don_crissti What command can I run to get that? It's up to date with yum anyway. –  Danny Beckett Apr 8 '13 at 0:21
    
@don_crissti -bash: gnome-shell: command not found –  Danny Beckett Apr 8 '13 at 0:24
add comment

2 Answers

Run dconf-editor, and open:

org -> gnome -> desktop -> interface

Enable "can-change-accels".

Open nautilus, select any file/directory, then click "Edit" from menubar, and hover on "Move to Trash" menuitem. While hovering, click on your delete key. The accel should change from "ctrl+del" to "del".

Make sure you have selected a file, else the "Move to Trash" menuitem will be greyed out.

NOTE: I suggest you disable "can-change-accels" afterwards, to prevent accidental accel changes.

If the above doesn't work take a look at this archlinux wiki article on how to change your hotkeys in Gnome 3.x. This article has specific steps for a couple of versions of Nautilus.

share|improve this answer
1  
What this does is changing the accel for <Actions>/DirViewActions/Trash to DEL. It does not bypass the Trash. –  don_crissti Apr 7 '13 at 11:04
    
Did you try the other method mentioned in the archlinux wiki? –  slm Apr 7 '13 at 11:58
    
I get -bash: dconf-editor: command not found when running dconf-editor and No package dconf-editor available with yum install dconf-editor. –  Danny Beckett Apr 8 '13 at 0:26
    
Use gconf-editor if you do not have dconf-editor, yum install gconf-editor, if it doesn't show up. –  slm Apr 8 '13 at 0:36
add comment

According to the archlinux wiki article slm mentioned, in file ~/.config/nautilus/accels find the following line:

; (gtk_accel_path "<Actions>/DirViewActions/Delete" "<Shift>Delete")

and replace it with:

(gtk_accel_path "<Actions>/DirViewActions/Delete" "Delete")

Then kill nautilus to apply the changes:

killall nautilus

Please note you still can move the file to the trash using CTRL + delete.

Tested on Fedora 18 with GNOME Shell 3.6.3.1

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.