Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I double-click to select text in GNOME Terminal, the selection stops at spaces but continues over hyphens:



Some of my filenames contain uncommon characters such as the heavy teardrop-spoked asterisk and are not selectable by double-clicking:

unusual characters

Is there a way to make double-click selection continue over these characters as well?

share|improve this question
up vote 9 down vote accepted

In "Edit > Profile Preferences > General", add the character to the "Select-by-word characters" box.

share|improve this answer
Thanks, I don't know how I didn't notice that. – ændrük Oct 20 '10 at 5:10
Has anyone found a general way to do this GNOME-wide? Or are word-boundaries up to the developers of each application to define/redefine? Related question: . – Noyo Sep 26 '13 at 13:19
At least since version 3.14, this option has disappeared. How can we do it now? – Joachim Breitner Nov 6 '14 at 10:20
I tried dconf write /org/gnome/terminal/legacy/profiles:/:{your-profile-id}/word-char-exceptions '@ms "-,.;/?%&#_=+@~·:"' but all I get is error: Could not connect: Connection refused – Cyprian Guerra Sep 9 '15 at 16:31

[Adding an answer since the accepted one no longer works.]

GNOME Terminal has flip flopped several times on this subject.

This configuration feature was removed in gnome-terminal 3.14 (included in Ubuntu 15.04 Vivid)

Then in gnome-terminal 3.16 (included in Ubuntu 15.10 Wily), the option was reintroduced under the hood, but with no UI. In addition, colon : was changed to be treated as a word separator.

Editing with dconf

Per these instructions, you can configure the set using dconf:

I like to use -#%&+,./:=?@_~ as the set of non-word-separators.

Note that the use of colons there is /crazy/. Yes, there is :/: in there.

1) edit -> profile preferences -> the General tab on your profile has its Profile ID, e.g. b1dcc9dd-5262-4d8d-a863-c897e6d979b9

2) check you've got the syntax right with:

$ dconf list /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ foreground-color visible-name palette use-system-font ...

If it returns nothing, you've got it wrong; try again.

3) dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/word-char-exceptions '@ms "-#%&+,./:=?@_~"'

Specifically, this has ":" in, which makes it select URLs like I expect. ( doesn't select "//").

share|improve this answer
Thanks this is exactly what I needed in order to get :. Is it possible that you could write the command(s) to automatically fetch the default or current profile so I don't have to manually look up my profile ID in order to run that command in future? That way I can just run that script on fresh installs. – Programster Jun 6 at 13:20
@Programster You could do something like this with dconf list /org/gnome/terminal/legacy/profiles:/ – alberge Jun 7 at 0:13
thanks @alberge I took that and put it in a python script – Programster Jun 8 at 11:18

A very useful default feature implemented in other terminals is the progressive selection of extended sections of a line on the screen. e.g., given

/home/username/dir1_r.2-3/dsr.filenr_34.ctr 23456677 dftrprpr

double-clicking on, say, filenr in dsr.filenr_34.ctr would progress from filenr to:

 home/username/dir1_r.2-3/dsr.filenr_34.ctr 23456677
 home/username/dir1_r.2-3/dsr.filenr_34.ctr 23456677 dftrprpr
/home/username/dir1_r.2-3/dsr.filenr_34.ctr 23456677 dftrprpr

Surrounding symmetries may be solved by adding pairs until next-level delimiter.

And of course the user should be given the option of changing defaults.

share|improve this answer
No comment on the answer but try to format it in a better way so that people understand it faster. If you want to list it step by step, use numbering. – VedVals Dec 13 '12 at 13:53
Thank you, but I don't think this applies to my question. I'm specifically asking how to configure GNOME Terminal. – ændrük Dec 13 '12 at 19:14

Extending @alberge answer, you can execute the following python3 script to change all your profiles to do this:


import subprocess

command = ["dconf", "list", "/org/gnome/terminal/legacy/profiles:/"]
result =, 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 "-#%&+,./:=?@_~"']


Or you can just execute:

curl -s | python3
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.