Previous Next Contents

5. Multiple users and Non-interactive sessions

5.1 Can I use dosemu on a multi-user system?

Corey Sweeney (corey@amiganet.xnet.com) reported (12/8/93) that

If you are running dosemu on a system in which more then one person may want to run dosemu, then you may want to change the directory of your hard drive image. Currently in the /etc/dosemu.conf file there exists the line saying that the hard drive image is "hdimage". If you change this to /var/lib/dosemu/hdimage then people do not have to worry about what directory they are in when they run dosemu, and hdimage does not have to be moved each time you upgrade to the next patch level.

If you do do this for multi-user dosemu, then you will want to make the hdimage in /var/lib/dosemu read-only for everyone but the dosemu administrator.

Note that you can use the new emufs.sys thing to mount a "public" directory and/or a "private" directory (a sub-directory in each person's home directory).

[Note: Users may also create a personal configuration file named ~/.dosrc (same format as /etc/dosemu.conf) to run their own copy of dos.]

5.2 How can I run dos commands non-interactively?

I have been meaning to write an article on this for quite some time but have not gotten around to it. Here are some hints from others:

Dan Newcombe (newcombe@aa.csc.peachnet.edu) reported (1/27/94) that

Here is an idea (untested) to be able to run a DOS command from the command line (or menu choice, etc...) without modifying the actual emulator. [Your dos partition is assumed to be mounted under Linux, already.]

Suppose you wanted to run wp60.exe with the parameter "wp60 d:\doc\paper.txt". You would do something like "dosrun wp60 d:\doc\paper.txt". "dosrun" would be a linux shell program that would a) edit/modify/recreate the dos autoexec.bat from your dos partition and b) simply run dosemu (e.g., "dos -C >/dev/null". Step a) would somehow keep all the stuff you'd normally want in autoexec.bat (e.g., mouse.com) and the last line would be "wp60 d:\doc\paper.txt".

On the dosemu side, beforehand, you would have to modify the config.sys file (located in hdimage) so that it 1) uses emufs to access the dos partition as D:, 2) sets "COMPSEC=D:\ (I think. I don't have a DOS manual around.), and 3) sets "shell=c:\command.com /p".

The idea is that for each time that you load the DOS emulator, you will recreate an autoexec.bat that is specific to that session. What makes it specific is that the last line will execute the program you want. The modifications on the hdimage are to tell the emulator/DOS that you want to use (and effectively) boot off of D:, which will be the actual DOS partition.

If you do not use hdimage and access the DOS filesystem directly upon boot-up of dosemu, then this will work, and you don't have to go through the hdimage part of this all.

---------------------

Daniel T. Schwager (danny@dragon.s.bawue.de) reported (7/2/94) that

You can use different dosemu.conf files (and different hd-boot-images with different autoexec.bat's) and call dosemu like

$ dos -F my_quicken_q_exe_dosemu.conf

---------------------

Dietmar Braun (braun@math20.mathematik.uni-bielefeld.de) reported (7/4/94) that

This is no problem at all when you use the redirector of dosemu. It is possible to redirect a drive letter to a linux path given by an environment variable.

So I have a shell script named "DOS" which does something like

 mkdir /tmp/dos.$$
 DOSTMP=/tmp/dos.$$; export DOSTMP
and then a little trick to get "echo $* > $DOSTMP/startup.bat" really working (actually a small C Program which turns '/' in '\' and terminates lines correctly for messy dos with cr/lf pairs and adds ˆZ at the end of the file), creates startup files, links and so on in this directory, and then starts dosemu. Within "autoexec.bat" drive c: is redirected from hdimage to this tmp-directory, which has links for $HOME and $PWD.

So if I want to see my filenames shortened to 8.3 I can type "DOS dir" and I get my current directory listing. So I have full DOS multi user (I don't have any DOS partition and redirecting to Linux preserves user permissions) and multi tasking. (dosemu sessions are completely independent). I did this once to be able to use a dos driver for my printer. My printcap df is actually a DOS program. So you can even make DOS executables act as lpr filters.


Previous Next Contents