You are not logged in.

#1 2009-03-20 06:19:10

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

[SOLVED (sort of)] screen refuses to change urxvt's title bar

I've about had it with screen. This is the most frustrating piece of software I've ever had to configure. The guys at GNU should get their heads out of their asses and write better documentation.

...Sorry, I just had to let that out. I just spent the better part of an hour googling, searching wikis, forums, etc.. trying to figure out one simple thing: how to make urxvt's titlebar always say "screen: %n %t", where %n and %t are interpreted and replaced by screen. For example, "screen: 0 irssi".

Here's my current .screenrc:

# I hate "window 0"
bind c screen 1
bind 0 select 10
screen 1
select 1

# Welcome msg is stupid
startup_message off

setenv LC_CTYPE en_US.UTF-8
defutf8 on
vbell off

# Other fixes
termcapinfo rxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen (^En ^Et)\007'
altscreen on

# status line at the bottom, where it belongs
hardstatus on
hardstatus alwayslastline
hardstatus string "%Y-%m-%d;%c %{= kw}%-w%{= kG}%{+b}[%n %t]%{-b}%{= kw}%+w"
caption always
caption string "%="

No escape sequence in the termcapinfo line I could think of has worked. Even the above, which the wiki page even stated works, gives me a bash that starts with "1;2c" after my prompt. I have no idea why.

This is driving me crazy. My old box was able to do this.. there's no reason my current box can't. I would greatly appreciate any assistance I could get on this; my attempts to help myself have failed.

Last edited by xelados (2011-06-03 05:16:35)

Offline

#2 2009-03-23 18:13:12

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

I hate to bump this topic.. but continued searching and poking around hasn't net me any results.. if there's specific information you want, I can supply any info you need.

Offline

#3 2009-03-27 12:01:58

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

Third attempt.. still no luck. The guys in #screen haven't been helpful, Google hasn't helped, searching the screen mailing list hasn't led to anything meaningful.. I know this can be done...

[EDIT] Eureka! Just when I was about to give up, too. The trick is to change your hardstatus line to your caption line, and use hardstatus as your desired window-title information. Here's what works for me:

termcapinfo rxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;\007'
hardstatus string "screen (%n: %t)"

# status line at the bottom, where it belongs
caption string "%{= kw}%Y-%m-%d;%c %{= kw}%-w%{= kG}%{+b}[%n %t]%{-b}%{= kw}%+w"
caption always

I don't know exactly what was so special about this setup but I'm not gonna complain. It works!

itworks.png

Last edited by xelados (2009-03-27 12:13:57)

Offline

#4 2011-06-02 04:06:43

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

There's an oddity about this setup. Whenever I try to maximize or fullscreen a terminal (xterm and urxvt tested so far), screen crashes. I think something's off in my termcapinfo or my .screenrc, since it doesn't screw up when I load screen without a .screenrc.

https://github.com/sporkbox/dotfiles/bl … /.screenrc

Any ideas? I hope necroposting is okay since it relates to this specific configuration.

Offline

#5 2011-06-02 04:28:59

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

I'll trade you a necro for a more oblique solution:

# pacman -S tmux

It is a far superior solution (and the documentation is very good).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2011-06-02 18:58:53

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

Can I do everything with tmux that I do with screen? Here's a screenshot:

http://i.imgur.com/8i7LO.png

Specifically I want to see the ttys I have open, name them, the date & time, and the titlebar reflecting which tty I have open.

Offline

#7 2011-06-02 19:01:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

xelados wrote:

Can I do everything with tmux that I do with screen? Here's a screenshot:

http://i.imgur.com/8i7LO.png

Specifically I want to see the ttys I have open, name them, the date & time, and the titlebar reflecting which tty I have open.

I think so. Check this thread.

Offline

#8 2011-06-02 19:57:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

xelados wrote:

Can I do everything with tmux that I do with screen? Specifically I want to see the ttys I have open, name them, the date & time, and the titlebar reflecting which tty I have open.

That. And more. You can have tmux start with all of those windows/panes open, with the correct names, the apps running etc...

See here for the differences between the two: http://unix.stackexchange.com/questions … gnu-screen


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2011-06-03 03:19:06

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

jasonwryan wrote:
xelados wrote:

Can I do everything with tmux that I do with screen? Specifically I want to see the ttys I have open, name them, the date & time, and the titlebar reflecting which tty I have open.

That. And more. You can have tmux start with all of those windows/panes open, with the correct names, the apps running etc...

See here for the differences between the two: http://unix.stackexchange.com/questions … gnu-screen

Sold.

Offline

#10 2011-06-03 03:20:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED (sort of)] screen refuses to change urxvt's title bar

Another satisified customer.

Next!

(Please mark your thread as [Solved] on your way out) smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB