General Wine Troubleshooting

From Wine-Wiki

Jump to: navigation, search

Contents

General Wine Troubleshooting

As Wine progresses so fast, some information may become quickly out of date. When submitting information for the wiki, by adding the date we can help our readers.

Update 2008: preloader: Warning: failed to reserve range 00000000-6000000 There have been a number of users reporting problems with wine. Austin posted a comment about this [wine user may 2008]: In a recent kernel update (Ubuntu Hardy, in particular, is affected), recent security fixes have been implemented which break wine. For a workaround, see:

http://wiki.winehq.org/PreloaderPageZeroProblem

For more information, see:


Getting Help

  • First of all there is the Official Wine Documentation
  • Application Database, an official listing of programs with users advice about installing on Wine. Submit your favorite software!
  • the Official Wine FAQ
  • There is Commercial Support for Wine (Ed. we cant really endorse any particular option - this is a wiki - not advertising.)
  • Debugging Wine yourself
  • There are two main mailing lists Wine-users, Wine-Devel and the Developers often can be found on IRC. A change was announced by J. White [Apr 06]: We've now reconnected the newgroup comp.emulators.ms-windows.wine to the wine-users mailing list, so they are, in theory, one 'virtual' community. We also revamped the web site a bit to try to make these things pop out a bit more.
    • http://www.winehq.org/site/getting_help
    • wine archive
    • http://www.winehq.org/site/forums
    • If you want only to post a message and do not wish to read other messages going back and forth about wine, subscribe to the list but as F. Cenedese suggested: disable the mail delivery. wine archive [J. Ernst wine devel Oct 07] Or use a newsgroup reader (any decent mail client will do and subscribe to gmane after setting mailman to not send them any e-mail. [...] Maybe we could explain a little bit more the newsreader way of reading the list in http://www.winehq.org/site/forums. And if you can't be bothered using anything else than a Web browser you can still use http://blog.gmane.org/gmane.comp.emulators.wine.user or any other web-based newsgroup client.
    • D. Kegal [Oct 07 wine devel]: As an experiment, I've set up a google groups front end for wine-users. It's at http://groups.google.com/group/wine-users/ For this to become real, we'd have to switch the mailman user list over.
    • Since the newsgroup was joined to a forum for wine-users, in June 08 P. Johnson wrote: The first proposed suggestion is that a more consistent method for handling the forum/mailing list bridge situation is to consolidate both on Google Groups, possibly a newsgroup instead of the mailing list. D. Kegel commented: For those who didn't look carefully at the message headers, Paul send this message to a Google Group already set up for testing; feel free to join it for a taste test. It's at http://groups.google.com/group/wine-users
    • Anon: The open source newsreader Pan is quite effective... add the news server news.gmane.org, search for wine and RH Click on wine.user, and select subscribe]
  • Dont forget that you can also search this Wiki - there are many handy tips to get you started.
  • You can have an RSS feed for comp.emulators.ms-windows.wine via Google Groups [...] the feed included the wine-users mailing list messages. wine archive

D. Kegel [Oct 05, during a discussion on getting bugs fixed in wine, noted a caution with getting bugs fixed]: Free Software works like this:

The programmers scratch their own itches.

That's it! Users who have an itch not shared by any programmer [who] *really* want a bug fixed, and no programmer is willing to fix it for free, and you can't fix it yourself, [..] have two choices:

  1. wait for some programmer to decide he wants to fix it for his own reasons
  2. pay a programmer to do it for you.

[Ed. A third is posting to the list and offering a bounty - perhaps others will join in and add to your bounty. Some have posted a bounty and linked to http://www.rentacoder.com/RentACoder/default.asp]


Anon: [Oct 05] I have found that, on many [other] open source projects,it is possible to get help from a developer. It takes an enormous amount of effort, a great deal of politeness, and some luck. But most open source developers are actually quite giving. The keys, imho, are:

  1. Do your homework
    • Read the FAQs. Read the ML archives.
    • Actually try the various alternatives suggested.
    • Research the technical issues at hand.
    • Learn enough so you know what you're talking about.
    Do that first.
  2. Make it easy
    • Developers find a nice bug report, with easy to follow instructions to reproduce, and nice easy access to the software to be quite nice.
  3. Ask nicely
    • If you want someone to work for you, for free, you have to recognize that they are giving you a gift - a gift of their time.
    • If you can't hold that in mind when you ask, then you're not asking right.

D. Paun: Wine [has been] very incomplete in the sense that you don't have to look far to find lots of bugs[...], there [has been] an infinite stream of them just around the corner. Not an excuse -- I'm just trying to explain why we don't [always jump] on the bugs when they are filled in Bugzilla. Now that we have 0.9 on the way (hopefully followed by 1.0), this attitude seems to be changing.

J. White: Wine [for a long time, has been] officially labeled 'Alpha' software [...] in recognition by the developers of Wine that fundamental pieces of the puzzle are not yet done correctly, and that future breakage [was] likely. The good news is the whole point of the [October 2005 Wine...] 0.9 release is to mark the turning point where we shift out of Alpha and towards 'Beta'. In other words, the [...] programmers now think regressions will happen less frequently, and will purportedly take them more seriously in the future. Wine archive

Filing a bug

R. Shearman [Jul 06]: There are a number of things you can do to make your bugs more likely to be fixed by volunteer developers:

  1. File a bug!
  2. Describe the bug accurately. If it is not completely obvious, describe what the program should be doing and what actually happens.
  3. Only describe one bug per bugzilla entry, unless you think they are related. Doing otherwise will probably cause your second problem to be ignored.
  4. Provide debug messages printed when reproducing the bug.
  5. Use a standard Wine configuration. This includes not mixing native and builtin DCOM dlls and not using WineTools. In fact, try to use as many builtin DLLs as possible. [Ed: When reporting a bug, try and use the dlls that come with Wine, only using a Microsoft Dll if you must. To help your bug report, you could erase your .wine folder and reinstall the software or set up a temporary wine folder (see WINEPREFIX) Do NOT use IE4Linux for bug reports - it changes Wine so much that developers cant help you and that really, really irritates them.]
  6. Try to reproduce the bug in a freely downloadable version of the application (for example, a demo or trial version) and provide a link in the bug. (Note that having to fill in a form with details to download a program puts me off trying to fix a bug, but others' opinions may be different.)
  7. If you suspect the bug is in a certain component due an error message in a dialog box or on the console and you know which debug channel it corresponds to then attach a log of that debug channel to the bug.
  8. Be responsive to developers asking for you to retest, try different dlls and create debug logs. You can be pro-active, but be careful to not be annoying. Deriding Wine or Wine developers is likely to be seen as annoying and your bug will be ignored. Testing the bug on each release of wine (or on a less regular basis) and reporting its status is welcomed and will show that you care about the bug being fixed and that you will be responsive if a developer investigates the bug further. wine archive

K. Blin Oct 07 wine devel: Please don't send emails to wine-bugs. Open a bugreport on http://bugs.winehq.org/ instead.

Posting to the Mailing Lists

Anon: [Jan 06] It is probably a good idea to post in Bugzilla first as it is very active these days. A number of developers appear to watch it and make comments or suggestions to help those reporting bugs to whip them into shape and then squash them.

If it is merely reporting a bug, perhaps posting to the wine-devel list is not the best. M. McCormack [Oct 06]: Please report your bug to bugs.winehq.org, not wine-devel. You'll have better luck getting help if your application is available for download. wine archive

A poster was suggested to [Nov 06]: please file a bug in bugzilla regarding this. wine-devel is not the place to file bug reports, much more can get done in bugzilla.

J. Hawkins: There's nothing wrong with bringing this up on wine-devel. [the programmer] has taken the time to track down the possible bug culprit, and he's sharing it with the developers. If, on the other hand, he had just said, "app xyz doesn't work, don't know why" the the response would be correct. Not every developer reads wine-bugs, or checks the bugzilla.

When you file a bug you may get more assistance if you detail these important things:

    • Your version of linux/BSD
    • The name of the software - and IMPORTANT: A link to where a developer can get a copy
    • The version of Wine that worked and the version that 'broke'
    • Upload a link of the text output that was on the console or terminal (the thing like dos prompt). Cut and paste will get you started, or wine <your application.exe> & > /tmp/log and attach the log file in the tmp dir.
    • Upload a link to picture or screenshot -it can make a world of difference (you can use bugzilla for this)

Further Reading

Commercial Assistance with Wine

There is considerable commercial support for Wine, but many of these companies are referred by word of mouth. You can list your company here, but as this is a wiki, we can only provide links to companies. There may be other sites that can provide endorcements.

  • Many others

How to discern which company to approach? Possibly by looking at the cvs entries and the wine mailing lists. Searching for their names and the areas of Wine for which they contribute will likely give you a good starting point. Or you could approach one of the many developers as found in the Wine Official Developer Wiki. If they are too busy, they might be able to recommend someone else.

Another options which has had some success in the past is to try to offer a Bounty via the Mailing list. wine archive

Offering a Bug fix Bounty

M. Slugen [Nov 06] certainly got attention when he posted to the wine-devel list: Hi, I am not so good at programming in C, but I would like to be perfectly working in Direct3D 9.0c in the Wine. I dont know how much work is on so if someone could tell me how far is the complementation of the Direct3D 9.0c support in the Wine?

Here is the offer for everyone:

The aim is to prepare all apps

  • 3DMark 2003
  • 3DMark 2005
  • 3DMark 2006
  • CoD 2
  • NFS MW
  • NFS Carbon
  • ES IV Oblivion

working under the Windows on Nvidia GF 6XXX series, with at least 50% of speed in WinXP. There is not needed sound after merging those patches in cvs main head. I offer __1 000 Euro or 1 200 dollars for this work.__

Please, contact me or send this to another person you would think could do it.

Several others offered further funds for this.

He posted a few days later [Nov 06]: Wow, I am impressed those patches fixed almost all tests in 3DMark 2003, test4 (mother nature), vertex shader and Ragtroll without any regression in other apps. Perfect work!

A. Mohr: Would be nice to have many more people (e.g. those who don't feel like programming things but still want to contribute somehow) offering such dedication towards getting their personal goals in various OSS projects reached. Thanks, and let's hope someone knowledgeable will follow up on this offer.

V. Virvilus: There are some companies that are specialized into these kind of collective payments. I haven't used any so I can't comment about the quality of their services.

Some links...

I am sure there are more...

Further Reading

Jun 2008 Get a Coder listed an auction to package windows program into a debian package using wine 1.0. D. Kegel observed on winedevel: the fee is about 10x too small, but perhaps somebody would be interested in the challenge anyway.

Help - My Program 'broke' when I upgraded Wine

Please keep in mind that Wine is not release version 1.0 yet, and is still a development release. However, it often works well with many Windows programs and the contributers are mostly a friendly bunch. Firstly have a think to make sure that you didnt upgrade something else which broke your program, but if that is not the case dont worry. If you caught the breakage early often the fix is quick and easy. Here are four options to get you going again:

  • Revert back to the previous version (not preferred - Wine doesnt get fixed, and it will have to be fixed sometime)
    • You may wish to post to the wine.user mailing list or if you are a programmer looking to fix it, you might post to the developer list to check if anyone else has this problem. Previously mailing list posts recommended this but it appears that with the bugziller workers and those watching wine.bugs bugzilla is quite good these days.
    • Developer M. Hearn: It is helpful if you can which exact version of Wine broke your application.
  • You could help the developers fix this even faster by rolling up your sleeves and isolate the patch that caused the problem (It is not very hard..)
    • M. Hearn: [It is] Better still [to] try to isolate the problem down to a specific patch. This can be done with minimal programming knowledge. As it is, a report that a single application does not work isn't much use, however it is very useful to be able to say "this patch caused a regression in an application".
  • Write up a bug report in bugzilla Wine Bugzilla
  • Employ a Known Wine contributer (preferred) or hire a C programmer with Linux and Windows experience to fix the regression


Why Does Wine Occasionally Break?

S. Richie: [...Currently] Every release so far has pretty much been a development snapshot - you've been using alpha software [Recommended for Developers only]. This September, however, we will have a stable version, and it's been a long time coming. Roughly, the plan is to have every app that is in the Application's Database as "working" for the first stable release, never regress when we make a subsequent stable release (and, hopefully, improve). How we do that will likely vary, but from right now I can tell you that App maintainers will be important.

Wine has a rather comprehensive test suite - it's just incomplete. Writing conformance tests for various parts of the API to make sure they don't cause a regression whenever someone releases a patch is a huge open task right now. Fortunately, it's an open task that just about anyone with knowledge of the API can do - there's no need to understand much about Wine internals, since all the test programs do is test input and output. We've even had students submit conformance tests for credit as part of their computer science classes - and had them uploaded to the project.

A User noted that for some programs WineTools recommended to use an Older version and felt Wine should be moving 'forward not backward'

Ed [Aug 07]. Winetools and it's maintainers did wine a lot of good in helping users get going with old versions of wine. It was an excellent tool. But wine appears to have grown up a lot since reaching Beta and the 0.9 versions. Many problems that Winetools worked around have been fixed fixed, and wine now needs good bug reports to round out the many recent fixes. While Winetools is still available, it is not compatible with recent versions of Wine, and at this stage in the development of wine, many of the workarounds hinder the developers finding out about important bug reports. The Current Maintainer of Winetools cautioned: "The purpose of WineTools is to provide the user with easy installable more or less important Windows software. Not to be state of the art". Be aware that for reporting bugs you will need to re install wine without WineTools. A big thanks to the developers for Winetools - it served us well and helped a lot of people.

The Essential Role of Software Maintainers and Wine Users

H. Valtonen: It wouldn't hurt if Wine users started reporting regressions to Bugzilla/or the mailinglists more actively. Such a mail/bugzilla entry should also _always_ come with a note attached saying which patch broke it. There are instructions for this on the web page. (http://www.winehq.org/site/docs/wine-devel/x1318)

It is exceedingly difficult to know beforehand if fixing a particular problem in Wine breaks another application. Lately we have also been bitten by the x11drv rewrite, and you may end up finding that the patch that broke your app might be one of those. But the only way for us to know it broke something is to speak up. (With the information pointing out the precise patch that broke it)

H. Bostock: people need to sign up on the AppDB to maintain applications, and people need to post results with applications to the AppDB, [and then to the Wine Devel list] so that bugs and regressions can get noticed and fixed in an organized manner.

S. Richie:[...] Not every developer can test every application at every release - this is why we've created the Application's Database, which allows just about anyone to sign up as a maintainer for an app. Maintaining an app is rather simple - just run it and see if it gets any worse.

Maintainers and the Appdb

Approval of new test results

dimesio [Aug 08 wine user] Log into the AppDB. Scroll down until you see the "Maintainer Admin" section in the left frame. (This section only appears when you are logged in.) Click on "View Test Results Queue" to process test results awaiting your approval.


Further Reading

Providing Terminal Output

Often when a user posts that something does not work, he is asked for terminal output. Terminal output is like a dos prompt. Run the program in terminal and attach the output it gives in your reply.

Help I broke Wine

Sometimes you get a real mess and find out that your latest clever trick of installing dlls or just playing around, well you just broke your wine and now nothing works. How do you fix it? Uninstalling and reinstalling wine surprisingly does not help - because that is not where the problem lies:

Vitamin [setp 08 wineuser] Uninstalling Wine won't do you any good. Remove / rename ~/.wine directory and reinstall your program(s).


anon: note that this will erase all your installed software under wine. But you had a backup right? remember? just before you tried that thing you knew was a little risky...<g>. Check under Advanced Wine Installation for how to use multiple wine folders for trying something risky.

Common Errors

Computer Frozen

This is not likely the fault of wine read on to learn why:

S. Richie [May 2007]: a few reports from users complaining about Wine deadlocking their system - keyboard unresponsive, with no solution but to restart the entire computer.[..] Wine is a user-level process, it shouldn't be able to cause a hardlock under any circumstances, right?

S. Dossinger:Correct. The operating system must prevent user level apps from locking the system. So hard crashes are by definition NOT wine's bug. I think its not the kernel that crashes, rather the X server that fails to process new input. Often sshing in works, then you can kill the Wine process keeping the X server hostage or the X server itself and your system works again. That doesn't help the average user of course.

M. Meissner: It is likely ATI or NVIDIA. But yes, a broken graphics driver can cause user apps to deadlock the machine.[Wine devel May 2007]

D. Timoshkov [bug 9636 Sept 07]: Wine or any other user level applications should not be able to crash X server. This is an X server bug. D. Kegel [then recommended to]: check to see if you have an out of date proprietary graphics driver (nvidia or ati). They're the likely culprit. Also try 'glxgears' as a test app, it is as likely as wine to be able to crash a misconfigured X.

unload the debugger
If wine is set to "winxp" a pop up tells me that I've got to unload the debugger.

M. Hearn: [That game or software has] got anti-reverse engineering code in it, usually that means copy protection. Wine Archive Link

Further Reading


What is Fixme.. do i need to fix something?

L. Rayhen [Oct 2007 wine user]: In [the Wine] Project we only implement functions that are used in real world applications. [...] if you see err/fixme [messages] that means [Wines'] implementation isn't perfect or even is almost empty (stub). But if you don't see misbehavior in your application - there is no bugs to report. Of course if your application misbehaves this IS a bug to report. And this is what you should to report: what misbehavior you found, what was expected, and how everyone can reproduce your problem with real world application. [there are] a lot of Windows applications which misbehaves because of their own bugs so "misbehavior" in WINE Project is defined as "not like in Windows". So if your applications works correctly on Windows and incorrectly on WINE then this is exactly what we expect to be reported as a bug.


M. Knecht:[2006] ...If you want to write code and figure out what Windows does then maybe you can [fix them]. If not then just ignore them until you have a program that fails bitterly and at that time maybe you report this stuff to the developers.

Further Reading


fixme:seh:[xxxxxxxxxxxxxxxxx] call to unimplemented function [xxxxx].dll._[xxxxx]

fixme:seh:EXC_RtlRaiseException call to unimplemented function msvcrtd.dll._CrtCheckMemory
First chance exception: unimplemented function msvcrtd.dll._CrtCheckMemory called in 32-bit code

A User asked: Does it makes sence to anybody?

J. Hawkins: The program is call the unimplemented function _CrtCheckMemory that should be implemented in msvcrtd.dll. You could use a native msvcrtd.dll or you can wait till the function is implemented. [or you could hire a programmer/coerce a friend to implement this]

Further Reading

Administrator Privileges

If your application asks for Administrator rights.. H. Bostick: Sorry to say that sudo won't help you-- the program is looking for *Windows* Administrator privileges, not Linux root privileges. The cause of this problem is most likely a combination of 2 factors:

  1. The fact that Wine now defaults to 'emulating' Windows 2K by default,rather than Windows 98; and
  2. The fact that many Windows programs of a certain type, when they were updated to work with Win2K from previous compatibility with Win98 (which does not have an Administrator), began to require Administrator privileges under 2K and higher to install. This usually happens with utilities like defrag utilities or other scanners/blockers/repair utils that can be run as a service. This at least makes sense, as in order to run as a service, the application has to hook into the M(icrosoft)M(anagement)C(onsole), which is an Administrator-only system application. But I have, oddly enough, seen programs which would seem to have no use for administrative privileges require them on installation; recent versions of PaintShopPro are one example of this. The 'solution' is to tell the application that it's being installed under Win98 (assuming that the program is willing to install under Win98), rather than 2K. Since as far as I know, there is no implementation of Windows' fairly sorry implementation of user privilege separation in Wine (meaning that, afaik, you cannot become the Windows Administrator under Wine), the only other option is to go back to the 'good old days' where it didn't exist (Win98).

Try running winecfg (I assume your version of Wine is later than 20050628, and therefore has the winecfg utility replacing the config file), and change your "Windows version" settings on the first tab (Applications) from "Automatically detect required version" to "Win98". If you don't want to change the setting globally, you could also add a per-application default for the setup by (on the same tab), choosing "Add Application", browsing to the setup for the app and selecting the installation executable. [...] (this will likely affect all setup executables with the same name, since the name is likely not unique [...]

My software does not work

A user wrote jun 08 wineuser I have installed a simple Windows program (no .NET of anything like that) and the icon is in the menu and on the Desktop. However, when I try to launch it the "Eggtimer" rotates for a short while but then nothing else happens. How do I find out what has gone wrong?

Bamn: This means the installer worked fine, but the application itself is having problems running under Wine. To know what error messages it sends, you must cd to the directory which you installed it, probably "~/.wine/drive_c/Program Files/some folder" and then run the program via the command line as "wine filename.exe" without the quotes.

The error messages will be seen in the console.


Ed: A terminal, is a bit like a dos prompt. check in your menus and you will find an icon called terminal.

Sometimes programs just dont like running unless started from in their installation directory. H. Bostick: The first thing that seems a good idea is to try running the program from the installation directory rather than from some random current working directory. The program you are trying to run would be far from the first that vastly prefers being run like this

cd /program_installation_directory wine program.exe

than like this

wine /program_installation_directory/program.exe

[...]If you're trying to run programs from a shortcut or panel entry, it's quite easy to write a short bash script to ensure this:

#!/bin/bash
cd program_installation_directory
wine program.exe

name it program_start.sh, make it executable, and then link the shortcut to this script rather than the absolute path. I've got several such scripts myself for this very reason.


D. Clark: The path that Wine uses is embedded in one of the ~/.wine/*.reg files. I think it can appear in either system.reg or user.reg, but for me at least, it is in user.reg. Look in that file for an [Environment] key, and under that key should be the "PATH" environment variable. It should be obvious how to modify it.Wine Archives

U. Bonnes noted a possible problem: On exit wineserver will [...] wipe out all changes. Be sure wineserver [isn't running] when you manually edit ~/.wine/*reg files, [you can make sure by typing "wineserver -k"] or use regedit.


Another reason software may not work is that Wine has an incomplete or even a bug in it's pretend Windows Dlls. You can get around this by swapping in a Windows dll and see if this works. When you find a native dll fixes a bug, make a bug report and note which dll fixes the problem. For how to do this and other information see

Component or one of its dependencies not correctly registered: a file is missing or invalid

wine user Aug 08 reported: "Component pklink.ocx or one of its dependencies not correctly registered: a file is missing or invalid". Checking my .wine/drive_c/windows/system32 shows the path with pklink.ocx present.

vitamin: Run Code:

regsvr32 pklink.ocx 


DotNet2 .NET2

Wine is a moving target with .Net, so this can get out of date quick.. There are a number of known bugs that are being worked on.

[Aug 08 bug 14766] A programmer wrote [...] the .NET Framework 2.0 can be installed using Winetricks

However, [you can run into problems that] are font/gdiplus related, caused by installation of "tahoma" font from 'allfonts' winetricks step. Native gdiplus which the CLR loads in first place doesn't like that font (unsupported style). You could remove "tahoma" from WINEPREFIX windows fonts directory. Or alternatively Clean WINEPREFIX and only use winetricks dotnet20.

DotNet3 .NET3

D. Kegel Dec 08 bug10547: Wine will not support .net 3.5 for a long time, at least a year, maybe much more. http://bugs.winehq.org/show_bug.cgi?id=10547

R6034 An Application has made an attempt to load the C runtime library incorrectly

wine user Aug 08: I have MSVCR80.dll installed in System32.

Vitamin: Remove it from there. This dll will refuse to load from system32. And that is the error you get: Code: "R6034 An Application has made an attempt to load the C runtime library incorrectly"

[ed this c++ run time error can likely be fixed using winetricks ]

Remembering Last Settings

Sept 08 wine user post: I have a little Windows app starts but ignores the existing config files. Instead it behaves like was started at the very first time.

Vitamin: This is one of the broken apps that expects full path in the argv[0]. This is not always the case. You need to give it what it wants. In other words, you have to specify _full windows_ path when you start it. Ex:

wine 'c:\some_dir\program.exe'

or

wine start /unix /home/user/Desktop/some_other_dir/program.exe

Windows Version

must be a xp or win2000

run Winecfg in a terminal window, (For very old versions of Wine, change your Wine Config File ~/.wine/config file (or /etc/wine/config) and set the version to winxp.)

Speed Issues

Why does it take 2-5 minutes to start up [my favourite program]?

M. Hearn: [Sept 05] Something is definitely wrong, check that your loopback address is configured correctly in /etc/hosts and the output of ifconfig. [You could also post to the list and check the Application Database for tips].

Screen or Display errors

A wine user reported [Sept 07 wine devel]: since a couple of weeks all wine GUI applications are missing the window manager decorations on my Debian Etch box with the Compiz window manager. I didn't get to doing a bisect until today. The problematic patch seems to be:[...]Author: Alexandre Julliard Mon Aug 20 22:06:33 2007 +0200 winex11: Switch windows to managed mode in SetWindowPos instead of at creation time.

M. Lankhurst: Compiz is a broken window manager, bug is in compiz not wine. If you would read the FAQ you would have known that.


Very Old Windows Applications

Vitamin Mar 08 wine usr: Xorg can not switch colors on-the-fly. At a minimum you'll have to start a separate X session:

Code: xinit /usr/bin/wine WP.EXE -- :1 -depth 8

However that might not work with your video drivers/system setup. If that won't work, you can try and force Wine to lie to the app about BPP. However that will break all the programs run on Wine and you will have to manually edit Wine's user.reg file. Here is the registry key: Code:

[HKCU\Software\Wine\X11 Driver]
ScreenDepth=8


Please use the registry key HKEY_CURRENT_CONFIG\Software\Fonts\LogPixels to set the screen resolution and remove the "Resolution" entry in the config file

S. Munz: If your app is behaving as expected you can ignore [this message]. The registry key may help if the font size differs from the original layout of your app in windows. take a look at: http://www.winehq.com/site/docs/wine-user/registry


fixme:storage:StgCreateDocfile Transacted mode not implemented.
...err:x11drv:X11DRV_CreateWindow invalid window width 1083171597

S. Munz: If your app is behaving as expected you can ignore the messages.

Application tried to create a window, but no driver could be loaded. The X11 driver is missing.

Aug 08 wine user vitamin: You [are] either running it as a root or you you didn't install all of Wine.


"Make sure that your X server is running and that $DISPLAY is set correctly"

J. von Thadden: DISPLAY is a variable that tells your system where to show the program you are starting. As X11 is network capable on it's own, you can tell every program where to put it's output. So if you set DISPLAY in a terminal and start a program from there it will be displayed according to the setting of the variable.

To show you the value use

	echo $DISPLAY

To set it use e.g.

	export DISPLAY="computer:0.0"

where "computer" should be replaced with your IP or can be omitted if you are sitting in front of this computer. :0.0 tells it which display to use as there can be many of them on one machine.

Because of security reasons to set a program use the display, it could be that you have to add an

	xhost +localhost


Note that all of this should not be needed if you log into X11 and start a console from there (like konsole with KDE) as you environment should be set to the right DISPLAY. So if you get your error message it is likely that you try to run a program e.g. as root while being logged in as different user (who because of this is the owner of the terminal).


A. Browaeys: On desktops DISPLAY value is ":0" (export DISPLAY=0 before starting the application if you start if from the command line). In fact it is "localhost:0" , The first part is the network name of the machine which hosts the X server and the second is the X server id (one machine can run multiple X server though on a desktop there is little use to do so).

The X startup script initializes this at startup so it is a little weird to see the program failing to find it (this is a thing pretty few people mess with). Again if running form the command line you can check it is properly set by:

$ echo $DISPLAY

Wine Archive Link

Fails to find...cant access

Warning: Memory above 0x80000000 doesn't seem to be accessible. Wine requires a 3G/1G user/kernel memory split to work properly.

Gert wineuser aug 08: It is caused by the VMSPLIT kernel option having an incorrect value. The configuration options should be as below.

$ zcat /proc/config.gz |grep VMSPLIT CONFIG_VMSPLIT_3G=y

  1. CONFIG_VMSPLIT_3G_OPT is not set
  2. CONFIG_VMSPLIT_2G is not set
  3. CONFIG_VMSPLIT_2G_OPT is not set
  4. CONFIG_VMSPLIT_1G is not set

If you have compiled your kernel yourself, recompile it with the options as above. If your kernel came from your distro, their forums are probably the best place to enquire about a kernel with the right settings. From menuconfig (for x86), the options can be found from "General setup" > "Processor type and features" > "Memory split". The option that you want for Wine is "3G/1G user/kernel split"

J. Drescher in reply to the question where i can find the file to edit those options.and where's the menu config :

make menuconfig

is used when you build your own kernel. I think you should ask your distribution for a kernel with this "3G/1G user/kernel split".

Program Fails to find cmd.exe
Wine's equivalent is wcmd.exe. A decent application will inspect the COMSPEC variable to find the right interpreter (cmd.exe, command.exe or whatever third party command interpreter). Wine sets this variable, so such programs will run correctly. Wine Archives

I know of one example, Microsoft's 16 bits Visual C++ IDE, that hard codes cmd.exe. Creating a link wcmd.exe.so with cmd.exe.so makes that work. There are many other ways this program might work that do not use cmd.exe, of course.


[Jul 08] Warning: could not find DOS drive for current working directory '[My username directory]', starting in the Windows directory. wine: cannot find '[File location]'

Vitamin: you removed "Z:" drive. Put it back.

ln -s / ~/.wine/dosdevices/z:
Warning: the specified Windows directory L"c:\\windows" is not accessible.

J. Hawkins [jul 08]: please rm -rf .wine and try again.

keyboard layout not found

Your keyboard layout was not found!
Using closest match instead ([Insert another language here] keyboard layout without dead keys) for scancode mapping.

R. Shearman: This message isn't fatal, so it [will not cause] the program to stop working. [so you can relax... now muster up courage and post to the list to see if you can learn how fix it for the next person] Wine Archive

Unhandled exception (thread ...), starting debugger...

Occasionally you may see a message like this:

  wine: Unhandled exception (thread 000d), starting debugger...
  err:seh:EXC_DefaultHandling Unhandled exception code c0000005 flags 0 addr 0x446865ff

M. Hearn: It means the program crashed, at minimum we need either a backtrace or a trace (+tid,+relay,+seh).

To get a backtrace when it crashes the Wine-dbg> prompt should appear. Use the "bt all" command. [Type:]

bt all

To get a trace, run [your software] like so:

WINEDEBUG=+tid,+relay,+seh wine [your software.exe] 2>/tmp/log

[This may take a while]. Then in a good text editor (be warned, it will be quite large!) load [the file in the tmp folder] up and search for the first "trace:seh" line, then send [to the wine-devel mailing list] the part of the log starting 200 lines above that until 200 lines below.

Getting a backtrace has changed [May 2006] as shown in these comments:

$ winedbg FileMaker\ Pro.exe
WineDbg starting on pid 0xa
0x7fcbd019: subl        $12,%esp
Wine-dbg>bt

D. Skorka: Thats too early. If you start a process with winedbg, it will immediatly drop to the prompt. You have to type 'cont' and hit enter. Then, when the program crashes and you get back to the prompt, you have to type 'bt' wine archive

Further reading

Video Drivers

After some reports about wine crashing one posted [Jul 07 wine devel]: If you are using the Nvidia drivers posted on the Nvidia web site then you MUST reinstall these drivers whenever you update ANY of the X-server software. If you replace the kernel you will be forced to reinstall the drivers but just replacing the X-server or the open GL code does not do this. Not reinstalling drivers when video code is replaced usually causes problems. It seems like every time RH updates any video code but does not upgrade the kernel at the same time there are complaints that Wine causes machines to crash. This is the reason.

Viewing Help Files

wine user Aug 08 dimesio replying to why is the view of chm files not correctly ? [..] Can I only display chm files with an extern programm on linux ?

This topic has come up a few times on the forum, so you might want to do a forum search for "chm" to find various workarounds. If you use KDE, I highly recommend kchmviewer. All I did was associate it with chm files in Konqueror, and it now launches automatically whenever I try to access a chm file in Wine.

Noexec fault workarounds (for 64-bit users)

Anon [Sept 07]: This seems to be a very common problem on x86_64 (Core, Core 2, Athlon 64) distributions: while Wine worked fine on 32-bit installs, now lots and lots of programs do not run, and instead, they crash with this not-so-useful error message:

fixme:seh:check_no_exec No-exec fault triggered at 0xDEADBEEF, enabling workaround

There are two ways to work around this problem:

  • Disable the NX bit (Intel: XD bit) on the kernel: Almost all recent X86 CPUs (starting with some late Pentium 4s) and all 64-bit processors come with this protection, the No-eXecute bit, which was intended to stop worms and other menaces from running malicious code from memory. However, this also may break some apps, and Wine is one of these. The workaround is simple: append the following to your kernel commandline (edit your bootloader config, menu.lst, grub.conf or lilo.cfg), and reboot
noexec=off noexec32=off
  • Mount your partition with binary executable permissions: As another security measure, *nix-based OSs can disable the execution of binary-images in a entire partition, by simply mounting with the "noexec" flag. For some reason, this causes Wine to fail when trying to run a program stored in a partition mounted in such state. The fix for this one is very easy, remount your partition with "-o exec", and try again. For make this a permanent change, edit your /etc/fstab, adding "exec" on the mount options. Here is an example for a FAT32 partition:
/dev/sdYourDiskPartition   /media/MountPoint  vfat  rw,users,shortname=winnt,exec,umask=000 0 0

Depending on your system, you may need to apply one or both of the workarounds listed above.

Software Protection

CD Protection sometimes means you cannot even install off the cd. There may be another way..

Vitamin May 08: Install it on windows and copy it to Linux. Most games should work that way.

A user asked: OK, now I'm confused. I thought doing that was frowned on, due to the problems of missing registry keys and dll's etc being put in weird

places and not getting copied over properly  :-S

Vitamin: Correct that's the problem for most regular programs. Games in most part are exceptions from this rule. They don't have too many registry settings and put all their dlls into game's directory. However this of course is not guaranteed to work - just something to try.

SecuROM

Wine has made a lot of progress with this. You might want to install in under a seperate wine prefix, so that it uses a different wine registry and does not interfere with your other software. See WINEPREFIX for more info

Nov 08 a user noted: in windows, SecuROM has higher rights than me. Will SecuROM take administrative control in Ubuntu too?

A. English: Not unless you run as root.

Starforce

A user trying to run a game reported; What causes this? I'm running hardy heron[...]

Module	Address	Debug info Name (31 modules) PE	  450000-  461000 Deferred        sfdrv01.sys

Vitamin: That's the StarForce driver. Remove it (and all other *sys files) from ~/.wine/drive_c/windows/system32/drivers EXCEPT mountmgr.sys.

The user thought he had tried again with a clean install but another noted: Are you _really_ sure it is a clean install? (maybe you just reused some other user's .wine folder?)

It's because this:

err:winedevice:ServiceMain driver L"sfhlp02" failed to load
err:winedevice:ServiceMain driver L"sfsync02" failed to load

[has still persisted] when you say you have a clean wine install [...] Also, if it persists, try to unregister the service for those drivers with regsrv32 and if that doesn't work simply go to the registry and erase those two entries

[ed, a clean install doesnt mean re installing Wine. It means making a backup of your hidden .wine folder in your home directory and re installing the software you are attempting to use. You can then revert back to your previous installed Wine by restoring your backup. Wine stores a fake windows drive under .wine and this is what appears to need to be changed - in this case]

Wine Sound Troubleshooting

Debugging Wine

Avoiding Hum

A user reported: there's a lot of humming noise on the input, a lot more than there is in Windows.[...] I'm wondering if there's anybody else with similar experience?

Vitamin [sept 08 wineusr] Make sure all inputs you don't need are muted (not just volume down). The biggest offender is line-in. But lots of cards have number of AUX inputs, CD-in, and so on.


New Sound Drivers

A user suggested a new sound driver: I would like to suggest that eventually Wine would support PulseAudio as a sound output natively. I am already aware of Wine supporting ESD, which PulseAudio can use, but supporting PulseAudio natively I think would be much better.

M. Stefanuic [wine devel 07 oct] There are already a couple too many sound drivers in Wine and none of which are great. Alexandre won't accept yet another sound driver in Wine. He would like to have one sound driver working perfect (probably winealsa).

PulseAudio

Jul 08 wine devel a user wrote: I switched my desktop to PA yesterday, [...] All apps that I need use PA natively, only Wine doesn't have a PA sound driver.

S. Dossinger: The point was and is that we don't want yet another half working sound backend in Wine. We will have to maintain the Alsa one because there are things PA won't be able to give us by design, like HW mixing and lowest-latency direct access which is needed for gaming. Of course, as you said, if someone has patches and intends to maintain it we're happy to accept it. But I think none of the current Wine sound developers(aka Maarten) has any intentions to spend time on a PA backend

Sound Configuration

A user posted [May 29 2008 wine user]: OS ver: Ubuntu 8.04 desktop (Hardy) WINE ver: 0.9.59 Sound device #1: Onboard SiS (661FX chipset) Realtek AC'97 Sound device #2: Yamaha DS-1 PCI. [..] No matter what combination of settings I use in System > Preferences > Sound and Applications > WINE > Configure WINE > Audio Tab I seem to use, I cannot seem to force WINE to use only the Yamaha DS-1 PCI card...

Vitamin: You can't configure this via winecfg. Use registry as described here: http://wiki.winehq.org/UsefullRegistryKeys Also don't forget to kill/disable/remove pulseaudio - it conflicts with Wine.

Sound Tests

In May J. White [May 06] pointed to a post by R. Reif: The task is to perform a basic test of Wine's audio support to make sure it's a stable platform for us to build upon; what a great way for all you lurkers to help us out <wicked grin>.

The basic procedure is - get a current version of Wine, test the sound, and send the results in. It won't take long (took me ~30 minutes), and it'll be very helpful.

More details:

  • Checkout Wine from CVS or git
  • Figure out if you're using OSS, Alsa, or Alsa in OSS emulation mode (lsmod is your friend, and winecfg is quite nice as well)
  • Run the test:
    • cd dlls/winmm/tests
    • WINETEST_INTERACTIVE=1 wine winmm_test.exe.so wave 2>&1 | tee /tmp/wave.out
      • important
        As it runs, you should hear a nice steady set of soothing beeps, all at the same pitch and duration. If you hear any variation from that, make a note of it, so you can report it. It's important to listen the whole way through; a tad boring, I know, but important; it'll shift to a virtual device half way through and it's important to hear if it keeps on working or not.
  • Report your results:
    • Pack up your output files, and report your results along with your sound driver info. Failures are obviously the most interesting, but success on not previously validated hardware/driver combos are likely to be useful too.
    • Here is an example of a Sound report:
Kernel 2.6.13
Sound driver: snd_intel8x0
Sound driver description from lspci:
Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
32 bit Debian system
Alsa version 1.0.10-2
Tested against Wine CVS up to date as of 5/7/06, 10:27
Results:
Tested under winealsa, as well as wineoss with OSS emulation All sounds played flawlessly. Alsa runs reported 0 failures. OSS runs reported 48 failures; not clear if that was relevant Only anomaly is that the modem driver is treated as an OSS sound card, and so has a number of flawed attempts to play against it Full log files of the runs attached.

T. Booker: [Please when posting to the list, do not cut and paste your console output] I cannot read it in my gmail web interface,[...] Again, I ask everyone to please attach console output, do not paste it in either bugs on bugzilla, nor here. wine archive

May 06 Sound testing bug notes

Playback stopped with the line:
wave.c:657:Playing 1 second 440Hz tone at 8000x16x2 WAVE_FORMAT_PCM CALLBACK_THREAD|WAVE_MAPPED

R. Rief: [May 06] There is a bug in the wave test and I just submitted a fix so please retry with CVS once the bug fix gets committed. wine archive

Wine and MIDI with ALSA

A user asked how to route MIDI in a Windows application through to the (working) ALSA MIDI devices.

Here's the answer for wine-20050628. You need to load regedit and then create the following keys:

Create HKCU\Software\Wine\ALSA, and add two string values:

   "MidiPort"="72:0"
   "PlaybackDevice"="default"

72:0 happens to be the MIDI serial port on my machine. If you are using Timidity, it should probably be 128:0. The command pmidi -l should provide you with a list of available ports.

Create HKCU\Software\Wine\Drivers, and add a string value:

   "audio"="alsa"

If the keys already exist, just modify them. In fact, I'm not sure that you necessarily need the ALSA key, but I haven't tried it without. The other key is essential though. Wine Archive

Wine Sound Forum Comments

A developer noted [Jun 06]: I have started work on an openal driver for wine... So far I have playback and recording working (with minor issues) (for some reason the DSound HEL is unhappy with my driver) wine archive


A poster asked: if MIDI is supported under wine? E. Pouch [May 06]: Midi playback and record should work fine with both OSS and ALSA drivers, and is not supported with the other drivers. wine archive

M. Hearn [Apr 05] Posted the latest version of his patch for improving sound and added: I think I will investigate this a bit more, but perhaps later. For now this is fine for RPMs and packages etc, which install to /usr, as they can simply "chmod +s wineserver" and have apps with solid audio. wine archive

A Very long thread devoted to improving wine and sound is found in the April 06 Wine-devel Mailing list. For example C. Kolivas commented: Apart from legacy, is there a reason you haven't moved en-masse to alsa? It is the only supported driver in current kernels now. Talking to oss, the oss compatibility module or worse through a sound driver like esd, arts, gstreamer, jack... etc just adds more potential for desynchronisation. wine archive


Surround Sound

wine user Aug 08 asked about if wine supported surround sound.

A. English: No one with the coding skills required to implement it needed or wanted that feature, so it hasn't been done.

Filing Bugs

T. Coosemans: OSS isn't deprecated. ALSA is Linux-only. OSS is a multiplatform solution.

If you find a problem has developed with sound one developer noted [Oct 07 wine devel]: Have you considered filing a bug report, and do a regression test? It's easy to do and would allow you to find the exact cause of the glitch, and if it's obvious you could even fix it yourself. [otherwise fill out a bug report for the crack bug zapping team]


In the .wine dir there is no longer a config file. How does one change the sound driver type if there is no config file?

Anon: Use Winecfg or edit the Wine Registry

J. Hawkins: We are in the process of removing the config file so we don't include it in .wine by default anymore. [It is available in the cvs attic, but has been superseded by winecfg. Update aug 08, winecfg has replaced the winecfg and wine has progressed so far since the config file, it is unlikely you would even consider using such an old version of wine]

http://cvs.winehq.org/cvsweb/wine/documentation/samples/Attic/config


Use: "HardwareAcceleration" = "Emulation"

err:wave:DSDB_MapBuffer Use: "HardwareAcceleration" = "Emulation" in the [dsound] section of your config file.

As the config file has been obsolete since June 2005, this message will need updating. Apparently a cvs comment mentions a registry key to be altered: Software\Wine\AppDefaults\app.exe\DirectSound.

A User then asked: I can't see where "app.exe" is added to the key; should the comment be fixed?

H. Bostick: I haven't looked at the comment, but I think that "app.exe" is meant to be an example, and "app.exe" is meant to be replaced by the actual name of the executable in question (i.e. Software\Wine\AppDefaults\Starcraft.exe\DirectSound), in order to make a per-application setting that will relate only to that particular *.exe, and not all the others you may run.

W. Pettersson: You can also set the global preference in CURRENT_USER\Software\Wine\DirectSound. Just make a new string variable called "HardwareAcceleration" and give it the value "Emulation".


Terrible Sounds with "HardwareAcceleration" = "Emulation"
--ibr 11:45, 11 Jul 2005 (PDT) I had terrible sounds (like a radio not tuned on a particular station) after playing StarCraft for a while with "HardwareAcceleration" = "Emulation". I could solve the problem using ALSA. I removed "HardwareAcceleration" = "Emulation" from .wine/config, configured ALSA using winecfg, and created the following entries in /dev/snd:

crw-rw----  1 root audio 116,   0 Jul 11 19:05 controlC0
crw-rw----  1 root audio 116,  32 Jul 11 19:05 controlC1
crw-rw----  1 root audio 116,  64 Jul 11 19:05 controlC2
crw-rw----  1 root audio 116,  96 Jul 11 19:05 controlC3
crw-rw----  1 root audio 116, 128 Jul 11 19:05 controlC4
crw-rw----  1 root audio 116, 160 Jul 11 19:05 controlC5
crw-rw----  1 root audio 116, 192 Jul 11 19:05 controlC6
crw-rw----  1 root audio 116, 224 Jul 11 19:05 controlC7
crw-rw----  1 root audio 116,  24 Jul 11 19:52 pcmC0D0c
crw-rw----  1 root audio 116,  16 Jul 11 19:10 pcmC0D0p
crw-rw----  1 root audio 116,   1 Jul 11 18:58 seq

Now I have choppy sounds at exit, but this is much better than with "HardwareAcceleration" = "Emulation".


Wine doesnt allow any other sounds to play
If you are using ALSA you can try a change using winecfg; or for older versons of wine, to the config file:

Using the Config File: Configuring Wine to use DMIX


Esound

A user asked about his difficulties with Esound and Wine [july 05].

Another user suggested: Try jack ,-)

M. Hearn: Try resubmitting [the patch with the suggested fix] to wine-patches. I suspect the reason is that we already support a million and one sound servers, but esound is so common it should definitely be in there.

Troubleshooting Dlls

While wine can use some dlls from windows, not all dlls are equal and you want to only use the bare minumum. File a bug when Wine's version is incomplete. However, You can't just override any dll you also have to copy it to wines fake program's or system32 dir. [Sept 11 wineuser pc_bil]: Copying random dlls to system32 is BAD - you will break things. Only a handful of dlls are ever needed and even then they can cause problems.

You can check which dlls can be copied accross, as winecfg has a drop down list of dlls that it will allow. A good way to get started is to run your program with the trace loaddll and check to see if anything is missing and then use winetricks to experiment adding in these dlls. If it is a specific dll that comes with the program, you might try to copy the dll over to the folder where the exe resides. Bear in mind that efforts with your program may upset your wine install, so make a backup. eg first run cp .wine .winebackup and then from the command line run..

WINEDEBUG=+loaddll wine [your program name.exe]

A user asked May 2008: I've got a game which is calling unimplemented function(s) in d3dx9_36.dll, and I found some comments on existing bugs, apparently from devs stating that it's known to be incomplete and to use a native dll to workaround. My question is, should I be reporting stuff like this, or do the devs already have a list of functions and know? I checked the known-issues also and didn't see it explicitly stated there.

A. English: Check for dupes first, and if no bug exists, file one.

He reported back that in the past bu reports on these dlls were closed: Bug 4464 - d3dx9_*.dll are unimplemented - redistributable dll, use native version (builtin replacement is a work in progress) Closed Wontfix http://bugs.winehq.org/show_bug.cgi?id=4464 Closed Wontfix. [...] Any advice? For this exact case I'm just getting 'unimplemented function d3dx9_36.dll.D3DXCreateTextureFromFileW'.

A. English: We've started implementing those DLLs now. See:http://bugs.winehq.org/show_bug.cgi?id=11675 But filing a more specific bug with more info wouldn't hurt. My bug is pretty generic.

Vitamin: Actually there is some work underway to get those implemented. But until they will, you will need to copy it from windows.


Missing Dll Errors

err:module:import_dll Library MSVCR71.dll (which is needed by L"Z:\\home\...

This is surpringly a common error and is easy to fix as this C++ dll is distributed with with Windows XP.

U.Bonnes:You probably did not install the application with wine. It is the task of the installer to deliver MSVCR71.dll and it should be located in the application directory. Either try to install the application in wine or look where msvcr71.dll is located and copy it into the application directory. Wine Archive Link

M.Hearn: I would report the lack of this DLL to the authors as a bug, they should ship it with their app though they may not realise it. Wine Archive Link

 err:module:import_dll No implementation for msvcrt.dll.??_U@YAPAXI@Z imported from
L"Z:\\0winxp\\Programmi\\pwsafe-2.0pre2-bin\\MSVCIRT.dll",setting to 0xdeadbeef

F. Munz:try using msvcrt.dll native. just copy it from your windows installation to your (wine) windows/system dir and start your program with:
update: wine versions 0.9 or later, copy the dlls over to the (fake) windows/system32 directory.

WINEDLLOVERRIDES="msvcrt=n" wine yourprg.exe

If you have two dlls with the same name F. Munz suggested: delete or rename the old dll. just in case ;-).
However if the dll came from Windows XP, unless the application database recommends otherwise you usually change Wine to emulate winXP.

[Oct 07 anon] You can either set by typing WINEDLLOVERRIDES on the command line or you can use winecfg to set the overide with a gui.

The Correct Dll

When you find in the application database that you must instruct wine to use a native Windows Dll, sometimes you need the latest version as one user found [Jan -7 wine user]: The error message means that the application is looking for a function in mfc42.dll that it cannot find. Where did you get this DLL? You might want to try one from somewhere else.

Another user replied: Aha, you can get a good version right from MS. http://activex.microsoft.com/controls/vc/mfc42.cab This is a cab file, so you need the program cabextract to unpack it. That unpacks into an executable, mfc42.exe. Run that under Wine, and it installs mfc42.dll in the correct place. With that version of mfc42.dll, I was able to install iview399, and it at least runs.

Further Reading

However sometimes Microsoft has multiple versions of the same dll and you need the right one, which is usually the latest one. You can experiment with the one from your windows version and some are available from Microsoft. Be aware that there are licensing issues to consider.

As one user noted:

Installed original MFC42.DLL in the Scanback program folder...
wine: Call from 0x40ee68 to unimplemented function MFC42.DLL.6905,aborting

J. Lang [Oct 07 wine devel]: Use wine-users for this. [..the message] means you don't have the right version of mfc42.dll. Wine doesn't provide its own, so we can't help you with that. The application was supposed to have installed it, but many don't[..]

Some Dlls are Essential to Wine and Cannot be overridden with a Windows version.

  • D. Timoshkov [Oct 07 winebug10252]: Native gdi32 will not work under Wine

Insert non-formatted text here

When you run winecfg, only dlls that can be overridden are shown or listed. If you are not sure, check the list in winecfg.

Dos

How can I get a DOS program to run using WINE, similar to how I run it in windows XP using a CMD window?

P. Troller apr 08: You have to enter "wine cmd.exe". It should work. Wine is not intended to run DOS programs. I'm [concerned] that it will not work[...] Even if it probably will not work, the correct answer is: Use bash, cd to the directory containing the program, and enter

"wine <program name>".

It will try to do, what you are asking for...

Vitamin: Wine used to. However supporting DOS programs wasn't that good and now it's badly broken. And since there are much better solutions just to run DOS program no one in the rush to fix Wine. So... if you need to run DOS program (not windows console program) don't use Wine. [ed or help fix wine...]

Sergio: I use to be a DOS Developer and used a lot of low level OS bypassed features such BIOS calls, direct memory access, port access, etc. which I guess wine can't manage.

Finding a CDROM or local drive

When accessing the floppy disk drive or a CDROM from within wine-installed programs you may get the message "no removable drives...", even though you have successfully mounted the drive.

A.Cooper:The dosdevices directory contains sym(bolic)-links to the actual devices. Many Linix Distributions have the floppy drive as /mnt/floppy. To add the floppy drive, place a symbolic link to this folder in the Wine dosdevices directory. Wine-User Archive Link.

The man pages for 'ln' - creating symbolic links.

How do I set up my config correctly so that my windows drives and cdrom are properly recognized by winefile?

D. Clark: This is no longer handled by entries in the config file. http://www.winehq.org/site/docs/wine-user/config-drive-main#CONFIG-DRIVE-SECTIONS

A. N. Ramage: Look in .wine/dosdevices, the symlinks are maintained in that direcory. Type ls -l to see where the links lead. Wine Archive Link

Dimesio explained how to do this using winecfg [aug 08 wineuser]: Have you mapped the drive in winecfg? It's on the Drives tab; you have to click the "Show Advanced" button to see the option to set the drive type.

The user reported: I had mapped the drive, and I had fiddled with the mapping repeatedly, but it turns out that for some reason wine had decided that h: -> /media/cdrom0 was a hard drive. Switching the type (after selecting 'show advanced') solved the problem.

USB

Wine does not support all USB devices but it does support some:

J. Lang [wine devel Oct 07]: BTW, if your Lexmark OptraImage 322 is non-ttyUSB USB device (you don't see it as ttyUSB in /dev/ directory) then [...] it will not work with Windows programs on WINE. [...] WINE currently only support ttyUSB USB devices and all other kinds of tty devices (for example bluetooth/IRDA phones). [If it is not a ttyUSB device...] you want try Virtual Box, QEmu or VMWare instead.

Joystick/Gamepad

Wine does need permission to use the joystick, so make sure that is checked first..

Steve wineuser aug08: Running Ubuntu Hardy 64bit.. Ubuntu see's the gamepad correctly etc.. Game's under wine can see it, but thats it... i cant program the buttons, or use the buttons or the analog sticks....

He shortly posted: fixed my problem - [..]i did a

ls -la /dev/input

[and] noticed event6was owned by root... so i then did a

sudo chmod 755 /dev/input/event6

and the game can now use the control pad... but it needs to be calibrated..

Firewire

Vitamin wine user Aug 08: Wine does not support hardware device drivers. Nor can it talk directly to ieee1394 or USB devices.

[Wine talks to the Linux drivers, and generally does not run the windows drivers]

Mouse

wine user Aug 08 vitamin responded to a user playing myst 3 Exile in wine-1.1.2 on ubuntu 8.04 with winecfg set to emulate virtual desktop and with directX mouse grab disable (from the wineconfig graphic interface): That option doesn't do anything. It used to work some years ago but not anymore. The only way Wine or program itself can hold the mouse pointer inside is by moving it all the time to the center of the window.

Networks

A user reported a problem with his game [wine devel Oct 07]: I've rolled all the way back to 0.9.43 but I still can't join a Local Lan game [...] Any ideas folks?

K. Blin: Let me take a wild guess. /etc/hosts resolves your hostname to a loopback address, like 127.0.1.1 or somesuch. If that's the case, please change /etc/hosts to make your hostname resolve to your network card's IP address.

Sure enough in his hosts file: 127.0.0.1 [...] localhost. Unfortunately it was not the reason for his particular issue but J. Allen pointed out: fix your hosts file while your at it. It might not be this specific issue, but it's going to cause other problems for certain.


Modem

If you have a linux driver for your modem you should be able to use it via wine. However wine cannot run most windows drivers including those for softmodems.

Further reading

Font Troubleshooting

Hiji [July 05]: Make sure you don't have any running Wine process going in the background before make a config change (this includes adding fonts) because new changes usually won't take effect until a new instance of Wine is started. Wine Archive


Why does text only show a box ("[ ]")? T.Burnus:I think the reason for my boxes was that I didn't install symbol.ttf from Windows (I had only a "Symbol Set BT" and bitmap fonts before). Anyway, both displaying in the application _and_ (thanks to the patch) exporting to RTF work now.


Troubleshooting Ugly Fonts
A user asked [Jun 05]: Is there a simple way to replace [default wine Windows system font] with something that is closer to windoze system font?

Then he figured it out: all it takes is to properly populate .../fake_windows/Windows/Fonts directory.Wine Archive

If your program installs fonts in your fake windows/fonts directory wine will use this font instead of the X fonts. To fix this, see the advanced user information about better fonts.

Further Reading

Printing

Printing for Wine is usually best with CUPS.


Jul 08: All of my wine apps can see my CUPS printers, but none of them allow me to change any settings except paper size and portrait/landscape. Is this normal?

Detlef: Yes, this is normal. Wine has no Dialog to set other Parameter yet. (quality as example)

Testing printing

Vitamin [nov 08 wine user]. Use notepad to test printing. He also mentioned: Wine's cmd has all sorts of problems [Ed: so I guess dont use it at this stage in wine development for printing]

Wine and Printing

A programmer reported his workaround for printing with some custom software [Jun 07 wine user]: when run under Wine, it will only print text correctly. When it tries to print an image from the database (Stored in TIF format) all it prints a page that is mostly black with part of a white bar on the right-hand side. At the bottom of the page below the image the application is supposed to print a black box with white background with text for the volume, page, and document date. In the wine printout, this box is visible overlaid onto the solid black that is printed, but there is no text in the box. [...] The application has the ability to construct PDF files from the images. I had the developer create a version of the program that instead of printing just saves a PDF of what would be printed to a specific location on a virtual disk. I have a perl script that monitors that location and sends any PDF that appears to LPR as soon as the program is finished writing it. It's not the ideal solution, but it works.

For registry settings, See Wine Registry

Unused Printers

A user aug 08 wineuser: I am actually trying to delete [..] a bogus printer that I no longer have on my system but wine keeps trying to use as my only printer[..] where does wineboot restore the settings from? I have already checked cups and there is no entry for the old printer so I am trying to manually delete it[...]

A. English: From wine.inf. [...] You might try starting with a fresh .wine [the fake windows folder]

The Parallel Port and Wine

Dec 05 update: see Wine Registry

A user asked where can I grant FULL parallel port access to the TopMax program[...] How i can grant port access (standard 378-37f)

K. Ober: If you're using linux, you will most likely have to use a suid-root wrapper that calls ioperm() and subsequently drops privileges and invokes wine. That's about 10 lines of C and should be a good exercise ;] I don't know offhand how portable ioperm() is, and if there is something in /proc that would be more portable, etc.

I don't see anything suid-root that comes with wine, so probably wine itself doesn't have anything of the sort. And I don't know either how wine managed to pull it off before w/o using suid root executable, unless it did it via signal catching and some manual forwarding to /dev/lp#. With right ioperms in place the program should be able to run at full speed.Wine Archive

K. Ober:

m an ioperm 2

You can use it via a suid-root wrapper program that acquires the port access, drops privileges and executes your wine programs. Works for me. Of course it doesn't work if the windows program needs the special driver to talk to the device. It does work for those old-style windows95 applications that expect to be able to talk to the ports directly. Wine Archive

Ivan Leo Pouti: For both the serial and the parallel port, direct port access can be handled by ioctl() to the devices. So doing direct port access via in() and out() while running as root is only the last resort...

Mapping LPT in Wine

vitamin wineuser Nov 08: [you can map LPT1: to a command e.g. "|lpr"] just edit registry. Code:

[HKLM\System\CurrentControlSet\Control\Print\Printers\mx310series]
"Port"="|lpr"

shanku wrote: How can I use this? From my applications I only see the printers from my CUPS. How can I use a pritner like LPT1: now I'm using Wine 1.1.9

Vitamin:Same way as a normal printer - you select it then print to it.

Printing using Samba

Wine uses cups, so as long as you can see it via cups, you should be able to print on it.

Sept 10 2008 wine user tjandracom: it works now. network (samba) printer must be installed using "Generic - text-only" driver. in my example, i named it "EpsonLX". in my application i wrote:

DocInfo.pDocName = "whatever";
DocInfo.pOutputFile = NULL;
DocInfo.pDataType = "RAW";
OpenPrinter( "EpsonLX", &handle, NULL ); StartDocPrinter( handle, 1, &DocInfo ); StartPagePrinter( handle );
WritePrinter( handle, buffer, buffersize ); EndPagePrinter( handle );
EndDocPrinter( handle );
ClosePrinter( handle );

Postscript Printing

In helping a user print L. Rahyen [Jul 07 wine user]: before we waste time for [your] printer setup under WINE make sure that your program [has a] print dialog which looks somewhat the same to one you seen in the notepad. Specifically, you [are] interested in [the] "Print to file" option. If your program doesn't have this then there is [a chance] it wants to talk to [the] device only. If there is such option then try to use it, WINE will create the file in current directory (most likely current directory will be your home directory if you didn't change it with cd command).

If your program require to use device directly and you don't print very muuch you may try to connect your printer to lp port (LPT in Windows).

Connecting your printer to the lp port

  • If you want to try this then execute (just copy and paste it to the terminal, (don't change anything):
l n -s /dev/lp0 ~/.wine/dosdevices/lpt1
  • I assume that you have only one lp port on your computer. If not you may need to replace "lp0" with other lp device where your printer is connected.
  • Now check your permissions:
e cho "test" > /dev/lp0
  • This should give you no errors. If you havn't permission try this:
s udo chmod a+rw /dev/lp0
  • Or, if sudo isn't supported by your configuration:
s u
c hmod a+rw /dev/lp0
  • Please note that these command will make your lp0 world writable! If this is not what you want you must add your user to corresponding group to have the access (this is "clean" way; if you don't know what I did said and how to do it then execute "man chmod" in a shell and read instructions). Of course if "chmod a+rw /dev/lp0" did work you don't need to execute the commands above - your distro already have right settings of permissions for you!

If your printer don't support lp port above will not help. And even it support lp performance of printing will be very slow but quality shouldn't be affected. Personally I never tried to use lp port with color printer (but many printer still support this, even my modern color laser printer has support for lp port).

[...]If your program is using USB directly and you cannot or don't want to use lp port instead then for "fast result" try VMWare ( http://www.vmware.com - they have a demo version) - this is exactly what I use when WINE fail to support something I need (mostly Autodesk AutoCAD and 3ds max, and sometimes I use my HP scanner). QEmu is free but it also have less functionality and it is may be hard to set it up correctly for some users.


How can I get my printer working the postscript?

F.Spaan [march 05]: If you use cups you must find a .ppd file for your printer. I just googled around. Put the file in

/usr/lib/wine

and make this entry in the config file :

[ppd]
"generic" = "/usr/lib/wine/ps1.ppd"

[Ed: Note the config file has been completely removed since June 2005. You will need to make any such changes to the Wine Resgistry] Wine Archive Link

PDF Printing

A user asked July 07 wine user: "Can I use PDF virtual printer from CUPS in WINE?" [...] BTW, I have no issue printing to PDF from my KDE applications via CUPS.

D. Riekenberg:I use cups-pdf regular from wine. [...]from recent experience, i expect that: - you have a 64-Bit system - your system has no 32-Bit version of libcups

My results:

detlef@p4:/_v/src/printer$ file /usr/lib/libcups*
/usr/lib/libcupsimage.so:   symbolic link to `libcupsimage.so.2'
/usr/lib/libcupsimage.so.2: ELF 32-bit LSB shared object, Intel 80386,version 1 (SYSV), stripped
/usr/lib/libcups.so:        symbolic link to `libcups.so.2'
/usr/lib/libcups.so.2:      ELF 32-bit LSB shared object, Intel 80386,version 1 (SYSV), stripped

Wine is using "/etc/printcap", to get the installed Printers, when CUPS does not work. From recent experience, i expect that you have: no Printers listed in "/etc/printcap" To print from wine, you still need the "lpr"-tool (I have the "lpr" wrapper from CUPS here: "cupsys-bsd" in ubuntu)


ASCII Printing

A user asked [Sept05]: Is there a way to configure wine to print non-postscript format (not use wineps) ? I have a printer what accept only text (ASCII) data ...

D. Riekenburg: Wine is fixed to "wineps.drv" in conjunction with CUPS or LPR (/etc/printcap).That will change (i'm working on this), but the way to go is long... Wine Archive


A user [Dec 05] mentioned that his application produced a blank printer selection dialog.: If I create a print job eventually I get:

lpr: error - expected destination after -P option!

I created a /usr/bin/lpr which just echo'ed $* to a tmpfile and found it only contains '-P'. I created a /usr/bin/lpr which does

#!/bin/sh
lpr.real -Pfront

and print jobs actually work. However, I still can't select printers from the printer selection dialog.

D. Clark mentioned one area to check: the [devices] section of C:/windows/win.ini (yes, Wine does use this). wine archive

While checking the win.ini file this lead to a discovery as the user reported: The MS-windows, vmware, and win4lin system end up with

[PrinterPorts]
samsung=WINEPS.DRV,LPR:samsung,15,45
front=WINEPS.DRV,LPR:front,15,45
samsung2=WINEPS.DRV,LPR:samsung2,15,45

in windows/win.ini. These entries (along with the whole PrinterPorts section) do not exist in the windows/win.ini under wine 0.9. Manually adding these entries to windows/win.ini under wine 0.9, allows the application printer selection to work correctly.

Further Reading

Scanners

wine user jun 08 Jim: Wine provides its own implementation of TWAIN which uses SANE drivers as a backend and translates TWAIN API calls into SAIN API calls. It would seem that to get your scanner working under Wine you need to first get it working under your native operating system (eg under Linux) first.

Troubleshooting Printing

I try to print through Wine, it says there are no printers.
M. Duarte [Jun 05]: I think that you need CUPS installed, and if you build wine from sources, you need cups-devel.Wine Archive


Could not open printer styluscolor600

For the Epsom Stylus Color 600 pm SuSE 9.2 with CUPS the error is

fixme:commdlg:PRINTDLG_OpenDefaultPrinter Could not open printer styluscolor600?!
err:psdrv:PSDRV_FindPrinterInfo OpenPrinterA failed with code 1801

F. Spaan: Search via Google and Download the right .ppd file for the printer and name it generic.ppd.

Add entries in the wine registry (using regedit) and the win.ini in the fake_windows directory, like described in this tutorial: http://www.la-sorciere.de/Wine-HOWTO/wineprintconfig.html, in the part "Printing with the Internal Postscript Driver in Wine". The tutorial isn't up to date because I had to use

[ppd]
"generic" = "/usr/local/share/wine/generic.ppd"

instead of [psdrv] ..., and I didn't need the entries for the afm-files.Wine Archive Link


I cant print using CUPS?
A user reported that when he wants to print (over cups), nothing happens.

F. Spaan [May 2005] Wine Archives: Get the ppd file for your printer (just google around) or download from http://www.adobe.com/support/downloads/main.html and save it for example in /usr/local/share/wine.[Rename it as generic.ppd and then] make this entry in your wine config file :

[ppd] "generic" = "/usr/local/share/wine/generic.ppd"


Can I print using Printers as SMB on a Windows machine

Hiji [Sept 05]: Any printers you have configured within Linux, should come up within Wine. The only times they don't come up (I've found) is when you compile Wine without having installed cups-devel. If you don't have cups-devel installed, do so, and then recompile wine. Wine Archive

Uninstalling Wine

Tlarhices [may 08] If you used'make install' to install it, you have to use 'make uninstall' from the source folder to uninstall it.

Vincent: [if] you have installed a binary package of wine using your distribution's package manager. You should uninstall wine using the package manager

Ed: To Uninstall Wine, dont forget remove the wine folder in your home directory. See below for more..

Reinstalling the fake Windows without reinstalling Wine

Sometimes you may a version of software which will not let you uninstall, and you decide you want erase it and start all over again. Dont panic, because you needn't reinstall Wine. By removing your fake windows directory, Wine can let you start again from scratch.

A user installed IE6 asked [Aug 07]: Is there anything that I am able to do to get IE6 out of my machine all together?

L. Rayhen: Try to run rm -rf ~/.wine if you have used default WINEPREFIX. This will delete all registry entries and all files in your WINE's drive_c directory. It will be automatically (cleanly) recreated if you run wineprefixcreate. If you don't want to delete .wine [and all your installed software] then use mv instead of rm to rename it.

Ed 08. Moving the folder may be preferable, as then you can restore it.

Personal tools