This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

GNOME Terminal Frequently Asked Questions

Please read through these common questions and answers before emailing the mailing list, asking on IRC or filing a bug report.

How do I report a bug, or request a new feature?

Look at these detailed instructions.

How can I make new terminals start in the working directory of the current terminal?

Since version 3.7, for new terminals to start in the working directory of the current terminal, it is necessary for the shell running in the terminal to cooperate. For this, vte since version 0.34.5 installs a /etc/profile.d/vte.sh script that when sourced will set this up automatically. It supports both bash(1) and zsh(1).

Some distributions (e.g. Fedora) source that script automatically for all interactive shells. Other distributions may only source it automatically for login shells, so you need to either source it manually from ~/.bashrc, or check the "Run command as a login shell" checkbox on the "Command" tab in the profile preferences dialogue. For more information see this bug report.

Note that on bash(1), this feature relies on the PROMPT_COMMAND variable. The vte.sh script sets it automatically; if you want to make modifications to it, you need to make them after sourcing vte.sh, and only append to it instead of overwriting it completely.

Previous versions of vte required you to change your PS1 prompt yourself; this is no longer required.

How can I get rid of the menu bar?

Since version 3.7 this option has been moved from the per-profile preferences to the global Preferences dialogue.

How can I make middle-click paste the primary selection?

In GNOME versions since 3.9, pasting the primary selection with a middle click is disabled by default. To re-enable it (for all programmes, not just for gnome-terminal), create the file ~/.config/gtk-3.0/settings.ini with these contents:

[Settings]
gtk-enable-primary-paste=true

Or you can just use gnome-tweak-tool, which exposes this setting as a check box.

How can I change a profile setting from the command line?

First you need to find out the identifier of the profile you want to change. Open the Preferences dialogue, switch to the Profile tab, select the profile you want to change, and click Edit. The identifier is the string labelled "Profile ID". You don't need to type it; you can simply right-click it, choose Select all, then right-click again, choose Copy; now you can paste into the terminal using Ctrl-Shift-V or right click, Paste.

Alternatively, if you want to change all profiles, you can use this command to get the list of all profile identifiers:

gsettings get org.gnome.Terminal.ProfilesList list

and this command to get the identifier of the default profile:

gsettings get org.gnome.Terminal.ProfilesList default

For each profile you want to change, replace the string UUID with the profile identifier in the command below:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:UUID/ KEY VALUE

For example values for the default profile can be changed like this:

UUID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${UUID}/ KEY VALUE

Unfortunately, the gsettings tool can't currently autocomplete the key names with relocatable schemas (that's this bug), but you can just read the schema itself.

How can I stop the cursor from blinking?

You can disable the cursor blinking for all programmes by running this command:

gsettings set org.gnome.desktop.interface cursor-blink false

However GNOME Terminal also has a setting of its own to en- or disable cursor blinking for each profile separately. Use the instructions above to change the cursor-blink-mode key; the allowed values are system (the default) to follow the global setting, and on or off to enable or disable blinking regardless of the global setting.

For example, disabling cursor blinking for the default profile can be done with this one-liner:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')/ cursor-blink-mode off

How can I move the scroll bar to the left side of the window (like in xterm)?

Since version 3.7 this option has been removed from the Preferences dialogue. You can however still get the same effect by adding the following lines to your ~/.config/gtk-3.0/gtk.css file:

terminal-screen-container {
 -TerminalScreenContainer-window-placement: bottom-right;
 -TerminalScreenContainer-window-placement-set: true;
}

You will need to close all terminal windows for this change to take effect.

How can I make the terminal transparent?

Since version 3.7 this option has been removed from the Preferences dialogue. You can however still get the same effect by setting the _NET_WM_WINDOW_OPACITY X property, for example with the Devil's Pie or Devil's Pie II tools. E.g., set up Devil's Pie to start automatically with the session, and create the file ~/.devilspie/gnome-terminal.ds with these contents:

(if
  (matches (window_name) "gnome-terminal-window-*")
  (opacity 90)
)

You can also use this shell script that however only works for existing terminal windows and not automatically for newly created ones.

Terminal fails to start

When gnome-terminal-server fails to start, it may print information about the problem. You can retrieve that information from the journal:

$ journalctl _EXE=/usr/libexec/gnome-terminal-server

Also, the gnome-terminal client prints some information, that notably may contain the exit status of the server programme. (Note that since version 3.14.0, the exit status gives some information about the cause of the problem. Prior versions always exited with status 1. Exit status 9 or 10 only is reported since version 3.18.)

1. Exit status 7

Starting Terminal fails with this error message:

Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 7

Reason: You are trying to run gnome-terminal with su, sudo or some similar mechanism. You cannot do so. Instead, run su, sudo, etc., inside the terminal. E.g.

gnome-terminal -- su ...

2. Exit status 8

Starting Terminal fails with this error message:

Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8

Reason: The environment that gnome-terminal-server is started with does not correctly set the locale to a UTF-8 locale. Consult your distribution's documentation on how to fix this. Note that is it not relevant to check the locale settings from a different terminal (e.g. xterm); what counts is the environment that the systemd --user instance passes to the processes it starts.

3. Exit status 9

Starting Terminal fails with this error message:

Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 9

Reason: The locale settings in the environment that gnome-terminal-server is started with describe a nonexistent locale. Consult your distribution's documentation on how to fix this. Note that is it not relevant to check the locale settings from a different terminal (e.g. xterm); what counts is the environment that the systemd --user instance passes to the processes it starts.

4. Exit status 10

Starting Terminal fails with this error message:

Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 10

Reason: gtk_init() failed. The most likely cause is that the connection to the display could not be opened, for example because the environment that gnome-terminal-server is started with lacks a DISPLAY setting. Consult your distribution's documentation on how to fix this. Note that is it not relevant to check the environment from a different terminal (e.g. xterm); what counts is the environment that the systemd --user instance passes to the processes it starts.


2024-10-23 10:58