Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!coherent!next!sstreep From: sstreep@next.com (Sam Streeper) Newsgroups: comp.sys.atari.st.tech Subject: Re: environment in desktop Message-ID: <304@next.com> Date: 29 Nov 90 20:23:54 GMT References: <1070@nikhefh.nikhef.nl> <3285@medusa.informatik.uni-erlangen.de> Reply-To: sstreep@elvis.UUCP (My Account) Organization: NeXT, Inc. Lines: 32 In article <3285@medusa.informatik.uni-erlangen.de> csbrod@medusa.informatik.uni-erlangen.de (Claus Brod ) writes: >t68@nikhefh.nikhef.nl (Jos Vermaseren) writes: > >>is there an official legal Atari sanctioned way to add variables >>to the environment of the desktop? The only way I can come up >>with is a terrible hack that leaves a little resident job with >>the new string. It has to look amoung its ancestors for which one >>is the desktop and then modify its pointer to the environment. >>If this is the `official' way I would like to know that too, >>but it is quite thinkable that there are already better ways. This way works very well. I use this method so that my environment from the desktop matches my environment when I am running from within the Laser shell. The overhead is insignificant - a 256 byte basepage plus about 50 bytes of assembly language code plus the length of the new environment strings. If anyone wants I can post the example. (This code is not original; I modified it from code posted to the net about 4 years ago. If I recall correctly it doesn't use any questionable kludges...) >There seems to be no official way to extend the system environment. >You _could_ do it this way: Place some program in your AUTO folder >that links into the exec_os vector. Wait for someone to jump thru >the vector (that is, wait for AES to come up). In this moment, >patch the environment as desired or install a new one. Ack! don't do that! (I know, atari programming sometimes makes you jump through hoops. Does it bother anyone else that Gem periodically resets the trap #2 vector? Like "you didn't reset that for a reason, did you? Here, let me fix it!") -sam (sam_s@NeXT.com)