5

The shortcut for print screen became very slow on my Ubuntu 14.04.2. It takes about 10-15 seconds after pressing the key to showing a print screen region selection controls. I tried to use shutter as a screenshot tool (shutter -s -C -e -n -o '/tmp/screenshot.%d-%m-%y.%T.png'), and assigned a custom shortcut to it, but it didn't change things. When I run the same command in terminal, the app shows instantly. So the problem seems to be in keyboard shortcut system.

Actually, for the sake of testing, I even assigned a shortcut to simple commands like bash -c 'ls /tmp' or gnome-terminal -e 'ls /tmp'. They still take 10+ seconds to be executed.

On the whole, the system works fast. Slow keys setting is turned off. Standard shortcuts work fast. The problem is only with shortcuts for print screen and custom commands.

2 Answers2

5

After an hour of googling and trying, I've found a workaround to this weird problem. Install and run CompizConfig Settings Manager:

sudo apt-get install ccsm
ccsm

Click Commands in General category. Ensure the module is activated. Add your custom command on the first tab and set a shortcut on the second one. I set the same command (shutter with options) and the same key (Print) as I'd set before in "regular" system settings. Now the command began to be run instantly.

  • 1
    In Ubuntu 14.04.3 LTS the package is compizconfig-settings-manager – Dennis Golomazov Oct 18 '15 at 13:19
  • The same solution works for the built-in gnome-screenshot – Dennis Golomazov Oct 18 '15 at 13:22
  • Thanks. No idea why this problem manifests when things were working fine for so long. I've noticed that it's the custom shortcuts in All Settings -> Keyboard -> Shortcuts that seem affected and noth the others. Glad to have a solution anyway, but would love to know what causes this. – TenLeftFingers Jul 10 '17 at 15:44
0

Run the below command to kill the service:

sudo killall gnome-keyring-daemon

The service starts automatically after you killed it, and that fixes the shortcut delay issue until reboot.

khalidh
  • 140