Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
really useful Xterm, Aterm and URXVT features (GNU Screen)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Xk2c
Apprentice
Apprentice


Joined: 17 Jul 2004
Posts: 240

PostPosted: Thu Dec 16, 2004 4:50 pm    Post subject: Reply with quote

markandrew wrote:
i can't get scrolling to work as i want in screen - basically, i'd like to be able to scroll with my mouse and pgup/pgdn keys without having to enter copy mode. is this possible?

i tried the lines from your screenrc but they didn't work. however, one strange thing - ONE terminal with screen running lets me scroll with my mouse without any adjustments to .screenrc. all other terminals don't. i can stop/restart the terminal and it still works. any other terminals i start don't allow scrolling. very, very strange


You are looking for:
Code:
# xterm scrollbar should work with screen
# also for scroll wheel
termcapinfo xterm ti@:te@
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo rxvt 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'


This should work with xterm, aterm, and rxvt (rxvt-unicode),too.
But beaware that you scroll back in TERM History with that, not in screens history!!

This means also you have to enable a Xterm history
e.g.
Code:
xterm -sl 5000


Which means, if you have several Screen-Session opened each of them will overide this TERM history.
But the screen history is available for every session allways!
Try it.
This "dirty hack" works good enough for me.

If someone has a better idea please let me know.
_________________
useful Xterm, Aterm and RXVT-Unicode features


Last edited by Xk2c on Thu Dec 16, 2004 4:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Thu Dec 16, 2004 4:57 pm    Post subject: Reply with quote

i tried that, it didn't work. here is my .screenrc:

Code:

defscrollback 5000
shell /bin/bash

# set window title to current command
shelltitle '$ |bash'

# extra key binds
bindkey -k F9 prev
bindkey -k FA next


#<F9> and <F11> binds                                                           #bindkey -k k9 prev
#bindkey -k F1 next                                                             
bindkey -k k1 select 1
bindkey -k k2 select 2
bindkey -k k3 select 3
bindkey -k k4 select 4                                                          bindkey -k k5 select 5
bindkey -k k6 select 6                                                         
# show host, time/date, and window list
#hardstatus alwayslastline "%{rk}%H%{wk} %c %M%d  %?%-Lw%?%{gk}%n-%f %t%?(%u)%?%{wk}%+Lw%? "
hardstatus alwayslastline "%{rk}%H%{wk} %c %d-%M  %?%-Lw%?%{gk}%n-%f %t%?(%u)%?%{wk}%+Lw%? "

autodetach off
startup_message off

# xterm scrollbar should work with screen
# also for scroll wheel
term rxvt
termcapinfo xterm ti@:te@
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo rxvt 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'


i'm using screen with aterm, which is based on rxvt; do i need to alter anything (like the termcapinfo xterm ti@:te@ line) to get it working?
Back to top
View user's profile Send private message
Xk2c
Apprentice
Apprentice


Joined: 17 Jul 2004
Posts: 240

PostPosted: Thu Dec 16, 2004 5:07 pm    Post subject: Reply with quote

markandrew wrote:
i tried that, it didn't work. here is my .screenrc:

<snip>

i'm using screen with aterm, which is based on rxvt; do i need to alter anything (like the termcapinfo xterm ti@:te@ line) to get it working?


Sorry you are right.
This scrollback feature does not work with aterm and urxvt anymore.
Problably s.th. has change in termcapinfo (/etc/terminfo/) for all rxvt based TERMs.

I´m using Xterm all time. With Xterm it still works like I said.
hmmm
Maybe some Term Hacker know what to change to make it work again????
_________________
useful Xterm, Aterm and RXVT-Unicode features
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Thu Dec 16, 2004 5:10 pm    Post subject: Reply with quote

doh! :)

where could i find out how to make it work? is there somewhere i can find it, or is it quite involved?
Back to top
View user's profile Send private message
Xk2c
Apprentice
Apprentice


Joined: 17 Jul 2004
Posts: 240

PostPosted: Thu Dec 16, 2004 5:16 pm    Post subject: Reply with quote

markandrew wrote:
doh! :)

where could i find out how to make it work? is there somewhere i can find it, or is it quite involved?


Yes it is involved !!!

I found this feature on the iNet.
Maybe have a look around at google and Mailinglist archives.

http://www.gnu.org/software/screen/screen.html
http://lists.gnu.org/archive/html/screen-users/
...this is a start from.


....and do not forget to post your answer, when you find it.

It´s out there. I know it. :D 8)
Where no one else has gone before....... ;PPP


good luck
_________________
useful Xterm, Aterm and RXVT-Unicode features


Last edited by Xk2c on Thu Dec 16, 2004 5:21 pm; edited 2 times in total
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Thu Dec 16, 2004 5:18 pm    Post subject: Reply with quote

i already looked there :/

but i didn't know it was termcapinfo related, so i'll have a looksie. thanks
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Thu Dec 16, 2004 5:49 pm    Post subject: Reply with quote

ok, this is really annoying. i changed TERM=rxvt to TERM=xterm in .screenrc, and bingo. two of my 3 open terminals starting scrolling in screen, with mouse wheel and shift-pgup/dn

the 3rd terminal does not work like this.

wtf?

why do some work and others not!? how is that reasonable? just enough carrot to make me think i've got it working, then a big fat stick-whack :(

EDIT: i just added
Code:

termcapinfo rxvt ti@:te@

to .screenrc and, um... it works! that was easy... :)
Back to top
View user's profile Send private message
Xk2c
Apprentice
Apprentice


Joined: 17 Jul 2004
Posts: 240

PostPosted: Thu Dec 16, 2004 6:51 pm    Post subject: Reply with quote

markandrew wrote:
why do some work and others not!? how is that reasonable?


Code:
echo $TERM



from the man:
Code:
 -tn termname
This  option  specifies  the name of the terminal type to be set in the TERM environment variable. This terminal type must exist in the termcap(5)  database  and should have li# and co# entries; resource termName.

_________________
useful Xterm, Aterm and RXVT-Unicode features
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Thu Dec 16, 2004 8:56 pm    Post subject: Reply with quote

$TERM was set to the same value ('rxvt') in all terminals - that's what i couldn't understand.

anyway, it's working now, so no matter. thanks anyway
Back to top
View user's profile Send private message
Loki|muh
n00b
n00b


Joined: 30 Jan 2003
Posts: 54

PostPosted: Sun Dec 19, 2004 10:14 pm    Post subject: Reply with quote

I have a problem with XTerm*charClass:

I have it like this:

XTerm*charClass: 33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48

but it does not mark URLs with a & in it :( It always stops at the & :(
I use xterm.

any ideas?
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 756

PostPosted: Sun Dec 19, 2004 11:40 pm    Post subject: Reply with quote

just a slight note if your .Xdefaults file doesn't get loaded you can always put the command givin earlyer
Code:
xrdb -load ~/.Xdefaults

into the .bashrc file.
Back to top
View user's profile Send private message
BudgetDedicated
n00b
n00b


Joined: 26 Apr 2004
Posts: 12
Location: NL

PostPosted: Sat Jan 01, 2005 2:36 pm    Post subject: Reply with quote

I like to see the exit code of a script explicitly, e.g. that a kernel compile went OK.

In your /etc/profile, change:
Code:
#This:
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
#To this:
                export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W $? \$ \[\033[00m\]'


Example:

The difference is just a simple $?
You can also do echo $? after a command.

Code:
-bash: not_here: command not found
thisServer root 127 #

_________________
Grt, Erik
[ My commercial Ad.: Europe's top quality Gentoo VPS provider: BudgetDedicated (starting at 20 euro/month) ]
Back to top
View user's profile Send private message
lovecraft
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2003
Posts: 86
Location: Massachusetts, USA

PostPosted: Sat Feb 12, 2005 3:37 am    Post subject: Another xterm tip Reply with quote

Hey all,

You might not know about this handy command. Do an "emerge xtermcontrol" and you can do all kinds of crazy stuff to your xterm *on the fly* - like changing bg/fg colors, fonts, title string, iconifying/deciconifying.... Long list!

Have fun,
_________________
Never underestimate the power of denial
Back to top
View user's profile Send private message
wickwire
n00b
n00b


Joined: 13 Dec 2003
Posts: 71

PostPosted: Fri May 27, 2005 12:20 am    Post subject: urxvt+screen+scrollback buffer Reply with quote

I'm sorry if I missed it somewhere but I've searched a lot and came out empty-handed on this one:

I'm running urxvt. I list a folder. Mouse scroll works just fine, scroll buffer as well. I then run screen. I move into another folder, list, scroll - and the scroll shown is from the initial folder I did prior to starting screen. All folders afterwards, same result.

I'm running urxvt. Don't list. I start screen. List, no scroll.

It seems that inside screen, the buffer won't update from what it had prior to running screen... :?:

I'm not sure what I'm supposed to have on ~/.screenrc, contents follow:

grin@GRiN ~ $ l .screenrc
-rwxr-xr-x 1 grin 60 Mai 27 01:09 .screenrc*

Code:
 defscrollback 5000
shell /bin/bash
termcapinfo rxvt ti@:te@


What am I missing...?

Thanks for the help!
Back to top
View user's profile Send private message
Xk2c
Apprentice
Apprentice


Joined: 17 Jul 2004
Posts: 240

PostPosted: Sun Jul 17, 2005 2:10 pm    Post subject: Reply with quote

have a look here:

https://forums.gentoo.org/viewtopic-p-1886767.html#1886767

basically there are 2 !! Histories.

one from your Term and another from screen.
if you scroll with your mousewheel you scroll ONLY through the Term history!!
same with Shift+PgUp.

Screen's history is only available through: Strg+A ESC

The thing is, when you work in screen it OVERWRITES the history from your Term.
This way we can use the scrollwheel in screen.
But if you need to know what happend some time back you have to enter the screen history.
_________________
useful Xterm, Aterm and RXVT-Unicode features
Back to top
View user's profile Send private message
wickwire
n00b
n00b


Joined: 13 Dec 2003
Posts: 71

PostPosted: Fri Jul 29, 2005 3:01 am    Post subject: Reply with quote

Thanks for the reply! I enabled both histories like you said and then I got to scroll with buffer inside screen, but only about 30 lines would stay in buffer - having set 5000 - so then I found and "remarked" line on my .Xdefault, using #, took it out and from then on it's working! Thanks a lot for your tips! :D

Here are my configs just in case:

.Xdefaults

Code:
grin@GRiN ~ $ cat .Xdefaults
URxvt*background:       black
URxvt*foreground:       white
URxvt*scrollBar:        false
URxvt*loginShell:       true
URxvt*inheritPixmap:    true
URxvt*tintColor:        #1a506d
URxvt*shading:          75
URxvt*title:            Gentoo Terminal
URxvt*name:             urxvt
URxvt*saveLines: 5000
URxvt*iconName:         Terminal
URxvt*font:    xft:arial:pixelsize=13:charwidth=10
URxvt*geometry:         101x19+0+0
URxvt*termName:         rxvt-unicode
URxvt*scrollTtyKeypress:true
URxvt*scrollWithBuffer: true
URxvt*borderLess:       true
URxvt*scrollTtyOutput:  true
URxvt*scrollKeypress:   false


Code:
.screenrc
grin@GRiN ~ $ cat .screenrc
defscrollback 5000
shell /bin/bash
term rxvt-unicode
URxvt -sl 5000
# xterm scrollbar should work with screen
# also for scroll wheel
termcapinfo rxvt-unicode ti@:te@
termcapinfo rxvt-unicode 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum