Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Ubuntu 16.04 - Gnome Terminal Double Click Selection

Double click in the Gnome terminal has changed from 14.04 to 16.04 such that it no longer will include the : character in the selection.

Copy, paste, and execute the following python3 script:

#!/usr/bin/python3

import subprocess

command = ["dconf", "list", "/org/gnome/terminal/legacy/profiles:/"]
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)

profiles = result.stdout.split('\n')

for profileString in profiles:
    if profileString.startswith(":"):
        changeCmdPart = "/org/gnome/terminal/legacy/profiles:/" + profileString + "word-char-exceptions"
        changeCmd = ["dconf", "write", changeCmdPart, '@ms "-#%&+,./:=?@_~"']
        subprocess.run(changeCmd)

print("done!")

References

Last updated: 16th August 2018
First published: 16th August 2018