How to copy text selected by gpm from a tty to some gnome-session?

Rick Stevens rstevens at corp.alldigital.com
Thu Apr 12 18:36:04 UTC 2012


On 04/12/2012 11:16 AM, stan wrote:
> On Thu, 12 Apr 2012 09:21:36 -0700
> Rick Stevens<rstevens at corp.alldigital.com>  wrote:
>
>> On 04/12/2012 07:30 AM, stan wrote:
>>> On Thu, 12 Apr 2012 08:52:16 +0200
>>> Joachim Backes<joachim.backes at rhrk.uni-kl.de>   wrote:
>>>
>>>> a little question: I copy some text on a tty console by gpm, and I
>>>> want to paste this text into some gnome/kde session. How to do this
>>>> without using some file?
>>>
>>> If I understand your question, I've never been able to get this to
>>> work. I think the context for gpm is erased or reset when switching
>>> from consoles to X and vice versa.  I haven't actually researched
>>> what actually happens, so there could be an answer to your
>>> question, and I look forward to hearing it if there is.
>>
>> The cut/paste buffer for gpm is maintained by gpm and is a separate
>> space from the cut/paste buffer provided by your desktop manager. They
>> aren't designed to share data. I suppose they could by using some
>> shared memory segment with a well-known handle or something, but
>> currently they're entirely separate.
>
> But that would imply that it should work, because gpm works just fine
> in X.  I can select text by double clicking with the mouse, and paste
> it with the middle button, just like in a console.  It even shares
> across workspaces, just like it shares across consoles, and within
> screen instances in the console.  From the behavior, it seem that gpm
> has a separate buffer for the consoles and X.  Or X is just emulating
> gpm behavior.

When you're using the cut and paste in xterms (or gnome-terminals or
whatever), you're using the window (or desktop) manager's buffer. Yes,
it sort of looks like what goes on with gpm, but it's a totally
different beast. xterms and the like use /dev/pts/* to emulate terminals

gpm is used on virtual terminals (which use /dev/tty*") and uses a
completely separate cut and paste buffer than the one used by your X
window manager. They're not the same.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-           Fear is finding a ".vbs" script in your Inbox            -
----------------------------------------------------------------------


More information about the users mailing list