You are not logged in.

#1 2011-01-26 00:19:01

jwhendy
Member
Registered: 2010-04-01
Posts: 621

[SOLVED] urxvt oddities -- copying/pasting and $TERM

Hi,


Just switched to urxvt from xfce-terminal and noticed a few things I wanted to ask about.

- when copying and pasting, I have to actually click inside the window before Shift-Insert will work. Is this normal? I'd have expected that if I (typical use case) Alt-tabbed to Chrome, highlighted some text, pressed Ctrl-C, Alt-tabbed back to urxvt and then did Shift-Insert, it would work. That doesn't always happen.
--- I have urxvt bound to Ctrl-Alt-T. If I copy some text and use that to open a fresh instance up, it doesn't work.
--- If I've clicked on the border to move the window, Alt-tab away, then Alt-tab back and try, it doesn't work. Even though I can still type in urxvt, I can't paste until I click inside the text area again.
--- It appears that if urxvt was functioning properly when I last closed it, a fresh instance will function properly again. I'm not sure why it always stops, I just know that clicking makes it start again.

- when opening up urxvt, the menu bar reads "urxvt" (window title). If I run yaourt (and probably other things), it switches to rxvt-unicode-256. Why is this happening? My bash_profile contains

export TERM=rxvt-unicode

I have also tried changing that to "urxvt" instead... no luck.

$ echo $TERM
rxvt-unicode-256color

It seems like it's getting set somewhere else. This hasn't seemed to affect anything much, though once I do recall yaourt complaining that rxvt-unicode-256color wasn't a recognized terminal or something.

Thoughts on these? Is the pasting behavior the same for any others and what are the results of your "echo $TERM"? Also, what's it supposed to be for this type of terminal? rxvt-unicode? urxvt? other?

Last edited by jwhendy (2011-01-26 18:45:00)

Offline

#2 2011-01-26 02:47:41

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: [SOLVED] urxvt oddities -- copying/pasting and $TERM

you aren't supposed to set TERM yourself... it's being correctly set to rxvt-unicode-256color, which corresponds to the terminfo file (/usr/share/terminfo/r/rxvt-unicode-256color)

if you set TERM yourself, it's going to be set wrong in other terminals, such as the linux console

copy/paste is working as expected, you just aren't familiar with the X clipboard buffers - there's a PRIMARY, SECONDARY and CLIPBOARD, middleclick/shift-insert pastes PRIMARY (aka selection, any text you have selected)

Offline

#3 2011-01-26 03:06:36

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] urxvt oddities -- copying/pasting and $TERM

@thestinger:

Thanks. I'll remove the TERM setting from bash. In googling setup, I found such instructions HERE, so I inserted both lines about UTF8 and exporting a TERM value.

Re. copy/pasting... you may need to be more specific. By aka selection, any text you have selected do you mean only within urxvt or selected anywhere? Also, if this is only how it works, then that's now what I'm experiencing. I can do the following:

Works:
- open urxvt
- alt-tab to chromium
- select text, ctrl-c
- alt-tab to urxvt
- click in the urxvt text window anywhere
- shift-insert
- pasted text

Does not work:
- open urxvt
- click on urxvt window frame to move it
- alt-tab to chromium
- highlight some text and copy with ctrl-c
- alt-tab to urxvt
- shift-insert does nothing

The only difference in what happens is when I have clicked in urxvt's text space or not. If so, shift-insert works flawlessly. If not... then it doesn't. Is the clipboard buffer type (primary/secondary/clipboard) sensitive to where my mouse has last clicked? I don't understand why if I alt-tab back to urxvt and can type in it... why shift-insert doesn't work to paste at the cursor location.

Offline

#4 2011-01-26 03:09:24

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: [SOLVED] urxvt oddities -- copying/pasting and $TERM

There are 3 clipboard buffers, anything you select in any application goes into PRIMARY, try doing the same thing without ctrl-c. ctrl-c puts stuff you have selected into the CLIPBOARD buffer - urxvt has no way to access it unless you're using a perl extension or xclip/xsel. Try highlighting the text in chromium and leaving it highlighted, and just shift-insert or middleclick in urxvt (no ctrl-c).

Last edited by thestinger (2011-01-26 03:10:11)

Offline

#5 2011-01-26 03:13:41

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] urxvt oddities -- copying/pasting and $TERM

@thestinger

Try highlighting the text in chromium and leaving it highlighted, and just shift-insert or middleclick in urxvt (no ctrl-c).

Son of a... that's fantastic -- I had no idea. Thank you for the explanation. Not only does it work.. but I get to do things that much faster with urxvt (used to ctrl+shift+v in xfce-terminal).

Many thanks.

Last edited by jwhendy (2011-01-26 18:44:47)

Offline

Board footer

Powered by FluxBB