this post was submitted on 08 Jan 2026
26 points (96.4% liked)

Linux

60949 readers
999 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
26
X11 Secondary Selection (www.cs.man.ac.uk)
submitted 5 days ago* (last edited 5 days ago) by wlfrn@lemmy.ml to c/linux@lemmy.ml
 

The secondary-selection is used when the cursor is in some focussed Recipient window, in order to grab some text (or whatever) from some Donor window (possibly the same window as the Recipient) and have that text pasted at the Recipient's insertion-point (overwriting any primary-selection in the Recipient).

all 14 comments
sorted by: hot top controversial new old
[–] Quazatron@lemmy.world 3 points 5 days ago (3 children)

I've been using the "select copy + middle click paste" since the late 90s.

I find it useful for simple intra-document editing because you're just using the mouse, no need to reach for the keyboard.

It can be combined with the traditional copy/paste, say you have your password in the clipboard but you need to also copy some part of a long ssh command. You can have both and paste them on the command line one after the other.

I know I'm a minority and this will eventually be dropped because it's too confusing for the end users, man.

Yes, I get it. But I'll miss it.

[–] wlfrn@lemmy.ml 2 points 5 days ago (1 children)

You're describing the primary selection. The article's about patching secondary selection back into gtk3 (c. 2015?). It's ctrl+select followed by ctrl+middle to paste as yet another clipboard. This has the unique and useful property that neither selection nor paste changes the text cursor's position.

A more in-depth look at secondary selection is in the embedded video which has it's own write-up on https://www.cs.man.ac.uk/~lindsec/secondary.html

[I suspect primary-secondardy selection is not a confusion you have, but one a casual skip-the-article-direct-to-comments reader might have]

[–] Quazatron@lemmy.world 1 points 5 days ago (1 children)

I assumed primary is ctrl-c/ctrl-v and secondary is select/middle-click. I've never come across this ctrl-middle-click, it does the same with and without the ctrl key.

I seen to recall reading something this week about a distro dropping middle click, so I probably conflated both issues and failed.

But you're right, I did not read the fine article.

[–] wlfrn@lemmy.ml 2 points 3 days ago

There are lots of ways to move data between or within graphical windows! But the list is shrinking

  • clipboard - cltr-c / ctrl-v
  • drag and drop - mouse selection, mouse drag
  • primary - mouse selection -> middle click (or shift+ins); moves text cursor
  • secondary - ctrl+select (alt+select in emacs); secondary doesn't move text cursor. largely forgoten. motif, patched gtk; not in qt, tk, mainline gtk, etc
  • cut-buffer - deprecated everywhere. set by application using X11 window property for state

https://en.wikipedia.org/wiki/X_Window_System_selection

[–] vort3@lemmy.ml 1 points 5 days ago

Nobody is removing it?…

[–] vort3@lemmy.ml 2 points 5 days ago (1 children)

Never even thought of that, but this is genious.

Maybe using ctrl for that is not the best decision, but I understand this was just a showcase. I wish this actually existed and was used in real desktop environments.

[–] excel@lemming.megumin.org 1 points 5 days ago (1 children)
[–] wlfrn@lemmy.ml 1 points 5 days ago

Why's that?

[–] toothbrush@lemmy.blahaj.zone 1 points 5 days ago

I am using Ubuntu 14.04LTS "Trusty Tahr"...

Wow that is ancient! Interresting feature, I wonder if it could be reimplemented as a wayland protocol, however I think some modern IDEs and some text editors have something similar nowadays.