Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using htop, the function keys (eg. F9 for kill, F7/F8 for renice..) seem to be captured in the OS rather than in htop. How can I get those keystrokes handled by the process (i.e. htop)? I am using the default gnome terminal in Ubuntu 11.04

htop screencap

share|improve this question
You don't need to use the function keys, htop uses curses, so you are able to click on the help, setup, search, invert,... buttons with your mouse and they will perform the action.I only state this because I have seen numerous developers and sysadmins not realize this and have the same frustration as you. – Gus E Aug 16 '11 at 14:23
wow, you're right the mouse works.. thanks! – wim Aug 17 '11 at 0:28
up vote 3 down vote accepted

In the gnome-terminal menus, go Edit -> Keyboard Shortcuts... and uncheck Enable the menu shortcut key (F10 by default). F9 seems to work as usual, and F7/F8 do acually work but seem not to be able to set the nice value lower than zero, not sure why about that one.

share|improve this answer
Sir, you're a life saver! :) – Starkers May 11 '14 at 23:10

I don't think this is a bug. From the htop man page:

F7, ], -

Increase selected process priority (subtract from 'nice' value). This can be done by the superuser only.

And from renice man page (both htop and renice use the setpriority C function):

Users other than the super-user may only alter the priority of processes they own, and can only monotonically increase their ‘‘nice value’’ within the range 0 to PRIO_MAX (20). (This prevents overriding administrative fiats.)

In fact if you try to run htop as root it should work as expected. Thanks to user Flavio Grossi for this answer it absolutely worked!!!

share|improve this answer

One issue may be that F10 key opens one of the indicators. To solve that, install the CompizConfig Setting Manager

sudo apt-get install compizconfig-settings-manager

Then open it:


Wait for it to open, then choose Ubuntu Unity Plugin from the list.

In these settings, change Key to open the first panel menu to whatever else you want (default is F10).

share|improve this answer
unfortunately that did not resolve anything.. and i had ubuntu unity plugin disabled in ccsm anyway. the F10 key pulls down the File menu in my gnome terminal. – wim Aug 16 '11 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.