How to enable cut or copy-paste in xterm
You can edit XTerm file, using vim or nano (I use vim):
vim /home/your_user_name/XTerm
Add this:
XTerm*Background: black
XTerm*Foreground: green
XTerm*SaveLines: 2000
XTerm*faceName: Ubuntu mono
XTerm*faceSize: 12
XTerm*rightScrollBar: true
XTerm*ScrollBar: true
XTerm*scrollTtyOutput: false
XTerm*VT100.Translations: #override \
Shift Ctrl<Key>V: insert-selection(CLIPBOARD) \n\
Shift Ctrl<Key>V: insert-selection(PRIMARY) \n\
Shift<Btn1Down>: select-start() \n\
Shift<Btn1Motion>: select-extend() \n\
Shift<Btn1Up>: select-end(CLIPBOARD) \n\
Save and close with:
:wq
Open xterm:
xterm &
This configuration allows:
- Select and copy text into xterm: Hold Shiht key, click left mouse, select your text and click right mouse, to add it to clipboard.
- Paste text into xterm: Press Ctrl+Shift+V
- Show ScrollBar.
- Personalize font.
I hope this help you.
You shall not include that line in .Xdefaults
. Thus shalt thou start the program.
xterm -ls -xrm 'XTerm*selectToClipboard:true' &
Or with .Xdefaults
:
Add this line:
XTerm*selectToClipboard:true
and reload the configuration
xrdb ~/.Xdefaults