Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!cidsv01.cid.aes.doe.CA!cidsv01.cid.aes.doe.CA!aspgpas From: aspgpas@cidsv01.cid.aes.doe.CA (Peter Silva) Newsgroups: comp.sys.sgi Subject: NeWS environment Keywords: .login user.ps environment NeWS Message-ID: <1991May10.141105.10129@cid.aes.doe.CA> Date: 10 May 91 14:11:05 GMT Sender: @cid.aes.doe.CA Reply-To: psilva@cid.aes.doe.ca Organization: Environment Canada Lines: 236 This problem drives me nuts. BASIC QUESTIONS: HOW DOES WINDOW MANAGER GET IT'S ENVIRONMENT ? HOW CAN I DEBUG .login WHICH ONLY FAILS WHEN STARTING NeWS ? I've noticed that my .login and user.ps files interact in weird and wonderful ways. It seems the content of my .login is ignored by NeWS when the window manager is started up, depending in some random manner, on what is in the .login and user.ps files. The variations that cause it to be ignored make no sense to me... (many changes to the .login will do it, below is just a very simple example) I had a big .login file, so I trimmed it down gradually until I got something I could deal with. I have a file that works (.login--) and one that doesn't (.login-) they user the same user.ps (which I can't live without!) With .login- my environment is ignored (the clock comes up with the machine's TZ, not my own, and the path doesn't include /usr/local/bin, so several windows just jam (command not found). with .login-- everything is fine. The immediate thing which occurs to one when looking at a diff of the two files is that there is a problem with xhost and newshost commands. So I removed them from the .login, and placed them in my user.ps. The symptoms are unchanged. (sigh) below are .login- .login-- diff of the two and my user.ps... for anyone who might be of help. #.login- set verbose setenv TZ EST5EDT set term=iris-ansi set DISPLAY_HOST=cidws04 if ( "$DISPLAY_HOST" != "" ) setenv DISPLAY "${DISPLAY_HOST}:0" setenv OSflavour "`uname -m`" setenv HostName "`uname -n`" if ( ( "$DISPLAY_HOST" != "" ) && "`uname -n`" != "$DISPLAY_HOST" ) then setenv NEWSSERVER `sns $DISPLAY_HOST` endif set MANPATH=( /usr/man /usr/catman \ /usr/local/src/X11R4/contrib/toolkits/Xw/doc/manpages \ ) set path=( /usr/local/bin /usr/bin /usr/sbin /usr/bsd /usr/bin/X11 \ /bin /usr/demos /usr/ustation/iris/3.03/pub/bin ) setenv OSflavour 'sgi4D' eval `tset -s -Q \?iris-ansi` set term=$TERM stty intr erase ^H kill ^U -tabs -parenb cs8 set prompt="`uname -n`% " alias cd 'cd \!*;echo "\033P1.y`uname -n`:`pwd` -- $LOGNAME \033\\\c"' echo "\033P1.y`uname -n`:`pwd` -- $LOGNAME \033\\\c" /usr/sbin/newshost disable xhost + unset DISPLAY_HOST unset setup_dir #.login-- #set verbose setenv TZ EST5EDT set term=iris-ansi set DISPLAY_HOST=cidws04 if ( "$DISPLAY_HOST" != "" ) setenv DISPLAY "${DISPLAY_HOST}:0" setenv OSflavour "`uname -m`" setenv HostName "`uname -n`" if ( ( "$DISPLAY_HOST" != "" ) && "`uname -n`" != "$DISPLAY_HOST" ) then setenv NEWSSERVER `sns $DISPLAY_HOST` endif set MANPATH=( /usr/man /usr/catman \ /usr/local/src/X11R4/contrib/toolkits/Xw/doc/manpages \ ) set path=( ~/bin ~/share/bin /usr/local/bin /usr/bin /usr/sbin \ /usr/bsd /usr/bin/X11 /usr/local/bin/X11 \ /bin /usr/demos /usr/ustation/iris/3.03/pub/bin ) setenv OSflavour 'sgi4D' eval `tset -s -Q \?iris-ansi` set term=$TERM stty intr erase ^H kill ^U -tabs -parenb cs8 set prompt="`uname -n`% " alias cd 'cd \!*;echo "\033P1.y`uname -n`:`pwd` -- $LOGNAME \033\\\c"' echo "\033P1.y`uname -n`:`pwd` -- $LOGNAME \033\\\c" # /usr/sbin/newshost disable # xhost + unset DISPLAY_HOST unset setup_dir i#diff .login- .login-- 1c1 < set verbose --- > #set verbose 14c14,15 < set path=( /usr/local/bin /usr/bin /usr/sbin /usr/bsd /usr/bin/X11 \ --- > set path=( ~/bin ~/share/bin /usr/local/bin /usr/bin /usr/sbin \ > /usr/bsd /usr/bin/X11 /usr/local/bin/X11 \ 25,27c26,27 < < /usr/sbin/newshost disable < xhost + --- > # /usr/sbin/newshost disable > # xhost + % user.ps % User customization file. % OK, Let's try and set up my windows... UserProfile /MenuHome /overFirst put UserProfile /PrefStackSize 8 UserProfile /prefStacks 3 UserProfile /prefDelta [ 90 30 /Filling ] /locksmenu [ (qix) { (bin/xlock -display localhost:0 -mode qix) forkunix } (fractal) { (bin/xlock -display localhost:0 ) forkunix } ] /new DefaultMenu send def /forkwsh { % args => - (wsh -r1000 -f Screen-Bold.15 ) exch append forkunix } def /localshell { %args => - currentkey dup (-s40x80 -n ) exch append forkwsh } def /localcmd { %args => - currentkey dup (-s40x80 -n ) exch append ( -c /usr/local/bin/kfix ) 3 -1 roll append append forkwsh } def % currentkey dup (-s40x80 -n ) exch append /unixhost { %args => - ( -s40x80 -c /usr/local/bin/krlogin ) currentkey append forkwsh } def /otherhost { %args => - ( -m40x132 -s40x80 -c /usr/local/bin/ktelnet ) currentkey append forkwsh } def /ShellMenu [ (cidsv01) { unixhost } (cidsv02) { unixhost } (cidsv03) { unixhost } (cidsv04) { unixhost } (cidgw05) { unixhost } (cidgw06) { unixhost } (cidsv07) { unixhost } (cid_dev1) { otherhost } (cidws02) { unixhost } (cidws03) { unixhost } (cidws06) { unixhost } (cidws09) { unixhost } (cidws10) { unixhost } (cmeteoc) { unixhost } (cmc_sat) { unixhost } (ops) { unixhost } (rpn) { unixhost } (impl) { unixhost } (cid_mfa) { otherhost } (cid_mfb) { otherhost } (cid_pro1) { otherhost } ] /new DefaultMenu send def (Hosts) /settitle ShellMenu send (StdStuff) 10 10 [ 90 30 8 8 ] preforigin (wsh) (StdStuff) prefalias (elm) (StdStuff) prefalias (unixhost) (StdStuff) prefalias (otherhost) (StdStuff) prefalias (forkwsh) (StdStuff) prefalias (Local) (StdStuff) prefalias /basicRestartActions [ { (rm -f /tmp/.cutbuffer) forkunix } { establishEnvironment } { RunConsole } { (windowchest) seqfork } { startXsgi } ] def /rootmenu [ (Local shell) { localshell } [ (Remote shells) pullRightIcon ] ShellMenu (elm) { localcmd } (Log Out) { /showat exitnewsmenu send } (SpotlightLock) { (bin/spotlight) forkunix } [ (Screen Lock) pullRightIcon ] locksmenu ] /new DefaultMenu send def (Window Manager) /settitle rootmenu send /RestartActions [ { (demochest) forkunix } { (clock) forkunix } { (bin/night) seqfork } { (ical) forkunix } { (mousewarp 6 3) seqfork } { (gamma 1.01) seqfork } { (newshost disable) seqfork } { (xhost + ) seqfork } ] def (stdin) 400 200 200 800 prefposition (clock) 1160 908 110 110 prefposition (cal) 885 832 preforigin (night) -- Peter Silva OS Support psilva@cid.aes.doe.ca Dorval Computing Centre (514) 421-4692 Atmospheric Environment Service