Posts Linux add htop in menu
Post
Cancel

Linux add htop in menu

if you want to add htop command as an executable/clickable item in menu

  • First make sure htop is installed
1
$ sudo apt install htop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ # create a new file
$ touch /usr/share/applications/htop.desktop
$ # now edit that file using editor of your choice
$ vi /usr/share/applications/htop.desktop
$ # Add below lines to the file

[Desktop Entry]
Version=1.0
Name=Htop
Type=Application
Comment=Show System Processes
Comment[en_GB]=Show System Processes
Terminal=false
Exec=gnome-terminal -e htop
Icon=htop
Categories=ConsoleOnly;System;
GenericName=Process Viewer
GenericName[en_GB]=Process Viewer
Keywords=system;process;task

$ # Save and exit the file

From above please replace “gnome-terminal” with the terminal that you are using example: sakura

The above setup will create an entry into your cinnamon or budgie or gnome menu.

The logic is basically to create a menu file, then call any terminal and pass an executable command to it using -e

For selecting icon, if you are unsure about the icon name or want to apply other icon then, you can checkout other files in /usr/share/applications/

This post is licensed under CC BY 4.0 by the author.