Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

As an re-education procedure in order to reduce (likely) future data loss, I wish to disable the Shift+Del functionality to delete files in Ubuntu (11.10 and 12.04). Also, if I could replace it with a "Stop that!" popup alert, even better.

I know there are data recovery tools for such cases, but better never put my important data at risk due to such mistakes. And I found nothing similar around, so I hope someone here can show me how, if possible.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

If you define a shortcut on window manager's level, it won't go to Nautilus. Combined with Zenity, you can even show yourself an alert.

First make sure Zenity is installed

sudo apt-get install zenity

Now go to System Settings (or run gnome-control-center) -> Keyboard -> Shortcuts tab, select Custom shortcuts (last item in the left menu), click + to create new shortcut. Call it however you want, and set this command:

zenity --error --text='Stop doing that!'

Once you add the shortcut, assign Shift+Delete to it. Now every time you press Shift+Delete, you get a warning box. Unfortunately this means you can't use this shortcut within any application, but it's rather quick workaround to get rid of a habit.

share|improve this answer

You can generally prevent the files from being deleted either by Shift + Del or the normal deletion by adjusting the permission of the directories to read-only for users. Set it in a way that administrators can only modify any content.

share|improve this answer

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.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.4.21.2498\r\n            </div>\r\n                <div id=\"additional-notices\">\r\n                    Ubuntu and Canonical are registered trademarks of Canonical Ltd.\r\n                </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-wa"], "copyright__copyright__copyright": ["id of a habit.\n\nshare|improve this answer\n\nYou can generally prevent the files from being deleted either by Shift + Del or the normal deletion by adjusting the permission of the directories to read-only for users. Set it in a way that administrators can only modify any content.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}