Pasting external text into XTerm or UXTerm
Solution 1
Pasting external text into a terminal window the Linux way
The Linux way works with xterm
and uxterm
, where there are no drop-down menus or Windows style control codes like ctrl + shift + v.
Mark the text in the web page by pressing the left button of the mouse and move the mouse.
After that move the mouse so that the cursor is in the terminal window.
Press the middle button or the scroll wheel (press the scroll wheel as if it were a middle button). If there is no middle button you can press both the left and right buttons at the same time.
Solution 2
From the very helpful XTerm introduction and TrueType fonts configuration (futurile.net):
- Put configuration into ~/.Xresources
- Merge in changes to a running X session with:
$ xrdb -merge ~/.Xresources
~snip~
To tell xterm to use the standard Ctrl+Shift+c and Ctrl+Shift+v in the same way as gnome-terminal you add:
xterm*VT100.Translations: #override \ Shift <KeyPress> Insert: insert-selection(CLIPBOARD) \n\ Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\ Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\ Ctrl <Btn1Up>: exec-formatted("xdg-open '%t'", PRIMARY)
This line works for uxterm; simply duplicate it and insert a u
at the beginning.
Related videos on Youtube
RangerX
Updated on September 18, 2022Comments
-
RangerX over 1 year
I have a newly installed Ubuntu 17.04 Server and am trying to install some packages that require long command lines.
I want to copy the long command line from the web page and paste it into the terminal window. However, NONE of the standard key or mouse combinations will work, i.e. ctrl+shift+v, shift+insert, ctrl+insert, middle click. Nothing works.
How can I paste external text into XTerm or UXTerm?
-
luv.preet over 6 yearsare you using a VM ?
-