It seems like for at least a decade every application/framework has had their own paste buffer, and honestly I’m surprised this isn’t “just working” out of the box by now.
- Open Terminal
- Run pwgen, double click one of the passwords.
- Middle click in Terminal, the copied password pastes just fine.
- Switch back to Chrome, CTRL-V into the password field.
- Realize 5 minutes later when you can’t login with the user you’ve just created, it’s because the content you pasted into the password field was an URL you copied in Chrome 15 minutes ago.
And don’t even get me started on vim/neovim having yet another copy/paste buffer.
https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer
Your terminal is using the PRIMARY buffer whereas Chrome is using the CLIPBOARD buffer. As well, middle click in terminal pastes from the PRIMARY buffer. The terminal and vim can be configured to use the CLIPBOARD buffer instead, which will unify all of these. The configuration depends on which terminal you’re using though.
There are really just the three buffers, PRIMARY, SECONDARY and CLIPBOARD (which is ironically most common) but it’s confusing which programs use which buffers by default.