While most applications support the mechanism for cut, copy & paste that most people are used to from other operating-systems, X11 also has another mechanism which is faster once you get used to it. It even works between two linux/unix-computers across the network
As you know from other operating-systems, you can pick the items “cut”, “copy”, and “paste” from the “edit” menu. Works as expected.
As you know from other operating-systems, you can cut, copy and paste by pressing the control-key together with “x”, “c”, “v”. The X is nice to remember for to cut. The C is for copy, and the V looks like the insertion mark we used in school when we forgot a letter in the middle of a word. Works as expected
There are also some keyboard shortcuts you can use that are a little different. These belong to some of the Linux editors you might use without a mouse. That’s enough to go on another page Copy and Paste with no mouse in console editor
In X11, selecting a text with the mouse is enough to put it into the X11-clipboard. You can insert it by pressing the middle mouse button. If your mouse has a wheel, this is the button you need to press. If your mouse has only two buttons, X11 is usually configured to use a simultaneous click on both of them instead.
This can be really fast. For example, I have configured my browser to start without a page loaded, the URL-field is already empty. So I can use this fast method to copy URLs into the browser.
So, you have more than one computer connected. You can use the technique described above to copy text from one Linux-PC to another.
You connect to the other box using
ssh -X user@computer
where user is the username you need to log in, and computer is the ip-address of the computer you want to log into.
After giving your password, any command you type in that shell runs on the other computer but displays output and windows on your screen. And then you can copy to and from. Works like expected :)
Sure, glad you asked.
I have a workstaion called “vivid” configured so that two nfs-exports from the server (called “files”) are mounted. Also, a removable drive can be used. All this information is inside /etc/fstab. For my laptop, I want to have the same lines, so I can have the same environment. I do this by a simple copy and paste operation across the network:
ssh -X root@192.168.1.191 emacs /etc/fstab
I sure do. Here you are: copy-n-paste-screenshot
But watch out: It is 1400×1050. I love big screens :)
No. There is a piece of software called ‘gpm’ which enables the technique described above also for the plain linux text-console. It even works across different virtual terminals which can be switched using <alt>+<f1> … <alt>+<f6>. Again, you can log into different computers on different virtual consoles to copy & paste across the network.
We also have compiled a list of ways to copy and paste in different text-mode-editors on this page.
On LinuxBasics.org: Networking and remote access
Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.
Linux® is a registered trademark of Linus Torvalds.