Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
I often need to copy some text line from the command line in an text editor (emacs or nano). If I am using the terminal in a Gui, there aren't problems because i simply highlight the text and copy it, but how can I copy the text without using the mouse for example from a text only system ?
% cat test.txt
Script started on Sat 11 Oct 2008 02:43:54 PM PDT
% echo "Hello world!"
bash: !": event not found
%
Script done on Sat 11 Oct 2008 02:44:10 PM PDT
I've tried the command script, it's really useful ! Thanks
About gpm can you tell me how to start using it ?
Thanks
gpm is a daemon. It is loaded at startup. However, your distro might or might not be configured to run it by default. You will have to check your distro documentation to see how to add/remove services at startup. It really depends on the distro you use.
gpm enables the usage of the mouse in console, that way, you can select text like if you were on a terminal emulator. Then, to paste it, use the middle click button.
Yet another alternative is to use GNU screen, which besides the capability to do what you want, also adds lots of other interesting features. It's not a simple thing to learn, but it definitely worths the trouble.
Thank you everybody
I have learnt lots of things from your answers
Now i have resolved my problem with GPM, it is included in the repository of my distribution (Ubuntu).
Step 1
less <file_name> (this displays the content of the file on screen)
Step 2
copy paste the content using mouse (drag and select the text content you want)
Step 3
Shift+Insert into the window of your choice (this pastes the content you have copied in Step 1 into the window in focus)
Jokes apart, by the tone of the first post, I understood that he was assuming that "text only system" implied "no mouse".
During the thread, several ways of achieving the desired purpose have been exposed and explained, and he already seem to have chosen the gpm based solution (mouse). The rest of solutions are valid of course. And each one can choose whatever fits him best.
In fact, at the beginning I'd copy the text, without using the mouse in a text only system.
But after, from the answers I hadn't found a directly solution to the problem, so I resolved that use GPM is a great alternative.
Anyhow if someone tell me how to select and copy text in a text only system without using the mouse (really ), I will be very thankful to him.
In fact, at the beginning I'd copy the text, without using the mouse in a text only system.
I am a keyboard guy myself, but that statement comes from the assumption that mouse=graphics, which is not true.
Quote:
But after, from the answers I hadn't found a directly solution to the problem, so I resolved that use GPM is a great alternative.
Anyhow if someone tell me how to select and copy text in a text only system without using the mouse (really ), I will be very thankful to him.
Many valid alternatives have been declared in this thread. Mine is GNU screen, which has many many good features, besides copying text and pasting it. Google "GNU screen scrollback mode"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.