Winecfg

From Wine-Wiki

Jump to: navigation, search

Contents

Introduction

Winecfg sets up your wine for the first time by creating the fake windows drive for Wine, but it doesnt stop there. It allows you to select and test different audio drivers and which version of windows to emulate. Using winecfg a user can also set native dll overrides for a program, forcing wine to use a dll which is not from wine, however while this is occasionally needed because wine's dlls are not always complete or may have a bug, please fill out a bug report using Wine Bugzilla to help the developers can see what needs fixing. Your bug reports will help wine.

Winecfg has been implemented since the June 2005 Release of Wine. Along with this change, Wine moved away from using the now obsolete Wine Config File and now uses the Wine Registry. S. Dossinger [Jul 07 wine devel]: in the long run winecfg should vanish. Wine shouldn't need any configuration on its own, except maybe drive bindings and windows version.

winecfg is a wine tool. According to bug 1141, It is not the ubuntu tool called wineconfig.

Winecfg Settings

DLL overrides

If nothing is added, wine will use its defaults.

H. Boskock [July 05]: [Run] winecfg (obviously ;-) ) and then on the first tab, if you want to make the override for only a particular application, click the "Add application" button, browse to the *.exe in question, and select it.

It will now appear in the list, and if you select (highlight) it, when you go to the next tab, you will see that the titlebar now says "Wine configuration for [your app]".

If you want the settings to be default, then just leave "Default settings" selected when you go to the "Libraries" tab. In the "Libraries" tab, type the name of the dll you want to override in the only field that is available to you.

Choose what you want to do with the dll using the radio buttons, which will now become active, since they have a dll name to work with, then click the "Add Override for" (or something similar, my winecfg is in Dutch, because my desktop is in Dutch -- nice touch, btw, guys!), and the override will appear with the settings you chose. Hit Apply to write the settings, and OK to exit the program, and you're done. The overrides should apply normally when you next run the application in question.

B. Vincent: What may not be obvious is the "Applications" tab in winecfg is tied to the other tabs. We should probably add a sentence in the description of that tab to briefly explain it links to other ones (inc. "Graphics"). In fact, I'm procrastinating, so maybe I'll just try to submit a patch for that.

Changing systemwide overrides:

  1. Select "Default Settings" in the Applications tab.
  2. Then move to the "Libraries" tab and enter the name of the DLL in "New override" box, such as "msi.dll" and click on "Add".
  3. "Edit" the load order as necessary in the box below.

Changing the override for one application

"Add" the new application in the "Applications" tab, select it on that tab, and then move to "Libraries" to create an override. If you update to the latest CVS you'll see a different Libraries tab than what was in wine-20050628 and it follows what I described above. The layout is different in wine-20050628, but it's essentially the same concept. Wine Archive

Dll load order
A. Julliard [July 05]: what has changed, we are now respecting the config settings even for files in the app dir, so you have to explicitly configure it as native if that's what you want (but of course fixing the builtin is preferable). The idea is that the config should work the same way no matter where we load the dll from. Wine Archive

A user reported [August 2005] CVS:I'm no longer able to run programs that require the native comctl32 and commctrl DLLs, since updating to today's CVS

McCormack: You shouldn't need to use the native comctl32 any longer. Please update your dll overrides to "comctl32" = "builtin". Wine's comctl32 implementation is almost complete. If there's bugs with the builtin comctl32 then please help us by reporting them rather than sweeping the problem under the carpet and using the native dll. Wine Archive

CVS Changes

  • [Oct 05] winecfg Remove .dll from DllOverrides entries, such entries are ignored.

Graphics

[Apr 06 wine-users] i used to use application, called RAdmin, with earlier versions of wine (prior 0.9.11). it works pretty well with oprtion Desktop="1024x768". but now in winecfg this option is grayed out

It's no longer possible to set that per-application in the registry. See http://winehq.org/?issue=310#Major%20Changes%20to%20Desktop%20Mode

Sept 05 CVS: Screen depth cannot be selected when double buffering is enabled. Disable depth selection when it's the case.

Theming

Since Aug 2005 you can manage themes from Winecfg.

Further Reading

Winecfg Audio

[Mar 06]:M. McCormack: The best way to fix it is probably to rearrange the code so that the Audio tab shows, then there's a [Detect] button that the user can click to run the autodetect code that might crash. At least then the user can set their Wine Audio settings manually.

Dimi Paun: There is a patch in Bugzilla (posted Sun) that simply catches the exception and avoids the crash that way. I think it's probably good enough for the arts business, it's a dead-end anyway.

M. McCormack: Getting rid of aRts may cripple Wine on older systems, and it won't solve the problem. We can't rely on all 3rd party sound libs to be bug free, especially since there's a lot of dodgy homebrew systems out there built by people who *think* they know what they're doing...[..].Exception handlers can't catch system hangs, which I've seen when some audio drivers are loaded, they can't clean up properly after the buggy library, and the library might leave the stack or heap corrupted.Moving the autodetect feature to a button in the Audio tab seems like a simple design change that will solve the problem once and for all. It allows configuration to be done manually, even if buggy libraries are present, which the current implementation doesn't.

C. Morgan: Arts has been unmaintained for many years now. [...] If there is something we can do to get arts working now that would be great since many people still use it and will continue to do so for some years. I'm certainly looking forward to when it is end-of-lifed with kde 4.0.

T. Spear suggested: Put an autodetect button, have the exception handler catch the crash if arts decides to die, and then still have a popup dialog for when arts is manually selected that tells users it is buggy and not recommended to use? That doesn't fix your specific problem Jesse, I know, but at least it keeps winecfg open when you click on the audio tab.


A user asked why [Oct 05]: When choosing "Automatic" to auto-detect the sound system, both come up with "OSS" though it is definitvely not installed?

V. Beron: ALSA comes with OSS emulation, so technically it is "available" for applications.


Troubleshooting winecfg Audio

Since about wine 0.95 Winecfg has been known to crash when you select the audio tab. This is usually due to a problem with sound on your linux system. You can often work around this by creating the registry setting for a sound driver.

Further Reading

0.96

[anon] if the audio tab crashes, create the folder drivers and add the string Audio with the value "OSS" (see Wine Registry). However it may still crash after asking for permission to delete the registry entry. Some report a workaround by clicking 'cancel' which will enable you to finally select an audio driver. When you click on the audio tab again, you should be now able to allow the prompt - to delete the incorrect registry entry.

Further Reading

Extending Winecfg

R.Gilson asked: If somebody were writing a Wine GUI front-end for uses with the hope that it might possibly make it into the Wine distribution one day, what language(s) and toolkit(s) would be acceptable to the Wine developers for that person to use? Or, of course, do you not forsee that happening?

M. McCormack: It's up to Alexandre whether it goes in or not. If you were to write such a thing, stick to C, Perl (standard kit only) and shell script. Perhaps extend winecfg to have an "Install" panel that downloaded a list of applications known to work with Wine that could also be freely downloaded? [...] I doubt that Alexandre's views have changed.


Adding dependencies is bad, as you can see with the FontForge mess.


[K. Lattimer: The above statement was invalidated on the mailing list, we weren't talking about modifications to the wine source, simply an optional extension.]

Wine Doors

K. Lattimer reported his concept which is called wine-doors was being developed in python but later added: almost all of the back end stuff (except progress bar updates in the queue runner) are completely toolkit independent, if someone wants to write a win32 UI or a Qt UI and integrate it well into the interface, supply patches for testing then I'll happily accept them if they don't break GTK.[...] wine doors is a stand alone application, when I come to packaging the first RPMS i will depend on wine pygtk and pygtk-glade and nothing else wine archive

K.Lattimer [Apr 06], my comments:

Although wine-doors is a tool to assist wine users installing and configuring windows applications in a wine environment it isn't exactly an extension to winecfg. Winecfg on its own has some excellent features which I would never hope to recreate or move into the realm of GTK. It is better to think of wine-doors as a replacement for winetools, the dated nature of winetools and its messy approach has prompted me to begin this project.

One of the major issues with doing this kind of thing in win32 is that in a lot of instances reboots are required, this means the application which is processing the installation will be killed so in my opinion it is better to run outside of the wine envrionment.

Project Status As of 5/5/06 wine-doors has a lot of improvements to the initial interface, far better support throughout for handling its own configuration files and the beginnings of good support for processing xml descriptions of applications and lists of applications. We still need support from the community python programmers and packagers are especially welcome. We are moving toward a static repository system at present where we will be making available some of thet more popular applications wine users have confirmed to be working. Moving forward we should have a community driven dynamic repository available.

Further Reading

K.Lattimer - I have recently purchased the domain wine-doors.org and I have a hosting account for this with unlimited bandwidth, although nothing is currently available there, I will eventually have a modified version of the AppDB which will provide an initial repository for windows applications and associated resources.

M. Hearn: When winecfg was originally proposed I wanted to do it in GTK, and [...] Alexandre said it had to be done using Win32 to keep dependencies small. I guess his reasoning hasn't changed, so, for GUIs you'd have to do it using Win32 and C :( Of course if you aren't bothered about it becoming official you can do it however you like ...

Forum Discussions

In a discussion about dealing with a gphoto2 camera import user interface D. Kegel [Aug 07 wine devel]: Rather than remove all that nearly-working code, how about keeping it, adding the winecfg option, and making it default to off for now?

A. Julliard: That option is much too specific to go in winecfg, it's something most users don't care about. What you could do though is have a "don't show this dialog again" option in the dialog itself.

D. Kegel qeried: Would that setting be persistant? If so, wouldn't we want a way to flip that option back later? Winecfg is the logical place for that. winecfg is our control panel. (It should be exploded into control panel applets, IMHO, but that's another matter.) Most users don't care about 95% of the stuff in the Windows control panel, but those controls have to be there for the 5% that do.

A. Julliard: It would be persistent in the registry, so regedit could be used to reset it.

Troubleshooting

Transferring settings from the Config file

A user noted: There are a very large number of options that were in the config file that are not in winecfg. Some of these options made a big difference as far as performance went for some of the applications I use.

J. Hawkins[July 05]: These options can be altered using regedit. [...July 05]You should be able to convert your dlloverride entries into a .reg file and import that using regedit. AFAIR the code for reading the config file has been removed from wine cvs.

Further Reading

  • Wine Registry - several settings from the obsolete config file are discussed here


Improving winecfg

M. Hearn [July 05]: For everybody: generally, we should resist the temptation to do yet more UI overhauls. Yes, the linked tabs thing is not ideal. It's more an artifact of the Property Sheet control than anything else. However, a few things which are less ideal are:

a) Treeviews: tried, didn't work very well. Treeviews have generally poor usability anyway
b) Tri-state checkboxes: not really clear what the third state means, but for now it may be a quick fix
c) Opening up new windows for each app: hard to implement in the code.

A much better way forward is simply to fix the damn bugs that winecfg settings invariably exist to work around :)

Eg, even "Windows Version" will hopefully be fixed sometime later this year (?) by switching us to 2K/XP mode by default and by nailing the last DCOM problems. Desktop mode will eventually (I hope) become the "winedesktop" program that was done years ago, I'm not sure what AJ plans are here though.

Eventually nobody should have to use winecfg for anything. Let's spend our time fixing the bugs and increasing automation rather than arguing about the best way to represent a list of hacks in the UI :) Wine Archive

[...]The thing about winecfg shrinking is a long term thing. It won't happen tomorrow. For a few things, it may never happen, it'll just become less and less necessary to run it as time goes on. It's an ideal to which we aim rather than a fixed target.

M. McCormack commented: I think the reality is that winecfg is going to hang round for a while. I only see patches adding to its functionality, and nobody is removing config options.[...]


Winecfg too large

A Programmer noticed [July 05]: with a 640x480 desktop, at the moment it's 20 or so pixels to tall and you can't see the ok/cancel buttons.

J. Allen described a current workaround: you can hit enter to close out the window and save changes.

J. Baker: Well, in KDE use the Alt key and the left mouse to click and drag the window from anywhere in the window to move it higher. I think that blackbox supports this style of Window movement as well if you're on a lighter resource computer as your resolution suggests.

J. Garvin assured: [using Alt] is pretty standard. I remember trying it in sawfish, fluxbox, kde, and gnome.

J. Allen: [...]I actually use TWM, and it allows the same thing, at least according to my twmrc.

F. Nawothnig cautioned: This doesn't work in desktop mode (and probably non-managed mode) Wine Archive [While you may not be able to move it, you probably only need to press enter]

Troubleshooting Error Messages

err:winecfg:load_drives GetVolumeInformation() for 'A:\' failed, setting serial to 0

R. Jenson:[Jan 06] it just means there is no disk there, you should be able to ignore these errors. wine archive


>err:thunk:_loadthunk(commctrl.dll,Cctl1632_Thunkdata16,comctl32.dll): 
>Unable to load "commctrl.dll, error 2
                                    ^^^^^^^ "file not found"

Anon[july 05]: IOW, the native commctrl.dll file wasn't where it should have been (e.g. the directory equivalent to c:\windows\system).

D. Clark:[Dec 05] Wine recently changed from using system to system32 as the default directory for DLLs.

err:winecfg:set_config_key Unable to set configuration key Audio in section Drivers, res=1021

K. Myllyverta:[Sept05] This error occurs because HKCU\Software is created with REG_OPTION_VOLATILE, thus making it impossible to create non-volatile keys under HKCU\Software. This breaks about every app that's trying to create keys under "Software" - like winecfg.

This is because SystemParametersInfoW in dlls/user/sysparams.c creates the "HKCU\Software\Wine\Temporary System Parameters" key with REG_OPTION_VOLATILE - and if you do not have HKCU\Software\Wine already available, they are crated as volatile also. ( see get_volatile_regkey() )

You can test this simply by (if you have a fresh install, you can go directly to 4.);

  1. Opening regedit
  2. Delete HKCU\Software (or HKCU\Software\Wine only)
  3. Close regedit
  4. Open regedit
  5. Try to create a new key under HKCU\Software (or HKCU\Software\Wine, if you removed only that)
  6. You'll get error message "Subkey must be volatile"

( This could be fixed in sysparams.c - already got a patch ready for it, but probably it's better to ensure in wineserver that the Software\Wine exists or something, so that this bug does not pop up again later? ) [A patch was discussed and the discussion ended there] Wine Archive

Links

Wine Links

Personal tools