On Mon, Sep 06, 2004 at 03:25:39PM +0100, Roger Leigh wrote: > Package: dosemu > Version: 1.2.1-3 > Severity: normal > > If I want to import environment variables from the Linux environment > into the dosemu session using "unix -s varname", only variables without > an underscore are imported.
I did the exactly same thing as you, and here are my results: ---------------------------------------------------- FreeCom version 0.82 pl 3 [Dec 10 2003 06:54:37] D: = LINUX\FS/HOME/NEMESIS attrib = READ/WRITE E: = LINUX\FS/TMP/DOSEMU.NDQYZH/TMP attrib = READ/WRITE "Welcome to dosemu 1.2.1.0!" SHARE installed. About to Execute : d:blank1 PATH=c:\bin;c:\gnu;c:\dosemu COMSPEC=C:\COMMAND.COM HELPPATH=c:\help PROMPT=$P$G DOSTMP=/tmp/dosemu.ndqyzh/tmp DOSDRIVE_D=/home/nemesis TEMP=E:\ DOSEMU_VERSION=1.2.1.0 FOO=bar BAR=bar BAZ=bar BAT=bar FOO_BAR=bar FOO_BAT=bat CSL_ACC=asdf CSL_CSBIG=asdf CSL_CSNRM=asdf Press any key to continue . . . ---------------------------------------------------- But, these environment vars are not set in the parent shell, because a new shell is spawned to run the .bat file and then destroyed when it exits. To get the variables to be saved, DOSCOMMAND needs to be "c:\command.com /p /c d:\blank1.bat" so that the new shell loaded to run the batch file becomes permanent. The only other thing I can think of is that empty environment variables are automatically reaped under DOS. So if you try to import a variable that exists on the unix side but is empty, nothing will appear to happen, because it has the same effect as SET FOO= on the DOS side. > I've also found problems if DOSCOMMAND has arguments to the command e.g. > "command arg1 arg2". The args seem to be dropped, though I need to > investigate this one further. This also applies to running "dosemu > command arg1 arg2" with the appropriate unix command in autoexec.bat. Hmm, this definitely doesn't happen here (or else it would be impossible to invoke the permanent shell option). However, I am using a FreeCOM from here: http://freedos.sourceforge.net/freecom/FreeCOM.html#-download instead of the classic dosemu comcom, which you probably use because it is the default command interpreter in dosemu 1.2. Just take the command.com from the distribution and replace the command.com link in /usr/lib/freedos with it. Comcom is being phased out and already no longer exists in CVS: ---------------------- date: 2004/02/28 20:57:10; author: bartoldeman; state: dead; lines: +0 -0 Purge coopthreads & comcom ---------------------- so eventually it will be necessary to add FreeCOM to the dosemu-freedos package. I filed a bug for this a long time ago and it still sits in the tracker. ;( -- Ryan Underwood, <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature