Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 3744  / 1 Year ago, thu, may 25, 2023, 10:03:47

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.


More From » 12.04

 Answers
4

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) → KeyboardShortcuts 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.


[#38611] Friday, May 26, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
smelrop

Total Points: 263
Total Questions: 122
Total Answers: 108

Location: Saudi Arabia
Member since Thu, Jan 28, 2021
3 Years ago
smelrop questions
Mon, Mar 13, 23, 07:22, 1 Year ago
Sun, Feb 5, 23, 13:02, 1 Year ago
Tue, Aug 31, 21, 00:50, 3 Years ago
Sat, Dec 18, 21, 15:18, 2 Years ago
;