[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Environment Variable weirdness

On Wed, 29 Sep 1999, Salman Ahmed wrote:

 : (1)
 : Running Debian 2.1, I noticed sth odd about a couple of 
 : environment variables (I am running XFree-
 : First of all :
 :     HOSTTYPE=i386-linux
 : I have a Celeron 300A processor and have installed a new
 : 2.2.12 kernel recently. Where is this variable getting
 : set from ?
 : How do I change this env variable on a global basis ?
 : Same thing for the MACHTYPE env variable :
 :     MACHTYPE=i386
 : Why do these variables refer to i386 when the arch
 : command displays the correct output :
 :     @phoenix:[/home/ssahmed] arch
 :     i686

... but the machine architecture is still "i386", as in Intel CISC.
Other machine architectures include m68k, powerpc, alpha, hp-ppa, etc.

You don't need to worry about this.

 : (2)
 : The other thing is that the DISPLAY env variable is set
 : to "unix:0.0". My question is : shouldn't this variable
 : be of the form $HOSTNAME:0.0 ? So why is set to "unix:0.0" ?
 : And how do I change this env variable on a global basis
 : (ie for all users) ?

It's faster to use a "UNIX domain socket" when all traffic is local as
you avoid some of teh overhead of an IP stack.  Why waste those

 : (3)
 : The last thing is : I'd like to create an environment variable
 : that contains the following information : kernel version and
 : machine architechture. e.g. : linux-2.2.12-i686. Let's call
 : it OSVERSION. Where do I set this environment variable ?

Do it in /etc/profile, add this line:

  export OSVERSION=`uname -r`-`arch`


Nathan Norman
MidcoNet  410 South Phillips Avenue  Sioux Falls, SD
mailto:finn@midco.net           http://www.midco.net
finger finn@home.midco.net for PGP Key: (0xA33B86E9)

Reply to: