132
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 01 Oct 2023
132 points (96.5% liked)
Linux
47996 readers
997 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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
It depends on what exactly you want to do, if you want just a hotkey that copies something in one window and pastes it in another, you'd have to set that up manually. But if you're logged into two SSH sessions at once and you want to copy something from one session and paste it in another, you could do that here. And if you want some hotkey to access something like the clipboard history in a GUI, then you'd need to set up in your window manager. Some users accomplish this through a combination of jq + dmenu (jq to process JSON output, dmenu to select an entry), so it's entirely do-able. For example, here is one such command:
cb cp "$(cb hs | jq -r '.[].content | if type=="array" then .[].path else if type=="object" then .path else . end end' | dmenu)"
Yes, that’s what I wanted to know. So alas, no out-of-the-box magic for me…I find it incredibly frustrating that in 2023 one can’t simply copy-paste text from one local console to another. It seems like a basic function for a terminal-based *nix systems which doesn’t exist. I know it’s complicated even at the first glance, with huge security implications (like copying text in the root terminal and pasting it to a user one) but I believe it’s all solvable
Well, if you just have two windows going to two different terminals, whatever text you select in one you can just copy to the other usually with Ctrl+SHIFT+C and Ctrl+SHIFT+V, and my clipboard manager lets you do the same even for large amounts of text you can't select. Therefore, all you'd need a specific setup for is if you want to do this action automatically with a single button press, like an Excel macro. I hope this helps! :)
I think they meant TTYs