LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-18-2011, 08:28 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Copy and paste from a text console.


Hi:

One of the last things the slack installer (setup) asks, is if you want support for mouse copy and paste. I always say Yes. Can somebody tell me how to use it?
 
Old 09-18-2011, 10:07 PM   #2
Helen
LQ Newbie
 
Registered: Aug 2011
Location: Beijing
Posts: 3

Rep: Reputation: Disabled
I think it means when you work under a text console, you can copy the text through selecting it. And you can paste it though clicking the right mouse button.
I wonder if it works for you.

Last edited by Helen; 09-18-2011 at 10:10 PM.
 
Old 09-18-2011, 10:14 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I do not get it. I select. The selected part is then highlighted. To make use of it, I'd put the text in the buffer of a text editor, say vim. But typing 'vim' deselects the text. If with the prompt I right click, it is copied into the screen, but is of no use.

Last edited by stf92; 09-18-2011 at 10:16 PM.
 
Old 09-18-2011, 10:37 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Try highlighting the text and then push down on your mouse wheel to paste.

Last edited by Daedra; 09-18-2011 at 10:58 PM.
 
Old 09-18-2011, 10:40 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Right button or left?
 
Old 09-18-2011, 10:55 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I found a solution, but I lose the screen top line. First I type 'cat > foo.txt' <Enter>. I now select, paste and ctrl-D. Ready for use.

Last edited by stf92; 11-01-2011 at 09:32 PM.
 
Old 09-18-2011, 10:57 PM   #7
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by stf92 View Post
Right button or left?
Neither, push down on your mouse wheel button. Sorry for the confusion in the above post.

Last edited by Daedra; 09-18-2011 at 10:59 PM.
 
Old 09-19-2011, 12:03 AM   #8
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Is it equivalent to the central button in a three button mouse?
 
Old 09-19-2011, 12:48 AM   #9
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
I would think so, but maybe your mouse is different, not 100% sure. The mouse wheel is usually considered button 3.
 
Old 09-19-2011, 01:56 AM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Then I have no doubt. Pushing the wheel down is the same as pushing button three in a three-button mouse. Well, I do it and nothing happens. Did you read post #6?

And, if you do not mind, what do you use this feature for? I would like to know.
 
Old 09-19-2011, 10:35 AM   #11
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by stf92 View Post
And, if you do not mind, what do you use this feature for? I would like to know.
Umm ... I to copy and paste text. It saves typing! I'm not always running X, in fact I don't even always have it installed on every one of my machines.

It is also particularly handy if you are copying commands from documentation or your own notes as you are less likely to miss type. If you want to copy between running applications run them in a terminal multiplexer like GNU/Screen or better yet tmux.

Last edited by ruario; 09-19-2011 at 10:35 AM. Reason: spelling
 
Old 09-19-2011, 11:23 AM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Quote:
excerpt from 'man gpm';
gpm - a cut and paste utility and mouse server for virtual consoles

SYNOPSIS
gpm [ options ]

DESCRIPTION
This package tries to be a useful mouse server for applications running on the
Linux console. It is based on the "selection" package, and some of its code comes
from selection itself. This package is intended as a replacement for "selection" as
a cut-and-paste mechanism; it also provides additional facilities. The "selection"
package offered the first cut-and-paste implementation for Linux using two mouse
buttons, and the cut buffer is still called "selection buffer" or just "selection"
throughout this document. The information below is extracted from the texinfo
file, which is the preferred source of information.

The gpm executable is meant to act like a daemon (thus, gpmd would be a better name
for it). This section is meant to describe the command-line options for gpm, while
its internals are outlined in the next section.

Due to restrictions in the ioctl(TIOCLINUX) system call, gpm must be run by the
superuser. The restrictions have been added in the last 1.1 kernels to fix a secu-
rity hole related to selection and screen dumping.

The server can be configured to match the user's taste, and any application using
the mouse will inherit the server's attitude. From release 1.02 up to 1.19.2 is was
possible for any user logged on the system console to change the mouse feeling
using the -q option. This is no longer possible for security reasons.

As of 0.97 the server program puts itself in the background. To kill gpm you can
just reinvoke it with the -k cmdline switch, although killall gpm can be a better
choice.
I like to use 'gpm' since work is it cli most of the time. Makes my life easier to cut & paste between console(s) or applications.

Even when using a vt using 'gpm' will allow one to utility between applications when set-up properly.

Two button scroll mice are ideal for 'gpm' when the proper setup is made. That way the scroll wheel button is very handy.
 
Old 09-19-2011, 12:21 PM   #13
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Daedra View Post
I would think so, but maybe your mouse is different, not 100% sure. The mouse wheel is usually considered button 3.
The wheel is button 2.

Button 1 = Left
Button 2 = Middle or Wheel
Button 3 = Right
 
Old 09-19-2011, 01:17 PM   #14
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 779
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Coders frequently turn their nose up at a mouse, as if it were some smelly newbie tool, and as if they could do the same tasks faster without the mouse...

So how, in console, would they move blocks of text within the same file, or between separate files, more quickly than if they were using a mouse: with the "kill" and "yank" features of emacs, or course! It turns out, that if you can teach your fingers to memorize zillions of emacs keybard shortcuts, then you won't want a mouse.
 
Old 09-19-2011, 01:39 PM   #15
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by ruario View Post
Umm ... I to copy and paste text. It saves typing! I'm not always running X, in fact I don't even always have it installed on every one of my machines.

It is also particularly handy if you are copying commands from documentation or your own notes as you are less likely to miss type. If you want to copy between running applications run them in a terminal multiplexer like GNU/Screen or better yet tmux.
OK. But why do you not tell me how you use. The only way I know of is with something like cat. First I type 'cat > foo.txt' <Enter>. I now select, paste and ctrl-D. If instead I select, and run vim, when I paste vim simply puts me in Insert mode.

Last edited by stf92; 11-01-2011 at 10:12 PM.
 
  


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
[SOLVED] copy and paste text among text documents in Linux ethereal1m Linux - Newbie 5 03-28-2010 03:14 AM
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 11:28 AM
console copy , paste and screenshots geletine Linux - Newbie 3 02-09-2006 01:50 PM
How can I copy a bunch of text and then paste it, all in a framebuffer console? Shagrath239 Linux - Newbie 1 02-06-2006 11:32 PM
paste text from a virtual console to X? Rhatlinux Slackware 1 10-12-2004 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:52 AM.

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