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

Re: [MiNT] Run from desktop or shell?



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