Bug 387581 - "xterm -title" does not work due to /etc/csh.cshrc problem
"xterm -title" does not work due to /etc/csh.cshrc problem
Product: Fedora
Classification: Fedora
Component: setup (Show other bugs)
All Linux
low Severity urgent
: ---
: ---
Assigned To: Phil Knirsch
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-16 15:12 EST by dann
Modified: 2015-03-04 20:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-22 11:06:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Get rid of bad precmd usage, fix tcsh prompt (1.03 KB, patch)
2008-01-26 12:30 EST, dann
no flags Details | Diff

  None (edit)
Description dann 2007-11-16 15:12:36 EST
In Fedora 8, if the user has /bin/tcsh as SHELL, doing 
xterm -title MYTITLE
does not work, "MYTITLE" is not set as the title. 

This is bad if you want to set the xterm title depending on the work you want to
do in it, and finding the cause why this does not work is very hard for a user.

This happens because of this line in /etc/csh.cshrc:
alias precmd 'echo -n "\033]0;${USER}@${HOSTNAME}:${PWD}"; echo -n "\007"'

precmd is not a great idea to use at any time, and to use it to set the window
title is an overkill, the same thing can be accomplish by setting the "prompt"

set prompt='%{\033]0;%n@%m:%c\007%}[%n@%m %c]%# '

Another issue: $user is used in setting the prompt variable for tcsh at the
beginning of the file, better use this: 
set prompt='[%n@%m %c]%# '
it is shorter and avoids \

The problem described in the bug report did not happen in previous versions of
Comment 2 dann 2008-01-26 12:30:40 EST
Created attachment 293054 [details]
Get rid of bad precmd usage, fix tcsh prompt

Attach is a patch that fixes this issue.
Please apply, it would be great if the package could be updated soon, this is
bad for tcsh users.

Comment 3 Phil Knirsch 2008-02-22 11:06:26 EST
Fixes included in next rawhide build.


Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.