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

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch