Wine should use dosbox's user config instead of creating a new one

Bug #1587956 reported by shankao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Wine
Fix Released
Wishlist
dosbox (Ubuntu)
Invalid
Undecided
Unassigned
wine (Ubuntu)
Fix Released
Undecided
Unassigned
wine1.6 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Wine should use the dosbox config file when launching DOS programs. Otherwise, users can't control how Wine launches them

In my personal case, I like to set up the aspect option by default. It works if I load the program directly with dosbox, but not when done via wine.

There can be an easy way to accomplish this by passing the option -userconf when launching dosbox. From dosbox's README:

  -userconf
        Start DOSBox with the users specific configuration file. Can be used together with multiple -conf parameters, but -userconf will always be loaded before them.

This option was added in dosbox 0.74, released more than 6 years ago.

Patch for it. Note that a dependency on dosbox >= 0.74 will need to be in place too.

diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c
index 290ad25..1662008 100644
--- a/programs/winevdm/winevdm.c
+++ b/programs/winevdm/winevdm.c
@@ -195,7 +195,7 @@ static void start_dosbox( const char *appname, const char *args )
         const char *args[4];
         char *config_file = wine_get_unix_file_name( config );
         args[0] = dosbox;
- args[1] = "-conf";
+ args[1] = "-userconf -conf";
         args[2] = config_file;
         args[3] = NULL;
         ret = _spawnvp( _P_WAIT, args[0], args );

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: wine1.6 1:1.6.2-0ubuntu15
ProcVersionSignature: Ubuntu 4.4.0-23.41-generic 4.4.10
Uname: Linux 4.4.0-23-generic x86_64
ApportVersion: 2.20.1-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jun 1 23:36:47 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-11-25 (1284 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120627)
ProcEnviron:
 LANGUAGE=en_SG:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_SG.UTF-8
 SHELL=/bin/bash
SourcePackage: wine1.6
UpgradeStatus: Upgraded to yakkety on 2015-03-14 (444 days ago)

Revision history for this message
In , shankao (shankao) wrote :

The start_dosbox() function at programs/winevdm/winevdm.c should not start with an empty configuration file for dosbox, but take the currently used by the user. In a linux system, this is at ./dosbox/dosbox.conf

With this, DOS programs loaded via wine will respect the options that the user has set up for dosbox, or allow him a way to indicate them.

In my personal case, I like to set up the aspect option by default. It works if I load the program directly with dosbox, but not when done via wine.

Revision history for this message
In , shankao (shankao) wrote :

There can be an easy way to accomplish this by passing the option -userconf when launching dosbox. From dosbox's README:

  -userconf
        Start DOSBox with the users specific configuration file. Can be used
        together with multiple -conf parameters, but -userconf will always be
        loaded before them.

This option has been added in dosbox 0.74, released more than 6 years ago.

Patch for it:

diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c
index 290ad25..1662008 100644
--- a/programs/winevdm/winevdm.c
+++ b/programs/winevdm/winevdm.c
@@ -195,7 +195,7 @@ static void start_dosbox( const char *appname, const char *args )
         const char *args[4];
         char *config_file = wine_get_unix_file_name( config );
         args[0] = dosbox;
- args[1] = "-conf";
+ args[1] = "-userconf -conf";
         args[2] = config_file;
         args[3] = NULL;
         ret = _spawnvp( _P_WAIT, args[0], args );

Revision history for this message
shankao (shankao) wrote :
summary: - Wine should use dosbox's configuration instead of creating a new one
+ Wine should use dosbox's user config instead of creating a new one
description: updated
description: updated
shankao (shankao)
description: updated
Changed in wine:
importance: Unknown → Wishlist
status: Unknown → New
Revision history for this message
In , Austin English (austinenglish) wrote :

Hi shankao,

Thanks for the patch. You should submit it to <email address hidden>, as patches are not picked up from bugzilla.

Revision history for this message
In , shankao (shankao) wrote :

(In reply to Austin English from comment #2)
> Hi shankao,
>
> Thanks for the patch. You should submit it to <email address hidden>, as
> patches are not picked up from bugzilla.

Ok, I will.
Thanks for the hint :)

Revision history for this message
In , Super-man-i (super-man-i) wrote :

The patch needs real author full name.

Changed in wine:
status: New → Confirmed
Revision history for this message
In , Bruno Gonçalves de Jesus (00cpxxx) wrote :
Revision history for this message
shankao (shankao) wrote :

Fixed in wine master branch, that sadly, seems the fix will take its good time to arrive to Ubuntu.

Changed in wine:
status: Confirmed → Fix Released
Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Closing bugs fixed in 1.9.12.

Revision history for this message
In , Mstefani (mstefani) wrote :

Removing 1.8.x milestone from bugs included in 1.8.4.

Graham Inggs (ginggs)
Changed in wine1.6 (Ubuntu):
status: New → Won't Fix
Changed in wine (Ubuntu):
status: New → Fix Released
Changed in dosbox (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.