31

Is it possible to export a gnome-terminal profile to another computer?

I create a terminal profile using edit>preferences and save it as "def". I would like to save the configuration in a file and use it another computer.

I try to grep "def" within .config/dconf/ and find

Binary file dconf/user matches

Is it possible to extract the information from the configuration (specially about the colours, takes a lot of time to find the right colurs) and use them in another computer.

I am using Fedora 28 with gnome.

4.16.13-300.fc28.x86_64, gnome-terminal-3.28.2-2.fc28.x86_64.

2 Answers 2

38

You can use dconf(1) to dump and load the gnome-terminal profiles. I got the basic command usage from this source:

https://gist.github.com/reavon/0bbe99150810baa5623e5f601aa93afc

To export all of your gnome-terminal profiles from one system, and then load them on another, you would issue the following:

source system:

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

destination system (after transferring the gnome-terminal-profiles.dconf file):

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

2
  • 1
    This worked exporting from Ubuntu 20.04 and importing to an Ubuntu 22.04 VM. 👍
    – sage
    Dec 10, 2022 at 0:15
  • Hello, thanks for your answer, but it seems the link you posted is dead (404). Can you update it please ?
    – DrLarck
    Jan 29, 2023 at 12:08
2

Thanks for your help, folks.

I too found that github gist very useful. But somehow I ended up with an exported .dconf file that could not be imported. Running the load command Zeb DeOs gave kept yielding this error:

error: Key file does not start with a group

Trial-and-error probing lead me to conclude that the leading line of my .dconf file was the problem:

default='...'

Replacing the leading line with this seemed to make it loadable:

[/]

SO, in case it helps any, the file you are trying to load should have the format shown below. Note the 1-to-1 correspondence of list items in the header with entries below.

============================================
[/]
list=['22cb430e-3fde-42cb-a167-cc35a6b788cc', '4b1f055e-9bc4-4b58-bb12-eb5657db78fc']

[:22cb430e-3fde-42cb-a167-cc35a6b788cc]
audible-bell=false
background-color='rgb(255,255,221)'
cursor-shape='ibeam'
foreground-color='rgb(0,0,0)'
palette=['rgb(46,52,54)', 'rgb(204,0,0)', 'rgb(58,43,143)', 'rgb(196,160,0)', 'rgb(52,101,164)', 'rgb(117,80,123)', 'rgb(6,152,154)', 'rgb(211,215,207)', 'rgb(85,87,83)', 'rgb(239,41,41)', 'rgb(150,52,226)', 'rgb(252,233,79)', 'rgb(114,159,207)', 'rgb(173,127,168)', 'rgb(52,226,226)', 'rgb(238,238,236)']
use-theme-colors=false
visible-name='light'

[:4b1f055e-9bc4-4b58-bb12-eb5657db78fc]
audible-bell=false
background-color='rgb(0,0,0)'
background-transparency-percent=17
cursor-shape='ibeam'
font='Monospace 12'
foreground-color='rgb(172,228,255)'
palette=['rgb(46,52,54)', 'rgb(175,95,255)', 'rgb(0,102,255)', 'rgb(196,160,0)', 'rgb(255,7,168)', 'rgb(117,80,123)', 'rgb(6,152,154)', 'rgb(211,215,207)', 'rgb(85,87,83)', 'rgb(235,148,255)', 'rgb(0,229,255)', 'rgb(252,233,79)', 'rgb(114,159,207)', 'rgb(173,127,168)', 'rgb(52,226,226)', 'rgb(238,238,236)']
use-system-font=true
use-theme-colors=false
use-theme-transparency=false
use-transparent-background=true
visible-name='hi'
============================================

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .