Installing GNOME Terminal on Elementary OS 5.1 Hera

Elementary OS has become my favorite Linux distribution. The Pantheon desktop environment is unmatched among Linux desktop environments in terms of usability and aesthetics. While earlier versions were rather buggy, the latest version, 5.1 Hera, has become stable enough for daily usage.

Elementary comes with its own terminal emulator, Pantheon Terminal, which, like many other aspects of the distribution, focuses on simplicity. However, I still prefer using GNOME Terminal due to its richer feature set and customizability.

Installing GNOME Terminal on Elementary OS is not as straightforward as installing most other apps–which is mainly done via AppCenter–and takes a few extra steps.

Installing GNOME Terminal

First, install the gnome-terminal package:

sudo apt install gnome-terminal

Although GNOME Terminal is installed, getting it to show up in the Slingshot app launcher takes an additional step. To do so, open the gnome-terminal desktop file. This will require root privileges:

sudo vi /usr/share/applications/gnome-terminal.desktop

You can also do this via Files by opening a New Window As Administrator and navigating to the /usr/share/applications directory.

Make the following two changes:

  • Change the name to GNOME Terminal since both terminal emulators are named “Terminal” by default.
  • Comment out or remove the line beginning with OnlyShowIn. This will add GNOME Terminal to Slingshot.
[Desktop Entry]
Name=GNOME Terminal  # <-- Change to GNOME Terminal
Comment=Use the command line
#OnlyShowIn=GNOME;Unity;  # <-- comment out or remove this line
--- snipped ---

Hide menubar by default

To hide the GNOME Terminal menubar by default, first install dconf-tools:

sudo apt install dconf-tools

Open dconf Editor, navigate to /org/gnome/terminal/legacy, and uncheck default-show-menubar:

Uncheck default-show-menubar for GNOME Terminal in dconf-settings

The menubar can be toggled by right clicking in the terminal window and selecting “Show Menubar” or via the F10 key.

Add GNOME Terminal Here context menu option

A useful feature is to have an option in the Files right click context menu to open a GNOME Terminal window in the current directory. To do this, create a Contractor file for gnome-terminal:

sudo vi /usr/share/contractor/gnome-terminal.contract

Add the following:

[Contractor Entry]
Name=Open GNOME Terminal Here
Description=Open in GNOME Terminal
Exec=gnome-terminal --working-directory=%u

This will add a “Open GNOME Terminal Here” option to the right click menu in Files. Note that this option appears at the bottom of the menu and not under the “Open in” menu, which includes (Pantheon) Terminal by default. It would be nice if there was an easy way to add a GNOME Terminal option there for consistency, but this works well enough for now.