18 September, 2012

cut paste paste

I'm running desktop (well, laptop) linux for the first time since I left pygar.isi.edu behind in early 2005.

Trying to cut and paste from an xterm into firefox (actually iceweasel). I copy something (in as much as I remember how xterm copy-on-highlight works). Go to iceweasel and choose edit paste. Get something else completely different. Not random shit. Just some other paste.

A day later, after chatting on #lug, I realise ... *OF COURSE* ... the clipboard I get by pressing my new middle mouse button (I was on a mac before) pastes from a different clipboard than edit... paste does.

#lug also gave me this:

20:34 < philsnow> autocutsel should be installed by default
20:35 < philsnow> it will synchronize the primary and clipboard x selection 
                  buffers
20:35 < milki> but thats like losing a buffer
20:37 < philsnow> i don't know of anybody who _likes_ the separation of primary 
                  and clipboard in x
20:38 < philsnow> i generally use primary exclusively until i find some PoS 
                  site that uses some contrivance to not actually select things 
                  when you select them

I've been using linux since ~1995 and I pretty much have no fucking idea what they are talking about.

Truly this year will be the year of the linux desktop.

1 comment:

  1. In Linux (and X generally) there are two buffers used for copying and pasting, not just one. The highlight/middle-button combo works with the buffer called PRIMARY. The ordinary Ctl-C/Ctl-V combo uses the buffer called CLIPBOARD. So you get weirdness when you copy into PRIMARY and paste from CLIPBOARD or vice-versa.

    You can use the program "autocutsel" to keep these two buffers automatically synced, so, for example, Ctl-C copies into CLIPBOARD, autocutsel copies it to PRIMARY as well, and you paste (from PRIMARY) the same content using the middle-mouse.

    I have had fun with the program "xsel" which allows you to manipulate either one of these buffers on the command line, for example piping stdout to the CLIPBOARD or directing one of the buffers to a program or text file. ("xclip" does similar things, I believe.)

    ReplyDelete