Wandering Thoughts archives

2007-05-04

A little twitch I have in X Windows

Every so often, one of the places I read will have the 'what's in your clipboard?' meme pop up. I never take part, because I have a really boring answer: nothing.

One of my little twitches is that I reflexively scrub my X selection unless I'm actively using it for something, to the point where it makes me actively nervous to have a 'loaded' selection. In fact, selecting a space in xterm and then canceling the selection is one of my little fidget activities. (In a pinch I'll do it in other applications too.)

In X Windows this makes a fair amount of sense, because in many programs pasting in the current selection only takes a mouse click. And in an xterm (most especially an xterm where you're root), pasting in some random text may do quite a bit of damage. (The longer the selection the higher the danger, especially if it includes newlines, but even short sequences can be dangerous if you're doing something like editing in vi.)

I can't remember if I ever blew my own foot off this way, but the mere possibility of it has clearly been making me nervous for long enough that preventing it has become a conditioned reflex. Besides, it goes well with my other twitches.

(I have a related twitch about what window gets keyboard focus if I'm idle in my X session, for example because I'm talking to someone in my office; I want it going somewhere that doesn't respond to keyboard input, so that accidental keypresses don't do anything.)

unix/XSelectionTwitch written at 21:16:19;


Page tools: See As Normal.
Search:
Login: Password:

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.