this post was submitted on 08 Oct 2023
143 points (100.0% liked)

Linux

1259 readers
85 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 5 years ago
MODERATORS
 

Pretty sure most of you already know this but for those who don't: you have two clipboards in Linux. One is the traditional clipboard where you copy with control c and paste with control v. The other one is when you highlight text and use the mouse middle click to paste text.

More details here.

top 50 comments
sorted by: hot top controversial new old
[–] JWBananas@startrek.website 52 points 1 year ago (1 children)
[–] d3Xt3r@lemmy.nz 11 points 1 year ago* (last edited 1 year ago) (1 children)

Is this applicable for Wayland as well? That link makes several references to X and its ecosystem of tools.

[–] Chewy7324@discuss.tchncs.de 12 points 1 year ago

If I understand it correctly, Wayland only specifies a single clipboard but no primary. But most (all?) wayland compositors implement an additional protocol that's also supported by the toolkits (gtk, qt, ...) and programs like wl-clipboard.

So yes, wayland also has clipboard + primary. But no secondary, as far as I found. Though I never used secondary on X anyway.

[–] ChristianWS@lemmy.eco.br 36 points 1 year ago (3 children)

Not going to lie, I hate the middle click clipboard and disable it ASAP. I really dislike the idea that it copies things without my explicit permission.

[–] Krotiuz@kbin.social 37 points 1 year ago (1 children)

I don't believe anything is actually copied until you request it to be pasted. The clipboards in Linux mark where the data is, and don't actually initiate a copy until there's a destination.

https://wiki.archlinux.org/title/clipboard

[–] Turun@feddit.de 6 points 1 year ago

Yes. You can test this by selecting something, closing that window and attempting to paste. It won't work. Closing the window removes the information about what was highlighted, so there is nothing to paste. If it were to copy upon selection you'd still be able to paste.

[–] moreeni@lemm.ee 21 points 1 year ago (1 children)

It's one of the things that I hated at first when moving from Windows, but then I got so used to it I just can't live without it. Whenever I use Windows, I would try to quickly copypaste text using selection, doing so for 5-10 seconds, until I realise this is not a thing on this OS.

[–] lvxferre@lemmy.ml 15 points 1 year ago (1 children)

Ditto. And sometimes I use both the Ctrl+C and middle-click clipboards at the same time, when I want to copy two chunks of text. Like this:

  • Select chunk A, press Ctrl+C
  • Select chunk B
  • Shift window
  • Paste chunk B through middle-click
  • Paste chunk A through Ctrl+V
[–] dandroid@dandroid.app 5 points 1 year ago (1 children)

Windows and KDE Plasma both have CMD + V to show a list of all things that have been copied. So I always just do Ctrl + C, Ctrl + C, Ctrl + V, CMD + V -> down arrow -> enter. Though on KDE Plasma you will need another Ctrl + V to actually do the pasting after you have selected the value to paste, whereas on Windows selecting the value also pastes it. But the workflows are very similar.

[–] westyvw@lemm.ee 1 points 1 year ago (1 children)

Huh, I do not have CMD + V for clipboard contents in Plasma with Klipper. What distro is configuring that?

I am assuming by CMD you mean Superkey. If not, I would like to know. I looked at Klipper shortcuts and didnt find it in there either.

[–] dandroid@dandroid.app 1 points 1 year ago (2 children)

By CMD, I mean the windows key. I am using Opensuse Tumbleweed. I thought I was just using the default clipboard, but I guess I'm not 100% sure.

[–] westyvw@lemm.ee 1 points 1 year ago (1 children)

I will give it a look an check it out. Been awhile since I used Suse. Totally cool. Oh and I meant the windows key. A lot of Linux folks call it the super key.

[–] dandroid@dandroid.app 1 points 1 year ago

I guess I was using the Mac term for it. I use all three heavily, so they all get mixed up on my head.

load more comments (1 replies)
[–] melvin@lemmy.ml 3 points 1 year ago (2 children)

I actually like the feature but could you explain how you disabled it? I've tried to merge all three clipboards into one a few years ago and couldn't make it work

[–] ChristianWS@lemmy.eco.br 4 points 1 year ago

KDE has the option to disable middle click paste, so I do that. Out of sight, out of mind

load more comments (1 replies)
[–] duncesplayed@lemmy.one 34 points 1 year ago (1 children)

Ironically neither GNU nor Linux has a clipboard (well GNU Emacs probably has like 37 of them for some reason). "Primary selection" (the other clipboard that people don't tell you about) started off on X11, which of course had to implement by XFree86, which became Xorg, and then it copied (ha ha) by other non-X-related software like gpm and toolkits like GTK when using Wayland.

[–] 4ffy@lemmy.ml 3 points 1 year ago

Emacs's regular clipboard is the "kill ring" which also allows you to retrieve any previously cut/copied text. It also has "registers" where you can store and retrieve snippets of text, which can be considered clipboards when used for this purpose. Registers can be referenced by any character you can type on your keyboard, including control characters like ^D.

This totals... a lot of clipboards.

[–] grinceur@programming.dev 32 points 1 year ago

Btw it makes using other OSs painful when you are used to it...

[–] corsicanguppy@lemmy.ca 20 points 1 year ago (13 children)

Please stop calling it gun/Linux UNLESS you also use

  • Firestone/bus
  • chisel/David
  • vacuum/Danielle Smith

Etc.

[–] shrugal@lemm.ee 11 points 1 year ago

Please stop lecturing people about how to talk.

[–] lambda@programming.dev 10 points 1 year ago

I don't understand a single example you gave. I always call it Linux. But, what?

[–] lauha@lemmy.one 4 points 1 year ago

But why would you call this linux when this is not linux specific thing anyway

[–] Zekromaster@lemmy.blahaj.zone 2 points 1 year ago

I mean, we live in a world where there are multiple use cases for non-GNU/Linux (i.e. Alpine). Surely the distinction has become useful.

load more comments (9 replies)
[–] immortaly007@feddit.nl 9 points 1 year ago (1 children)

And then there is the "clipboard" (copy paste function) in the nano text editor being a third

[–] backhdlp@lemmy.blahaj.zone 16 points 1 year ago (3 children)

Vim also has it's own clipboard

[–] foudinfo@jlai.lu 8 points 1 year ago (1 children)

You can also configure vim to use the first clipboard (works with nvim but never tested on vim).

[–] offspec@lemmy.nicknakin.com 7 points 1 year ago (1 children)

works with vim but never tested on vi

It does not work in vi. The + and * register were a vim invention (tested in vim compatibility mode and busybox vi)

[–] stepanzak@iusearchlinux.fyi 3 points 1 year ago

Vim has a ton of clipboards and I still couldn't figure them out.

[–] poinck@lemm.ee 2 points 1 year ago (1 children)

Annoyingly so, how can one disable it?

[–] xigoi@lemmy.sdf.org 2 points 1 year ago (1 children)
load more comments (1 replies)
[–] Holzkohlen@feddit.de 8 points 1 year ago (1 children)

Yes and I hate it. Wish I could just turn off such nonsense.

[–] snaggen@programming.dev 7 points 1 year ago

You don't have to use it....

[–] Gsus4@feddit.nl 8 points 1 year ago

I knew and use this, but I never thought to call it two clipboards :)

Plus I'd never heard of shift-ins, I just used ctrl-shift-c/v in graphic terminals :P

[–] Blizzard@lemmy.zip 7 points 1 year ago (2 children)

Is it possible to have have a Windows 10-like clipboard in Mint? Where you can copy multiple stuff with ctrl+c and then press super+v to have a dropdown of things that you copied with a possiblity to pin some of them?

[–] elkalbil@jlai.lu 6 points 1 year ago* (last edited 1 year ago)

Klipper on KDE offers a clipboard history. Don't know about other DEs.

[–] tacostrange@lemmy.ml 5 points 1 year ago

Wow! TIL too, thanks!

[–] vis4valentine@lemmy.ml 5 points 1 year ago

Ohhhhh!!!! IT WORKS!

This will be so usefull in the future.

[–] Unmapped@lemmy.ml 4 points 1 year ago* (last edited 1 year ago) (1 children)

On my arch install with hyperland, clip boards have been by far the hardest thing to setup. I finally got a basic clipboard manger working using clipman and wofi. But tbh I don't really understand how that's working.

My main issues though have been trying to copy from one with vim open to other terminal with vim. Copying from vim elsewhere using y(yank) works fine. Copying elsewhere into vim works great. But vim to vim will not work for me.

Also trying to find a way to make copying text out of a terminal running tmux not so overly complex and tedious.

[–] stepanzak@iusearchlinux.fyi 3 points 1 year ago (1 children)

For copying from Tmux, I recommend tmux-yank. There are also multiple plugins allowing you to copy predefined set of text types (IP adresses, URLs, etc...). I'm currently using tmux-thumbs. Note that you have to set custom command in tmux-thums to actually copy the text to xclip or whatever you are using. example in my dotfiles

[–] Unmapped@lemmy.ml 2 points 1 year ago

I have tmux-thumbs, but only been able to use it a few times. Apparently most of what I need to copy is not ip's and URLs. But this tmux-yank looks like what I'm looking for. I'll give it a try. Thanks.

[–] neosheo 2 points 1 year ago

Lol i had no idea

[–] wviana@lemmy.eco.br 2 points 1 year ago (1 children)
[–] wviana@lemmy.eco.br 2 points 1 year ago

Thought more vim folks would notice this.

load more comments
view more: next ›