Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42667 - GPM patch for Copy/Paste between console and Xwindow
Summary: GPM patch for Copy/Paste between console and Xwindow
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-23 16:25 UTC by Alex Efros
Modified: 2004-10-03 02:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
'Xwindow Copy-and-Paste' patch for GPM (gpm-1.20.1-XCaP.patch,9.70 KB, patch)
2004-02-23 16:26 UTC, Alex Efros
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2004-02-23 16:25:04 UTC
This patch for gpm allow ease copy-paste between text consoles and Xwindow apps.

Now gpm will:
1. save selected text in it's own buffer (in addition to kernel's buffer)
2. reverse/apply current screen mapping (configured by "mapscrn") - just like kernel do
3. execute "xcb" to send selected in text console text to Xwindow's clipboard
4. execute "xcb" to fetch text selected in Xwindow and paste it in text console

Some notes:
a) it will work as usually and don't try to execute "xcb" if Xwindow isn't
   running (it will detect is it running by checking /tmp/.X11-unix/X0 file)
b) it will work as usually if you don't have "xcb" emerged
c) xcb executed by gpm should have access to Xwindow, so if gpm running as
   "root" (as usually) while Xwindow started by some other "user", then this
   "user" should enable access to his Xwindow for "root" - he can use "xhost"
   for this or just "ln -s /home/user/.Xauthority /root/"
d) to be able to copy from text console to QT-based apps (like Opera) you should
   "emerge autocutsel" and have autocutsel running in background in Xwindow
   (for example, add "autocutsel &" to your ~/.xinitrc)

I will attach patch to this "bugreport". :)

P.S. It should be applied AFTER all gentoo's patches for gpm.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Alex Efros 2004-02-23 16:26:35 UTC
Created attachment 26203 [details, diff]
'Xwindow Copy-and-Paste' patch for GPM
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2004-02-24 09:50:31 UTC
where did you get this patch?
Comment 3 Alex Efros 2004-02-24 12:58:19 UTC
I've created it. :-)
I don't really know C (My native language is Perl (c)), so it will be cool if
someone who is C professional will audit my code, just for the case.
Comment 4 SpanKY gentoo-dev 2004-10-03 02:24:10 UTC
please e-mail this patch to gpm@lists.linux.it

yes, it is pretty cool :), but i think it's too drastic a change for Gentoo-only