Ask Your Question


asked 2018-01-20 08:44:07 -0500

thermo gravatar image

updated 2018-01-21 09:45:04 -0500

I feel like I'm beating a rather dead horse, but here goes:

I cannot change the word selection boundaries in Gnome terminal.

I've done lots of googling on this, and I've seen some bug reports that discuss the issue, but nothing seems to have changed. So first, here's the problem: I want to be able to double-click to select some text, but I want to control the boundary of that selection. Specifically I want the colon character ':' to be a boundary so that when I double click on text that says key:value I just want to select "value" and not the whole string.

What I've done: I've used 'dconf' to create the following key:

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

It has no effect. Further digging shows that where this should have an effect is in the "vte291" RPM. I looked at the source code that's contained in the SRPM, and it looks to me like that should work.

I'm using F26 at the moment, and the vte291 package for f26 uses "vte-0.48.3". (It does look like they bumped the version to 0.50.2 in rawhide).

Has anyone had luck with this? This is really the only annoying thing about my system at the moment.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-07-23 07:16:16 -0500

FeRDNYC gravatar image

updated 2018-07-23 10:17:44 -0500

Well... here's the thing... at least for me, Gnome Terminal already treats : as a word boundary character, by default. word-char-exceptions is set to nothing in all of my profiles, and if I cat /etc/passwd (hey, it's the first file I could think of that contains a lot of colons), then I can double-click on a username, UID, GID, or any other field to select only that field, bounded by the colon characters (unless it contains some other word-boundary, like whitespace).

It's only when I edited one of my profiles in dconf-editor to contain the key:

word-char-exceptions=@ms ':/@'

(as verified by dconf dump <path>) that Gnome Terminal started including those characters in double-click selections.

So, it seems like either the semantics of the word-char-exceptions key are reversed, or it acts as a 'toggle' that switches the default behavior on any character supplied to it. But, AFAICT, the only way to get Gnome Terminal to treat : as a non-word character is to do... nothing, and let it use its defaults.

ETA: Yeah, the semantics definitely seem reversed, because in my example above (with :/@ set as the word-char-exceptions characters, I still couldn't get Gnome Terminal to treat / as a boundary character, something it doesn't do by default. Setting it back to the default value of nothing was also ineffective. It was only when I set

dconf write /org/gnome/terminal/legacy/profiles:/.../word-char-exceptions '@ms ""'
that I was able to get / treated as a word boundary.

edit flag offensive delete link more

Question Tools


Asked: 2018-01-20 08:44:07 -0500

Seen: 282 times

Last updated: Jul 23 '18