Women in Technology

Hear us Roar



Article:
  Hands on X11
Subject:   set in tcsh
Date:   2003-05-08 12:39:29
From:   anonymous2
The comment in this article about how to set the DISPLAY variable if you are using tcsh as your shell (any c-shell applies, though) reads:


set DISPLAY=10.0.1.2:0


As an experience tcsh user, I would never set a variable in this manner. Instead, I would type:


setenv DISPLAY 10.0.1.2:0


Note the absence of "=" which you must omit. The big differance is that the second form writes the variable into the environment, where the first form does not. On some OS's, the example presented in the article would work, but as a user moves into using that system more fully they will begin to experience strange behavior. This is due to environment variables being "masked" by local variables.


I never teach people to use commands that do not work universally, if I can help it.


Lamont R. Peterson <lrp@xmission.com>