3

On Ubuntu 18.04 I can setup custom keyboard shortcuts to run terminal commands via:

Settings > Devices > Keyboard > +

Name: htop keyboard shortcut
Command: htop
ShortCut: Ctrl+Super+Delete

This usually works without issue when I've created shortcuts for other terminal commands, other than htop. When I try and issue the htop to Ctrl+Super+Delete it just doesn't work.

I press Ctrl+Super+Delete and the htop system monitor doesn't initiate on my system. What's wrong? All the other keyboard shortcuts I've created in this manner are working fine.

AEM
  • 1,166
  • 2
  • 11
  • 18
Display name
  • 2,121
  • 5
  • 22
  • 33
  • 1
    Hello, have you tried to use another combination? Please review this topic: [Custom shortcut Ctrl + Shift + Esc doesn't fire the event](https://askubuntu.com/q/1018814/566421) – pa4080 Oct 22 '19 at 14:59
  • 1
    @pa4080 Thanks for that recommendation. I tried the recommended safe `Ctrl+Alt+Z` combination in that answer and that didn't work either. Perhaps it's a problem with the `htop` command? – Display name Oct 22 '19 at 15:10
  • 1
    I tried a few other combinations. They too didn't work in Ubuntu 18.04. `Ctrl+Super+Del` does work to launch `htop` in Kubuntu 18.04. So rather than it being "a problem with the `htop` command", I guess it's a GNOME issue. – DK Bose Oct 22 '19 at 16:32

1 Answers1

6

WorkAround

use the command gnome-terminal -- htop instead of htop

Verified on Ubuntu 18.04

enter image description here

PRATAP
  • 21,989
  • 8
  • 59
  • 121
  • 1
    Thank you! Any idea why some terminal commands require the `gnome-terminal --` prefix? – Display name Oct 22 '19 at 21:39
  • 1
    I have tried different combinations of shortcut keys other than ctrl+super+del and nothing worked for `htop` command.. but when I type `htop` in terminal it worked.. so the workaround is to open gnome-terminal and then run `htop` command.. the prefix opens terminal and then runs the command.. – PRATAP Oct 23 '19 at 02:14