Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208695 - app-shells/bash - bashrc has bad code setting app-misc/screen title
Summary: app-shells/bash - bashrc has bad code setting app-misc/screen title
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-03 06:52 UTC by Leonid Evdokimov
Modified: 2015-05-29 04:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bashrc patch (bashrc.patch,486 bytes, patch)
2008-08-17 07:44 UTC, Leonid Evdokimov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Evdokimov 2008-02-03 06:52:56 UTC
bashrc uses <esc>_ as «start» of screen title, <esc>k should be used according to man screen/TITLES

BUG #75670 also mentions that screen $TERM should be checked as "screen*", not as "screen"

Reproducible: Always

Steps to Reproduce:
1. start screen
2. C-a "
3. Look at title :)

Actual Results:  
title of the window is "bash"

Expected Results:  
title should look like user@host:~

$ diff -u /etc/bash/bashrc{.orig,}
--- /etc/bash/bashrc.orig       2008-02-03 12:36:19.000000000 +0600
+++ /etc/bash/bashrc    2008-02-03 12:43:11.000000000 +0600
@@ -28,8 +28,8 @@
        xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
                PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
                ;;
-       screen)
-               PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
+       screen*)
+               PROMPT_COMMAND='echo -ne "\033k${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
                ;;
 esac
Comment 1 Leonid Evdokimov 2008-08-17 07:44:45 UTC
Created attachment 163101 [details, diff]
bashrc patch

Is there anything wrong with this trivial patch?
Comment 2 SpanKY gentoo-dev 2009-01-10 12:32:20 UTC
i dont particularly care ... if the screen maintainer says it's ok, then it may be committed
Comment 3 Sven Wegener gentoo-dev 2009-01-11 14:53:59 UTC
I'm totally against dynamically changing the screen window title. The screen window title is actually a name for a window and not something where auxiliary information can be shown. It reflects how the user names his/her screen windows and it can be used to jump to windows by name. Hence it should be constant and never changed by an application.

The hardstatus, which is what we currently set, is the correct way for such information. For xterm we also set the hardstatus and xterm propagates it up as the X window title.
Comment 4 Leonid Evdokimov 2009-01-11 15:06:13 UTC
I agree, hardstatus may be better place than window name.
Maybe, the bug should be resolved as `invalid'.
Comment 5 SpanKY gentoo-dev 2009-01-11 17:07:00 UTC
i think that's what Sven was going for :)
Comment 6 Dennis Schridde 2011-01-01 10:36:26 UTC
This should probably be documented, or even configurable via useflag.
Comment 7 SpanKY gentoo-dev 2015-02-24 20:56:43 UTC
looks like this was done via bug 359389

http://sources.gentoo.org/app-shells/bash/files/bashrc?r1=1.21&r2=1.22