[Xquartz-dev] 2.3.2_rc4

Harald Hanche-Olsen hanche at math.ntnu.no
Wed Dec 24 00:53:51 PST 2008


+ Martin Costabel <costabel at wanadoo.fr>:

> Harald Hanche-Olsen wrote:
> []
>> To make life even more interesting, csh doesn't recognize the -l 
>> flag if it also given the -c flag.
>
> This is not what I am observing. I see csh behaving exactly like 
> tcsh in this respect.

Here be evidence (yes, the two shells behave the same):

; csh -l -c 'echo Howdy.'
Unknown option: `-l'
Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ].
; tcsh -l -c 'echo Howdy.'
Unknown option: `-l'
Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].

To make a non-interactive login (t)csh, you *have* to give at a minus 
sign at the head of argument 0 (like bash's exec -l will do).

Demo ($&run is an es primitive that allows you to specify the 0th 
argument ... it also does no path searching):

; cat .login
echo 'Hi, this is .login running'
; $&run /bin/csh -csh -c 'echo Howdy.'
Hi, this is .login running
Howdy.
; $&run /bin/tcsh -tcsh -c 'echo Howdy.'
Hi, this is .login running
Howdy.

>> I think this combination of facts destroys any hope of a single 
>> method for doing what we are trying to do and which works with 
>> both bash and csh.
>
> My current X11 wrapper script works fine(*) for csh, tcsh, bash, 
> ksh, zsh.

It works because it does, in fact, use different methods to make a 
non-interactive login process in the bash and (t)csh cases.

- Harald


More information about the Xquartz-dev mailing list