LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2015, 06:27 AM   #1
da.wie
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Rep: Reputation: Disabled
copy/paste between browser and terminal


Hi

How does one copy text from eg Firefox and paste it into the terminal?

I need to run this command:

wget http://c758482.r82.cf2.rackcdn.com/s...83_x32.tar.bz2

Thanks
 
Old 12-26-2015, 07:20 AM   #2
linuxtech99
Member
 
Registered: Jan 2015
Posts: 35

Rep: Reputation: 4
Copy using "Ctrl + C" and paste in terminal using "Ctrl + Shift + V"
 
1 members found this post helpful.
Old 12-26-2015, 07:21 AM   #3
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,310
Blog Entries: 3

Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
copy/paste between browser and terminal

To copy and past in terminal try adding shift to the combo ctrl + C/V/X

Edit : ninjaed
 
Old 12-26-2015, 07:59 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,974

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
Are talking after you have dropped out to a terminal or just some gui terminal? If the gui kind I just highlight with mouse and then press the scroll button in the terminal window
 
Old 12-26-2015, 01:17 PM   #5
da.wie
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the answers. What I mean is to paste in the shell (ctrl alt f3).

Is it possible to do that?
 
Old 12-26-2015, 01:27 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by da.wie View Post
What I mean is to paste in the shell (ctrl alt f3).
That's a console.
 
Old 12-27-2015, 03:04 AM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,974

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
Quote:
Originally Posted by da.wie View Post
Thanks for the answers. What I mean is to paste in the shell (ctrl alt f3).

Is it possible to do that?
Not that I am aware of as you are leaving the environment where the copy was performed, so the console would have no knowledge
of any previous key strokes or the like.
I think your best option would be to paste what you need into a text file and then open it once you are at the console.
 
Old 12-27-2015, 06:39 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038
Quote:
Originally Posted by da.wie View Post
Thanks for the answers. What I mean is to paste in the shell (ctrl alt f3).

Is it possible to do that?
no.

however, there's no reason to leave your graphical environment to perform a wget.
you can even do it through your browser; it only donloads the file.
 
1 members found this post helpful.
Old 12-27-2015, 06:55 AM   #9
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 4,816

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Why do some people say "no"?!?!?

Yes.
I do it all the time.

I run Sparky and MINT at home right now, and have run many others. Copy/paste does nto always work the SAME, but it always works. (for me)

If your window has a edit menu option, you may need to use that in some applications, depending upon the xWindows, but generally the key bindings work.

Experiment. It is FUN.
 
Old 12-27-2015, 07:08 AM   #10
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I don't know if it's just me that does this, but I have to 'build' my clipboard in a file.
I make heavy use of bash_history and echo and redirect to a file, for use in a console,
regardless if I have a GUI session running or not. The console is well, the console.


GUI tools on a "server" is a foreign idea in my mind. But console is console! Ta Da...!
Use this:
Code:
echo "wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x32.tar.bz2" > ~/getrackcdn
Then in a console use:
Code:
sh /path/to/getrackcdn
It will execute the file and download in the directory from which it ran and damn easier to remember too.

Last edited by Habitual; 12-27-2015 at 07:09 AM.
 
Old 12-27-2015, 02:44 PM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038
Quote:
Originally Posted by wpeckham View Post
Yes.
I do it all the time.
my "no" was in answer if copy/paste works in a non-gui console/tty, which op described as "shell", but the added (ctrl-alt-f3) explains it.

if copy/paste indeed works from a running Xsession into a different tty, i'd be genuinely interested how?
 
Old 12-29-2015, 10:37 AM   #12
da.wie
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ok thanks

I'm still not sure how I would for example run this command to download rpm:

Code:
su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E fedora).noarch.rpm'
Do I need to type it into the console or is there a faster way?

Thanks

Dawie

Last edited by da.wie; 12-29-2015 at 10:47 AM.
 
Old 12-29-2015, 10:53 AM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
Highlight it with your mouse, then middle click (with the scroll wheel) in the terminal emulator.

Or highlight it with your mouse, press Ctrl+C, then go to the terminal emulator, and press Ctrl+Shift+V.

If you truly are working in a tty rather than a terminal emulator, then you can't directly copy-paste between X and the tty. You'd probably copy/paste it into a file using the terminal emulator, then switch to the tty and execute the file as a script, though it's very rare that you'd be working in X and a tty at the same time...

Last edited by suicidaleggroll; 12-29-2015 at 10:55 AM.
 
Old 12-30-2015, 02:43 AM   #14
gillsman
Member
 
Registered: Mar 2014
Location: UK
Distribution: Mint 18.3
Posts: 192

Rep: Reputation: 35
For me I just copy in normal way then move mouse cursor to terminal window right click & select paste. I use Mint, don't know if it works differently in other distro's but it works fine for me.
 
Old 12-30-2015, 04:19 AM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038
Quote:
Originally Posted by da.wie View Post
I'm still not sure how I would for example run this command to download rpm:

Code:
su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E fedora).noarch.rpm'
Do I need to type it into the console or is there a faster way?
according to your thread title, you copy this command from the web browser?
and then you want to switch to a non-graphical tty and execute that command?

ok, here's how:
Code:
echo "su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E fedora).noarch.rpm'" > somefile
(of course you could also create "somefile" with a graphical text editor, but why complicate things?)

now change to a tty, and execute:
Code:
source ./somefile
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy paste from vi to browser? SentralOrigin Linux - Software 2 12-13-2010 02:05 PM
Terminal with copy/paste support datbenik Linux - Software 1 12-08-2005 03:25 AM
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 to Terminal monowar Linux - Newbie 1 07-02-2002 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:21 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