From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: [SYSADMIN/OSX] Changing the global umask (eg. for the Finder,
   Date: Fri, 23 Sep 2004 12:45:11 -0700
Msg# 715
View Complete Thread (7 articles) | All Threads
Last Next
James J wrote:
Is there a global .cshrc?

        Yes; in short:

OSX + LINUX:

    /etc/csh.cshrc   -- csh/tcsh loads whenever a csh/tcsh is created
                        (unless -f is specified, eg. '#!/bin/csh -f')

    /etc/csh.login   -- csh/tcsh loads this at login only (eg. 'tcsh -')

    /etc/profile     -- sh/bash loads this at login only (eg. 'sh -l')

        Because most OS's use the public domain shells now, which
        have more or less standardized themselves (tcsh, bash, etc),
        OSX and linux agree on the location of the global rc files.

        In some cases one or both of those files may not exist, but
        you can create them. Just be sure they're 'chown root:root'
        and are 'chmod 644' (rw-r--r--) to prevent user hackery.

        So if you want to add some 3rd party software to everyone's
        login shells, tweak the:

/etc/csh.login
/etc/profile

        ..files.

        If you want settings to also be seen by 'rsh host command',
        then tweak the /etc/csh.cshrc file instead of /etc/csh.login.

        Under IRIX 6.2, the files to modify were /etc/cshrc and /etc/profile.
        Not sure what it is with IRIX 6.5.x (Bill, I'll bet you know)

        When setting environment variables, remember the difference in
        syntax between sh/bash and csh/tcsh, namely:

                csh/tcsh:    setenv NAME "setting"
                sh/bash:     export NAME="setting"

        Note; older sh's may not support the 'export NAME="setting"'
        syntax.. eg. IRIX 6.2. On those older systems, you would need
        the slightly clunkier syntax of 'NAME="setting"; export NAME'

CAVEATS
-------
        Just so you know, wrt OSX, anything you put in the cshrc/profile
        will NOT affect the GUIs like the Finder and Desktop, which is
        the  topic of this thread.

        The cshrc/profile files only affect shell logins, such as
        terminal windows, or rsh/ssh/telnet sessions.

        I'm ignoring the /etc/profile.d/* stuff (linux) for bash,
        but some folks may find that useful, because it lets you
        make a separate file for your settings, instead of needing
        to insert them into the flat /etc/profile.

        HTH.

--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Cel: (Tel# suppressed)
Fax: (Tel# suppressed)

Last Next