Keep DOSbox window from automatically closing
Keep DOSbox window from automatically closing
I'm trying to install a Windows application in Wine, but the installer quits without actually installing the program. Install Shield runs, then it apparently calls some console application because a DOSbox window pops up for just a second, then the installer quits. I can see that a lot of text is printed in the DOSbox window the split-second it is on the screen but then it closes before I can read it. I think I can determine from the DOSbox window why the program won't install, but I need to be able to read it. Is there a way to keep it from closing when it finishes or a way to capture its output or something?
- olivierfrdierick
- Level 5
- Posts: 258
- Joined: Thu Sep 13, 2012 12:09 pm
Re: Keep DOSbox window from automatically closing
not "DOSbox" but "windows console" or "windows terminal". DOSbox is a specific DOS emulator program unrelated to Wine or Windows apps.
It's controlled by the installer. There's no way to prevent it from closing if it is not intended to be.
Furthermore it's common for console windows to popup and vanish when installing Windows software. They often have no content. They just show as a consequence of spawning a background process.
What you should do is check the terminal output of Wine for errors, and also check the AppDB entry of your Windows application for install guides or issues workarounds, or check within the application documentation itself where the installer puts its log files.
Which application is it?
It's controlled by the installer. There's no way to prevent it from closing if it is not intended to be.
Furthermore it's common for console windows to popup and vanish when installing Windows software. They often have no content. They just show as a consequence of spawning a background process.
What you should do is check the terminal output of Wine for errors, and also check the AppDB entry of your Windows application for install guides or issues workarounds, or check within the application documentation itself where the installer puts its log files.
Which application is it?
Re: Keep DOSbox window from automatically closing
Wine uses DOSBox to run DOS apps, so if this is a very old app, it may well be DOSBox opening. I don't know of a way to prevent the window from closing.olivierfrdierick wrote:DOSbox is a specific DOS emulator program unrelated to Wine or Windows apps.
- olivierfrdierick
- Level 5
- Posts: 258
- Joined: Thu Sep 13, 2012 12:09 pm
Re: Keep DOSbox window from automatically closing
My bad, I didn't know that. I wanted to clarify that all dos-like text consoles are not DOSBox ones, in case the orginal poster got confused and misnamed what he saw.dimesio wrote:Wine uses DOSBox to run DOS apps
Also, with this information, I looked into the code.
DOSBox windows can be prevented from closing by re-compiling Wine with a single-line modification to the code.
In programs/winevdm/winevdm.c, function start_dosbox.
Find this line:
Code: Select all
p += sprintf( p, "exit\n" );
Code: Select all
p += sprintf( p, "pause\n" );
p += sprintf( p, "exit\n" );
You may also comment the exit line, and then not only the DOSBox window will not close, but also allow you to type commands.
Note that none of the above is tested or garanteed to work by me. Try at your own risk. Make backups of your data, etc.
Re: Keep DOSbox window from automatically closing
Thank you olivierfrdierick for your suggestion. What I utlimately did was to hijack the call to dosbox by temporarily replacing /usr/bin/dosbox with a script by the same name. I finally got the application to install successfully, but it does not yet work properly.