4

In previous versions of Ubuntu I could create custom keyboard shortcut to run terminal commands, with something like gksudo reboot for example, and then assign that to something like win+r.

I can't find that option in Ubuntu 17.10 or Ubuntu 18.04 daily build.

Am I missing something?

pomsky
  • 68,507
opensas
  • 3,187

2 Answers2

6

Follow the steps below.

  1. Go to Settings -> Devices -> Keyboard.
  2. Scroll to bottom, and click the "+" (plus) sign.
  3. Enter the command and assign a shortcut key.
pomsky
  • 68,507
opensas
  • 3,187
  • 1
    Doesn't work for me. Do I need to reboot? – Costa Michailidis Nov 13 '18 at 01:25
  • 1
    Like @CostaMichailidis said - I do this and the commands just don't work. I have tried to log-out, also reboot, nothing brings them to live. What is needed to activate the newly created custom shortcuts? – NeStack Dec 03 '21 at 13:33
2

For those who can't manage to find the adequate Settings (Ubuntu 18.04 maybe?), run in a terminal:

gnome-control-center

...then follow the procedure that @opensas mentioned:

  1. Go to Settings -> Devices -> Keyboard.
  2. Scroll to bottom, and click the "+" (plus) sign.
  3. Enter the command and assign a shortcut key.
  • I do this and the commands just don't work. I have tried to log-out, also reboot, nothing brings them to live. What is needed to activate the newly created custom shortcuts? – NeStack Dec 03 '21 at 13:33