Bug 139330 - Xsession error for (some) tcsh users
Summary: Xsession error for (some) tcsh users
Status: RESOLVED FIXED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-28 20:59 UTC by Jim
Modified: 2008-05-19 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim 2006-12-28 20:59:38 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Slackware Packages
Compiler:          gcc version 3.4.6 
OS:                Linux

/opt/kde/share/config/kdm/Xsession has the following section of code

  */csh|*/tcsh)
    # [t]cshrc is always sourced automatically.
    # Note that sourcing csh.login after .cshrc is non-standard.
    xsess_tmp=`mktemp`
    $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c export > $xsess_tmp"
    . $xsess_tmp
    rm -f $xsess_tmp
    ;;

If the user has "noclobber" set, the redirection of the output into $xsess_tmp fails.  Changing the ">" to ">!" works for me, but other people's experience may differ.
Comment 1 Oswald Buddenhagen 2007-02-10 17:27:24 UTC
hmm, a shell might not have noclobber and consequently no >! operator, so it needs to be tested.
/me wonders, whether this csh hack will ever work reliably ...
Comment 2 Jim 2007-02-11 03:09:32 UTC
Ummm... on my version of tcsh, unsetting noclobber has no effect on 
the existence of >!   

Are you hypothesizing this or do you have an example of such a shell?

Jim
Comment 3 Oswald Buddenhagen 2007-02-11 10:23:41 UTC
it might surprise you, but there are other cshs than tcsh out there. i'm also ready to believe that some old tcshs don't have the feature, either, but it's improbable that they are deployed together with kde.
Comment 4 Jim 2007-02-11 14:56:09 UTC
No, it doesn't surprise me at all, I used csh for many years before I found out about tcsh.  But I don't recall any version of csh or tcsh that I used as only
implementing >! if noclobber is set.  (That would seem like a strange thing to do, in my opinion.)

I'm not sure why you think old tcshs (or cshs) don't have this feature.  I did a quick web search for csh man pages and came across a few older ones, and they all include the >! syntax.  So again, is your concern mere speculation or have you ever seen a version of csh or tcsh that doesn't have >! ?

I suggest one way to find out is to make the change and see if anyone complains.
Comment 5 Oswald Buddenhagen 2007-02-11 15:10:19 UTC
>  I don't recall any version of csh or tcsh that I used as only
> implementing >! if noclobber is set.
>
who exactly claimed such a thing? ;)

> I did a quick web search for csh man pages and came across
> a few older ones, and they all include the >! syntax.
>
now, that convinces me to give it a shot - in kde 4 and 3.5.7, that is.