From mint-bounce@lists.fishpool.fi Thu Aug 28 03:49:00 2008 Message-ID: <48B656CE.3000000@utbm.fr> Date: Thu, 28 Aug 2008 09:42:06 +0200 From: Olivier Landemarre MIME-Version: 1.0 To: "J. F. Lemaire" , mint@lists.fishpool.fi Subject: Re: [MiNT] Run from desktop or shell? References: <200808231328.38603.jflemaire@skynet.be> <200808272152.53092.jflemaire@skynet.be> <20080827221717.64206c7jhazf9zd9@webmail1.utbm.fr> <200808272300.04933.jflemaire@skynet.be> In-Reply-To: <200808272300.04933.jflemaire@skynet.be> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: olivier.landemarre@utbm.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Hello > Hello Olivier, > > On Wednesday 27 August 2008, Olivier.Landemarre@utbm.fr wrote: > > >>> How can I know if a GEM program was executed from a shell (namely >>> Toswin2) or from the desktop? I'm outputting debug stuff to stdout >>> but I'd rather not do it when the app is run from the desktop >>> because it messes up the whole screen >>> >> You can know if TosWin2 run your application looking in the TERM env >> >> under TosWin2 TERM=tw100 >> >> under classical screen output this is probably TERM=st52 >> > > That was a good idea Olivier, but unfortunetely I always get TERM=tw52 > either way. And the system env variable is also tw52. Can you point me > to some documentation about that? > I have look in toswin2 source code you can find how it work in environ.c When launch a prog, toswin2 made a new env in function "normal_env()" for this it take AES env then correct or add some env for it like TERM if emulation is VT52 it should put TERM=tw52 if emulation is VT100 it put TERM=tw100 So if you not find any diffrence this is probably that in your AES env TERM is already with tw52, that is not correct it should be to st52 this is probably define in mint.cnf or perhaps in your aes config file. I have test it on MyAES, in my config for ".prg" software TERM=st52 and for ".tos" software I have TERM=tw52, this was test with "sysinfo" I have rename it in tos or prg for this. Regards Olivier > Cheers, > JFL >