Bug 438550 - screen doesn't work if SHELL=/bin/tcsh
Summary: screen doesn't work if SHELL=/bin/tcsh
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F9Blocker
TreeView+ depends on / blocked
 
Reported: 2008-03-21 19:53 UTC by Charles R. Anderson
Modified: 2015-03-05 01:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-07 21:35:21 UTC
Type: ---
Embargoed:


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

Description Charles R. Anderson 2008-03-21 19:53:07 UTC
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):
screen-4.0.3-10.fc9.x86_64

How reproducible:
always

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 19:59:32 UTC
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 16:19:25 UTC
This is caused by prompt setting in /etc/csh.cshrc.

Comment 3 Jesse Keating 2008-04-04 03:55:22 UTC
(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 13:00:56 UTC
--- 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
       breaksw
     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]%# '
       else
 	alias precmd 'echo -n "\033_${USER}@${HOSTNAME}:${PWD}"; echo -n "\033\\"'
       endif



Comment 5 Phil Knirsch 2008-04-04 14:05:43 UTC
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.