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.
Created attachment 26203 [details, diff] 'Xwindow Copy-and-Paste' patch for GPM
where did you get this patch?
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.
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