Giter VIP home page Giter VIP logo

gnome-terminal-migrate's Introduction

Gnome Terminal migrate tool

Recover Gnome Terminal profiles from gconf directories and export to a dconf load script. Useful when recovering profiles from Ubuntu 14.04 or less.

Depends on python2.7. The script does the best effort to recover all options, some of them don't have sense anymore in newest versions of gterminal. For more information you can check https://github.com/GNOME/gnome-terminal/blob/master/src/migration.c.

Usage

usage: gterminal_tool.py [-h] [--load-current-profiles]
                         [--load-gconf-profiles-from GCONF_PATH]
                         [--skip-duplicate-names]
                         [--set-backup-profile-default] [--set [SET]]
                         [--execute-action] [--execute-delete]

Gnome Terminal config restore

optional arguments:
  -h, --help            show this help message and exit
  --load-current-profiles
                        Load current dconf profiles
  --load-gconf-profiles-from GCONF_PATH
                        Load gconf profiles from path
  --skip-duplicate-names
                        Skip restoring already existent profile names
  --set-backup-profile-default
                        Set new default profile to GConf default
  --set [SET]           Set all profile option to value. For ex:
                        --set="font='Consolas 13'" --set="default-size-
                        columns=136" --set="default-size-rows=44"
  --execute-action      Run command that updates dconf with command result, by
                        default we just print new dconf to console, and you
                        can manually load with "dconf load"
  --execute-delete      Delete previous existing profiles

Examples

Add old profiles to current list, ignore if same name exist, print to stdout:

python gterminal_tool.py --load-current-profiles --skip-duplicate-names \
    --load-gconf-profiles-from homefolder_backup/.gconf/apps/gnome-terminal \
    > new_dconf_profiles

You can now review new_dconf_profiles and then load it with:

/usr/bin/dconf load /org/gnome/terminal/legacy/profiles:/ < new_dconf_profiles

Update current profiles properties at once:

python gterminal_tool.py --load-current-profiles --set="font='Consolas 13'" \
    --set="default-size-columns=170" --set="default-size-rows=50" \
    --execute-delete --execute-action

Other information

Gconf file structure:

apps/
├── gnome-terminal
│   ├── %gconf.xml
│   ├── global
│   │   └── %gconf.xml
│   └── profiles
│       ├── Default
│       │   └── %gconf.xml
│       ├── %gconf.xml
│       ├── Profile1
│       │   └── %gconf.xml
│       ├── Profile10
│       │   └── %gconf.xml
│       ├── Profile11
│       │   └── %gconf.xml

Dconf editor

Run it and navigate to /org/gnome/terminal/legacy/profiles:/ to see current profiles.

$ sudo apt-get install dconf-editor
$ dconf-editor

gnome-terminal-migrate's People

Contributors

fcosantos avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.