1. Overview

In Linux installations with the GNOME graphical user interface (GUI), a GNOME terminal profile is a set of configuration options that define the terminal’s appearance and behavior. It enables us to customize the color, font, scrolling, cursor, and many other settings of the terminal. Further, we can create and manage multiple profiles with specific settings according to different requirements.

Sometimes, we may want to keep a backup of the terminal profile settings or share and use the same settings on a different system. In such a situation, we can export the GNOME terminal profile and then import it on the same system after installation or on a different system. This practice of exporting and importing terminal profiles helps us to ensure consistency in the terminal environment.

In this tutorial, we’ll illustrate the method to export the GNOME terminal profile on a Ubuntu 22.04 Linux system.

Specifically, we’ll use the dconf command-line tool to export and import GNOME terminal profiles.

2. Install dconf Editor

First, we install the dconf editor on our Linux system. To do so, we open our terminal and install the dconf-editor package using apt:

$ sudo apt install dconf-editor

After the dconf editor installation, we can use the dconf command.

3. Export GNOME Terminal Profile

We can export either a specific individual GNOME terminal profile or all profiles, depending on the requirements. This enables us to save these profile settings into a single file. Later, we can share and import the exported file with others or on different systems.

3.1. Export a Specific GNOME Terminal Profile

To export a particular GNOME terminal profile, we find the identifier (ID) of the profile we want to export. For this purpose, we list all the terminal profiles through the dconf list command:

$ dconf list /org/gnome/terminal/legacy/profiles:/
:616ad865-4ac8-4681-9858-79a87effbfe0/
:6b5ceeac-39e8-44fa-aa01-818fdf30accb/
list

The output displays the IDs of GNOME terminal profiles. Let’s choose the 616ad865-4ac8-4681-9858-79a87effbfe0/ ID and export that profile.

Now, we perform the export operation by specifying its ID using the dconf dump command to the gnomeProfile.dconf file:

$ dconf dump /org/gnome/terminal/legacy/profiles:/:616ad865-4ac8-4681-9858-79a87effbfe0/ > gnomeProfile.dconf

Let’s now view the content of the gnomeProfile.dconf file via the cat command for verification:

$ cat gnomeProfile.dconf
[/]
background-color='rgb(10,2,45)'
default-size-rows=25
foreground-color='rgb(214,213,11)'
palette=['rgb(16,3,63)', 'rgb(192,28,40)', 'rgb(38,162,105)', 'rgb(162,115,76)']
visible-name='baeldung-user'

Thus, the output shows that the specified terminal profile’s settings have been successfully exported to a file.

3.2. Export All GNOME Terminal Profiles

We can also use the dconf dump command to export all the GNOME terminal profiles into a single file, e.g., allProfiles.dconf:

$ dconf dump /org/gnome/terminal/legacy/profiles:/ > allProfiles.dconf

For the verification, let’s view the content of the allProfiles.dconf file:

$ cat allProfiles.dconf
[/]
list=['b1dcc9dd-5262-4d8d-a863-c897e6d979b9', '616ad865-4ac8-4681-9858-79a87effbfe0', '6b5ceeac-39e8-44fa-aa01-818fdf30accb']
[:616ad865-4ac8-4681-9858-79a87effbfe0]
background-color='rgb(10,2,45)'
default-size-rows=25
foreground-color='rgb(214,213,11)'
palette=['rgb(16,3,63)', 'rgb(192,28,40)', 'rgb(38,162,105)', 'rgb(162,115,76)']
visible-name='baeldung-user'
[:6b5ceeac-39e8-44fa-aa01-818fdf30accb]
background-color='rgb(48,26,46)'
foreground-color='rgb(156,85,217)'
visible-name='testuser'

As a result, we can see that all the terminal profiles’ settings have been exported to the specified file.

4. Import GNOME Terminal Profile

We can transfer the exported file to the destination system using any means. This enables us to import the saved GNOME terminal profile on another deployment.

Let’s use the dconf load command to import the specific saved terminal profile from the gnomeProfile.dconf file to the local system:

$ dconf load /org/gnome/terminal/legacy/profiles:/:616ad865-4ac8-4681-9858-79a87effbfe0/ < gnomeProfile.dconf

Now, we list all the terminal profiles to ensure the changes have been applied:

$ dconf list /org/gnome/terminal/legacy/profiles:/
:616ad865-4ac8-4681-9858-79a87effbfe0/
:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/
list

The output shows that the desired terminal profile has been imported successfully.

Similarly, we can also import all terminal profiles from the allProfiles.dconf file with the help of the dconf load command:

$ dconf load /org/gnome/terminal/legacy/profiles:/ < allProfiles.dconf

For the verification, let’s list all the terminal profiles:

$ dconf list /org/gnome/terminal/legacy/profiles:/
:616ad865-4ac8-4681-9858-79a87effbfe0/
:6b5ceeac-39e8-44fa-aa01-818fdf30accb/
:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/
list

Hence, we get the output that displays the IDs of all the imported GNOME terminal profiles.

5. Conclusion

In this article, we explained the method to export the GNOME terminal profile on Linux. We used the dconf dump command to export a particular and all the terminal profiles and then save them in a single file. We also discussed importing the saved terminal profiles on a destination system using the dconf load command.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments