How to get popup window before empty gnome trash in Ubuntu
Open terminal and run the following commands
First you need to create emptytrash file
gksudo gedit /usr/local/bin/emptytrash
Now you need to copy and paste the following lines
zenity --question --text "Permanently remove all items from the trash?" && rm -rf ~/.Trash/*
Save and exit the file
Zenity is a tool that allows you to display Gtk+ dialog boxes from the command line and through shell scripts. It is similar to gdialog, but is intended to be saner. It comes from the same family as dialog, Xdialog, and cdialog, but it surpasses those projects by having a cooler name.
Now you need to give execute permissions for our script
sudo chmod +x /usr/local/bin/emptytrash
Now you need to open configuration editor using the following command from your terminal
Once you get the configuration editor window go to navigate to Apps > Metacity > global_keybindings > run_command_1. Right-click the value and select Edit Key and put in the keyboard shortcut you want
go to Apps > Metacity > keybinding_commands > command_1. Right-click the value and select Edit Key and put in the command
Now, the keyboard shortcut Control-Shift-E should bring up the empty trash dialogue.
Credit goes here