Page 1 of 1

copy from urxvt to geany possible? (SOLVED)

Posted: Wed Mar 31, 2021 5:08 pm
by gychang

I use fossapup64 and had been using urxvt. Usually middle mouse click or Shift-Insert work (primary) after highlighting with a mouse. But trying to copy urxvt output does not seem to paste into Geany.. Even with perl extension (clipboard) as pictured from my .Xdefaults file fails to copy. I am using xfce4-terminal and everything works but was wondering if urxvt can be configured to copy and paste to a graphic application like geany.

copy.jpg
copy.jpg (66.78 KiB) Viewed 366 times

Re: copy from urxvt to geany possible?

Posted: Wed Mar 31, 2021 5:17 pm
by amethyst

highlight>middle-click>middle-click in geany?


Re: copy from urxvt to geany possible?

Posted: Wed Mar 31, 2021 6:20 pm
by williams2

To copy text in a urxvt window, just highlight it with the mouse.
The default urxvt perl extentions automatically copies the text to both the primary buffer and the clipboard buffer.
So to paste in a Geany window (or leafpad or pale moon or firefox etc) just middle click or press ctrl+V or right click and select paste in the context menu.

If you are using a text terminal that is not urxvt, for example, maybe xfce's builtin terminal, it probably won't have perl extentions, so ctrl+V won't work, but middle clicking should work.

If you copy something to the primary buffer and close the window before pasting, the selection may disappear from the buffer. I usually copy text then paste it immediately.

If you have a clipboard manager, it can be useful to copy the correct text to the buffers, ready for pasting.
You can always paste into a text editor window and select the text and maybe press ctrl+C to copy the text to the clipboard, to paste later. In other words, you can use a text editor window as a crude clipboard manager.

I have a script to copy text from the primary buffer to the clipboard buffer. which executes when I press ctrl+alt+B

Code: Select all

#!/bin/ash
# copy primary to clipboard
# primary is highlighted text
# clipboard is ctrl+C, ctrl+V
xclip -selection primary -o | xclip -selection clipboard

By the way, I copied the text of my script by highlighting the text in urvxt with the mouse,
then I pasted the text in Firefox into this forum post, by pressing ctrl+V.


Re: copy from urxvt to geany possible?

Posted: Wed Mar 31, 2021 6:24 pm
by Grey

Or try a slow but precise process in urxvt - highlight>>ctrl+right mouse click The menu appears:

urxvt_ctrl.png
urxvt_ctrl.png (28.11 KiB) Viewed 351 times

By the way, if you press ctrl+PS(Print screen) in an open terminal, a window will appear to save the contents of terminal to a PDF document.


Re: copy from urxvt to geany possible? (SOLVED)

Posted: Wed Mar 31, 2021 6:49 pm
by gychang

thanks for everyone's input, now got it all working!! :thumbup2:

Grey wrote: Wed Mar 31, 2021 6:24 pm

Or try a slow but precise process in urxvt - highlight>>ctrl+right mouse click The menu appears:
urxvt_ctrl.png
By the way, if you press ctrl+PS(Print screen) in an open terminal, a window will appear to save the contents of terminal to a PDF document.