Bug 387581 - "xterm -title" does not work due to /etc/csh.cshrc problem
Summary: "xterm -title" does not work due to /etc/csh.cshrc problem
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: 8
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-16 20:12 UTC by dann
Modified: 2015-03-05 01:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-22 16:06:26 UTC
Type: ---
Embargoed:


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

Description dann 2007-11-16 20:12:36 UTC
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"
variable: 

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
Fedora.

Comment 2 dann 2008-01-26 17:30:40 UTC
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.

Thanks

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

Thanks,

Read ya, Phil


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