[lug] Changing paths

Hugh Brown hugh at math.byu.edu
Tue Apr 4 19:39:21 MDT 2000


The easy thing to do then is to make your own .tcshrc and just set the
path variable

e.g.

.tcshrc

set path=( /bin /usr/local/bin /etc /usr/sbin /sbin \
        /usr/local/sbin /usr/local/java/bin /usr/etc /etc \
        /usr/bin /usr/bin/X11 \
        /usr/local/X11R6/bin  )


  if ( $?prompt ) then          # shell is interactive.
   stty erase "^H" kill "^U" intr "^C" eof "^D" susp "^Z"
    set history=200             # previous commands to remember.
    set savehist=10
    set prompt='[\!] %c02 $'    # command prompt.
    setenv MOZILLA_HOME=/opt/netscape/plugins
    # Sample aliases:
    alias       h       history
    alias       ls      ls -F
    alias q exit
  endif

Wayde Allen wrote:
> 
> OK, I have some more info to provide regarding my question about the path
> changing depending on where I'm loggin in from.
> 
>    - login shell is /usr/bin/tcsh
> 
>    - I have not defined any login files in my home directory.  By default
>      there exists a .bashrc file, but it only contains the comment line
> 
>         # ~/.bashrc: executed by bash(1) for non-login shells.
> 
>      Consequently I don't thing anything in my home directory is causing
>      this behaviour.
> 
>    - When logged in from the console my path is
>      /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
>      which matches the path setup by /etc/profile.
> 
>    - When logged in from a remote tty my path is /bin:/usr/bin which
>      matches the followin entry in /etc/login.defs:
> 
>      #
>      # *REQUIRED*  The default PATH settings, for superuser and normal
>      #  users.
>      #
>      # (they are minimal, add the rest in the shell startup files)
>      ENV_SUPATH      PATH=/sbin:/bin:/usr/sbin:/usr/bin
>      ENV_PATH        PATH=/bin:/usr/bin
> 
>    - Again in /etc/login.defs my console logins are defined by
> 
>      #
>      # If defined, either full pathname of a file containing device names
>      # or a ":" delimited list of device names.  Root logins will be
>      # allowed only upon these devices.
>      #
>      CONSOLE         /etc/securetty
>      #CONSOLE        console:tty01:tty02:tty03:tty04
> 
>    - Checking the file /etc/securetty I find:
> 
>      # /etc/securetty: list of terminals on which root is allowed to
>      # login.
>      # See securetty(5) and login(1).
>      tty1
>      tty2
>      tty3
>      tty4
>      tty5
>      tty6
>      tty7
>      tty8
>      tty9
>      tty10
>      tty11
>      tty12
> 
> Since the terminal that I seem to be getting when connecting from a remote
> computer appears to be ttyp0 perhaps this is a partial explainaion.
> Still, I don't know why /etc/profile appears to run when the login is
> from a console terminal, but not from a non-console terminal?
> 
> - Wayde
>   (wallen at boulder.nist.gov)
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list