LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > 4MLinux
User Name
Password
4MLinux This forum is for the discussion of 4MLinux.

Notices


Reply
  Search this Thread
Old 11-08-2015, 03:24 AM   #1
SansSg
LQ Newbie
 
Registered: Nov 2015
Posts: 10

Rep: Reputation: Disabled
How to copy and paste from Terminal to other applications?


Hi,

Is copy and paste from Terminal to other applications like Chrome or Leafpad supported? I tried a few ways (Ctrl-C, Ctrl-Insert, right-click, etc) but not working.

Thank you.
 
Old 11-08-2015, 03:57 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
yes, it is possible.
linux uses 2 clipboards, primary and secondary. simply highlighting the text copies to the primary clipboard. inside the terminal you canthen paste with 'Shift+Insert'. try it.
however, it doesn't carry over to your browser.
some terminal emulators have the additional 'Shift+Ctrl+C' (and '...+V') commands to use the secondary clipboard.
what terminal emulator are you using?
 
1 members found this post helpful.
Old 11-08-2015, 04:31 AM   #3
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi.

GUI? Otherwise:
Code:
man xsel
and\or:
Code:
man xclip
&c...

Edit\add: Oh, install GPM...
https://www.virtualbox.org/attachmen...10914/VM01.PNG

Edited again to fix link... cut\paste don't always play well with HTML LOL!

Last edited by jamison20000e; 11-08-2015 at 04:56 AM.
 
1 members found this post helpful.
Old 11-08-2015, 04:34 AM   #4
m.a.l.'s pa
Member
 
Registered: Oct 2007
Location: albuquerque
Distribution: Debian, Arch, Kubuntu
Posts: 366

Rep: Reputation: 139Reputation: 139
I'm running Unity in Ubuntu 15.10 at the moment. Went to gnome-terminal and simply highlighted some text (in this case, $ man man). Pasted the text into a text document (using the Geany text editor) by clicking on the middle mouse button (the mouse wheel). Same thing worked for pasting the text into a web browser (Chromium).
 
2 members found this post helpful.
Old 11-08-2015, 04:43 AM   #5
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,254

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by m.a.l.'s pa View Post
I'm running Unity in Ubuntu 15.10 at the moment. Went to gnome-terminal and simply highlighted some text (in this case, $ man man). Pasted the text into a text document (using the Geany text editor) by clicking on the middle mouse button (the mouse wheel). Same thing worked for pasting the text into a web browser (Chromium).
Good answer! Highlighting (for coping) and middle mouse button (for pasting) will work for both the directions: "from terminal to terminal" and "from terminal to external GUI" (e.g. text editor or web browser).
 
1 members found this post helpful.
Old 11-08-2015, 04:50 AM   #6
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,254

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by ondoho View Post
yes, it is possible.
linux uses 2 clipboards, primary and secondary. simply highlighting the text copies to the primary clipboard. inside the terminal you canthen paste with 'Shift+Insert'. try it.
however, it doesn't carry over to your browser.
some terminal emulators have the additional 'Shift+Ctrl+C' (and '...+V') commands to use the secondary clipboard.
what terminal emulator are you using?
4MLinux uses xterm + aterm (strictly speaking: aterm with the "-tn xterm" option) by default.
 
1 members found this post helpful.
Old 11-08-2015, 05:27 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by zk1234 View Post
4MLinux uses xterm + aterm (strictly speaking: aterm with the "-tn xterm" option) by default.
i hadn't noticed that this is the 4mlinux subforum.
xterm + aterm do not use the secondary clipboard afaik.

good to know about the middle mouse click working both ways!

i usually use a clipboard manager with hotkeys...
 
Old 11-08-2015, 01:20 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
Is copy and paste from Terminal to other applications like Chrome or Leafpad supported?
basically the EXACT same as it is on Windows and OSX

WHY would it not be ????????

some programs might not support it but the os dose

Last edited by John VV; 11-08-2015 at 01:23 PM.
 
Old 11-08-2015, 01:49 PM   #9
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Why, when? ???

Edit\add: I like that I can copy text from almost anywhere in Linux, dialog boxes &c...

I think I missed the "not" in John's statement.

Last edited by jamison20000e; 11-08-2015 at 01:57 PM.
 
Old 11-08-2015, 06:07 PM   #10
SansSg
LQ Newbie
 
Registered: Nov 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi, other than middle mouse click, any other way to paste text?

Anyway to change the default "-tn xterm" option?



Quote:
Originally Posted by zk1234 View Post
4MLinux uses xterm + aterm (strictly speaking: aterm with the "-tn xterm" option) by default.
 
Old 01-09-2016, 09:17 PM   #11
SansSg
LQ Newbie
 
Registered: Nov 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
For those without mouse and cannot do middle click, can try start xterm using these parameters:

xterm -ls -xrm 'XTerm*selectToClipboard: true'&

then Ctrl-Insert: Copy from xterm/apps after selection
and Shift-Insert: Paste selection into xterm/apps
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't copy-paste from one terminal to another using vim cola Slackware 11 12-18-2009 10:51 PM
Looking for light terminal that supports copy and paste to other applications bbmak Linux - Newbie 10 09-27-2009 03:37 PM
copy and paste in a terminal? BmxFace Linux - General 5 06-29-2003 05:08 AM
copy and paste in terminal bash Linux - Software 3 07-08-2002 08:11 PM
copy/paste in a terminal session aethereal Linux - Newbie 4 12-19-2001 03:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > 4MLinux

All times are GMT -5. The time now is 09:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration