Bug 438550 - screen doesn't work if SHELL=/bin/tcsh
screen doesn't work if SHELL=/bin/tcsh
Product: Fedora
Classification: Fedora
Component: setup (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Phil Knirsch
Fedora Extras Quality Assurance
Depends On:
Blocks: F9Blocker
  Show dependency treegraph
Reported: 2008-03-21 15:53 EDT by Charles R. Anderson
Modified: 2015-03-04 20:19 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-07 17:35:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace tcsh (149.78 KB, text/plain)
2008-03-21 15:59 EDT, Charles R. Anderson
no flags Details

  None (edit)
Description Charles R. Anderson 2008-03-21 15:53:07 EDT
Description of problem:

Starting screen from a user whose shell is /bin/tcsh is unsuccessful in
launching tcsh in each screen window.  You can still open window, change
windows, detach, reattach, and exit, but no shells actually appear.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. useradd -s /bin/tcsh testuser
2. passwd testuser
3. login as testuser
4. screen
5. Ctrl-A n to create a new window.
6. Ctrl-A K in succession to kill each window until screen exits.

Actual results:

title bar:
[screen 0: tcsh]

empty screen window

Expected results:

a tcsh prompt

Additional info:

screen works fine if the login shell is bash
Comment 1 Charles R. Anderson 2008-03-21 15:59:32 EDT
Created attachment 298805 [details]
strace tcsh

If you start screen with bash, it works.  But then try to start tcsh inside
screen, and it hangs:

[cra@localhost ~]$ tcsh

Attached is the strace from this attempt:

[cra@localhost ~]$ strace -o tcsh-strace.txt tcsh
Comment 2 Miroslav Lichvar 2008-03-31 12:19:25 EDT
This is caused by prompt setting in /etc/csh.cshrc.
Comment 3 Jesse Keating 2008-04-03 23:55:22 EDT
(In reply to comment #2)
> This is caused by prompt setting in /etc/csh.cshrc.

Do you have a proposed fix for this?
Comment 4 Miroslav Lichvar 2008-04-04 09:00:56 EDT
--- setup-2.6.12/csh.cshrc.orig	2008-02-22 17:48:32.000000000 +0100
+++ setup-2.6.12/csh.cshrc	2008-04-04 14:57:50.000000000 +0200
@@ -40,7 +40,7 @@ if ($?TERM) then
     case screen:
       if ($?tcsh) then
-	set prompt='%{\033_%n@%m:%c\033%}[%n@%m %c]%# '
+	set prompt='%{\033_%n@%m:%c\033\\%}[%n@%m %c]%# '
 	alias precmd 'echo -n "\033_${USER}@${HOSTNAME}:${PWD}"; echo -n "\033\\"'

Comment 5 Phil Knirsch 2008-04-04 10:05:43 EDT
Ugh, mye, my bad. I'll build a new package today that fixes this (among a few
other things).

Thanks for the fix, Miroslav.

Read ya, Phil

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