General Wine Troubleshooting

From Wine-Wiki.org
Jump to: navigation, search

Contents

General Wine Troubleshooting

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

Getting Help

Sound

Help - My Program 'broke' when I upgraded Wine

Please keep in mind that Wine is still under tremendous development. 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 five options to get you going again (make sure to try the first one before filing a bug):


Why Does Wine Occasionally Break?

D. Kegel July 09: It was probably a correct change that exposed a problem. Winehq Bugzilla entry 18070 See also Winehq Bugzilla entry 16905

S. Richie: [...] [update: we now have a stable version]... 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. [More tests for the Windows API will help to prevent regressions or breakages] 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[..]

Sometimes, it is because the program is written in a way that can cause problems. One user wrote Winehq Bugzilla entry 21426 [jan 10] it's the third time a regression causes Fallout Tactics not to start in fullscreen. Really strange bug. H. Verbeet: That probably just means it's one of those applications that's sensitive to the exact sequence of window messages sent during Direct3D setup.


Ed [Aug 07]. For those wondering about Winetools: It did wine a lot of good, but many of the problems that Winetools worked around have been fixed. Wine now needs good bug reports to round out these fixes. 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 or read up about WINEPREFIX for how to use multiple wine folders before trying something risky.

Common Errors

'Wine has a problem' message

Recently wine has had a dialog box added to enable a message to explain to people that a program or wine has run into an error and to check for the application database for assistance. This causes problems with some programs who trigger this error often. Now of course you will need to check the application database to see if this problem is known - if not, add a bug so that it can be fixed properly. You can then turn the message off until it gets fixed. However - If you do not file a bug - it will not get fixed and not only will you have left all those other less technical users stuck, but you will lose out on attracting a wealth of different users who could add their efforts to improving your favourite software in wine.

H. Verbeet Winehq Bugzilla entry 180169 Use the "ShowCrashDialog" registry setting (see http://wiki.winehq.org/UsefulRegistryKeys) to disable the crash dialog.

Update [Jul 09] Winehq Bugzilla entry 18202 which tracked this issue has been marked as fixed.

Compiz and Metacity

J. McKenzie [Jan 09: currently] You need to remove both compiz and Metacity. No extenders will work with Wine right now. Gert: IIRC correctly recent Metacity versions has compositing effects, that can be disabled from somewhere... (I'm a KDE user for now...)


Debugger Messages

Wine has had added a gui message to help users with crashes. Unfortunately it has shown up some crashes which are not critical, and do not affect software running. If you are having problems with this, not to worry, it is being worked on and you might keep an eye on the latest versions of wine.

in Winehq Bugzilla entry 18216 a user asked:[for those where this causes a problem] Is there a way to stop the debugger launching that many times or is it best to stay with version 1.1.19 of wine? he was told Stick to 1.1.19 for now.

[ed: note the comment.. for now.. Wine may have fixed this by the time you read this]

TwinView

[Ed: note - wine moves fast. This information can get out of date] Vitamin jan 09 [for a game display issue] If you using TwinView you have to add metamodes. Or don't use twinview and use xinerama.

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


If you wonder if runing wine with root permissions might just fix your problem - stop. Poorly behaved windows software can cause all sorts of problems and running as root just gives it permission to do more damage.. Running wine as root, often sooner and sometimes a bit later - breaks things.


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

Could not load Mozilla. HTML rendering will be disabled

First of all - Dont panic. It just means wine has not yet downloaded Gecko for rendering HTML. Some programs use HTML to display certain things and Wine uses Gecko to replace the parts of internet explorer, which windows uses for rendering HMTL. Remember we said dont panic? Well, wine will try to download gecko for you if your packager did not include it. If you are a power user of wine and want to get the download out of the way, use winetricks.

Administrator Privileges

If your application asks for Administrator rights.. File a bug with wine. 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.


Here it is again, G van den Berg [Mar 09] : Assuming you are using the default WINEPREFIX cd

cd .wine/drive_c/
cd "Program Files"
cd <program directory> [you will need to check what it is called - hint see Using_the_Command_Line#ls ]
wine <program exe> [again, you need to specify what the program filename is called. It is often the one that ends with .exe]

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 [Ed. Unless you are a wine guru, you should use regedit to change the registry.]

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 one of it's pretend Windows Dlls. You can get around this by swapping in a Windows dll and see if this works. You will need to read about which dll's are safe to try and only try swapping the barest minimum of Windows dlls. 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.

This can mean that pklink was not registered. You can register it manually and see if that fixes it (and then remember to file a bug): vitamin: Run Code:

regsvr32 pklink.ocx 


DotNet2 .NET2

Development on Wine means .Net functionality improves quite promptly so this can get out of date real quick.. There are a number of known bugs that are being worked on.


J. McKenzie: Not all of .NET 2.0 functionality is built into Wine. Mono is a parallel project focused solely on getting .NET programs to run on various platforms. Thus if a program that needs .NET functions that are not present in Wine may work in Mono.


[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.

Winehq Bugzilla entry 17232 Apr 09 Don't let app installers do .NET 2.0 installation! Always check appdb .NET Framework entries for instructions how deal with .NET based apps


.net 2.0: L. Lenders Winehq Bugzilla entry 18886 referred to a common problem and pointed to the wine appdb entry for .net2. snipped quote: If you get a crash/backtrace like the following in console:

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. 
This is often an indication that other memory is corrupt. 
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(HandleRef hdc, Object lf, IntPtr& font)
at System.Drawing.Font.FromLogFont(Object lf, IntPtr hdc) 
at System.Drawing.Font.FromHfont(IntPtr hfont) 
at System.Drawing.SystemFonts.get_DefaultFont() 
at System.Windows.Forms.Control.get_Font() ....

You most likely have a corrupted or non-conformant truetype font in your system. These are the most notorious ones:

Methods for Removal of fonts

fonts

'winetricks fontfix' (or 'winetricks dotnet20' which includes 'fontfix' step) will install working versions of truetype fonts known as broken (like the notorious "ukai"). Don't worry, your original (broken) ones from your Linux distribution will be left unchanged. The "good" fonts get installed into Wine/Windows font directory [...] - so the good ones will be pulled in when found before defaulting to Linux distribution ones.


Winehq Bugzilla entry 19792 Focht Jan 10: Although Wine suggests "install MONO to run .NET executables", I would advise/prefer the use of original Microsoft .NET Framework any time over MONO. Start over with fresh WINEPREFIX and use winetricks steps (adapted from your start script):

$ sh winetricks -q dotnet20 jet40 mdac28 corefonts

If the app requires .NET 2.0 SP1 you can work around by faking the SP number, e.g.:

[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] "SP"=dword:00000001
Windows Imaging Component

"Windows Imaging Component (WIC) is not installed. Please Install (WIC) then restart this installation." Winehq Bugzilla entry 18559 WIC v1.0 is available as standalone package from here: http://download.microsoft.com/download/f/f/1/ff178bb1-da91-48ed-89e5-478a99387d4f/wic_x86_enu.exe

The hang in the GUI installer at the end is bug 16876. You can work around that by using silent install: "wine ./wic_x86_enu.exe /quiet" You also need at least .NET 2.0 Framework for this app.

[This installation may now be included in winetricks so check the latest version before trying this yourself]

DotNet3 .NET3

This is an example of how wine can surprise. 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 But much has occurred since then. Net3 is nearly able to install as a number of the blocking bugs were recently fixed. More progress will need to be made, but a surprising number stumbling blocks for this working have been fixed. When will it work? Wine is Open Source, and developers scratch their own itch so this is understandably unknown. Check bugzilla for the latest information. Some of the known stumbling blocks are well described and you might be able to fix one of them yourself...

[Update Jan 10]D. Kegel: .net 3.0's runtime installer seems to kinda work.

x86 64bit software

As of Dec 10 this appears to be starting to work. If you are not a developer you will probably want to stay with 32bit software if possible as there are some bugs present, but wine is continuing to improve at a rapid rate. As of mar 09 this work was very preliminary in wine. some things could run. some couldnot. Note that you need to compile wine for 64bit at this stage, and this is a different topic from running most other windows software upon 64bit Linux, which wine does reasonable well, as long as it is installed with the correct libraries.

Delphi

A. English [ja 09]: Many programs rely on being run from their current directory, Delphi was well known for that. If your window manager supports it, you can tell it to run from that directory, then use the full path. Should work then.

V. Povrik: Short of writing a shell script, the easiest way to start an executable file in its directory is to run

$ wine start /unix ".wine/drive_c/Scan/program.exe"

When invoked this way, wine will try to start the file the same as if it were double-clicked in windows explorer. It will start from the path containing the exe and invoke it with its full dos path. This is the way file browsers invoke Wine. If that worked, this should also work. The drawback is that you cannot pass arguments to the executable this way; for that you would need a shell script

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 often be prevented using the tool called winetricks ]

wine user May 2010: removing the msvcr80.dll did not work for me. it just replaced one error with the other.

I did the following to fix the problem:
- run the winetricks script
- checked the package "vcrun2005" (description: "MS Visual C++ 2005 sp1 libraries (mfc80,msvxp80,msvcr80)")
- Install/run the ex-problomatic win application (I was trying to install Office 2007, and this fixed my problem)


If the WineTricks doesn't work, this is what worked for me, and answered a bunch of other errors too. The root of the problem is in a "FixMe" message from just before the runtime error. Look for

fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.CRT" (8.0.50727.762) <-this is the version we need 
fixme:actctx:parse_assembly_elem wrong version for assembly manifest: 8.0.50727.762 / 8.0.50608.0

To fix it, find the VC80.CRT (8.0.50727.762) files in a /Windows/WinSxS folder

- copy the folder named x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 from /Windows/WinSxS/ to the matching folder in wine
- copy the matching .cat and .manifest files to /winsxs/manifests/
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
DirectX

It is best not to install DirectX. Wine moves fast on this topic and improvements in Wine's implementation are seen in most releases. Install dlls only as they are required - check the appdb for what users of your software recommend. And there is the option given in winetricks which handles most of the traps for new users. However, if you are installing something that needs playing with to get it working, to avoid upsetting your existing installations, use a separate WINEPREFIX. As for directX10, it may work but if not Winehq Bugzilla entry 18633 H. Verbeet [May 09] It will probably be a while before we're able to run this with d3d10. Most current d3d10 games have d3d9 renderers as well though, does disabling d3d10, d3d10core and dxgi help?

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]. [Ed. check your network printers too]

Display speeds

Perhaps the DIB engine will help this. You can test it, but it does require recompiling wine.. Advanced Wine User Information

Codeweavers sometimes is better than wine but that is simply because of another reason: Dec 2010 a user noticed: Performance is really great with their version [..] Any ideas whats working different here?

A codeweavers dev explained: It's probably an aspect of our custom X11 server and libraries. In particular, our implementation of the MIT-SHM X extension.

That extension is defined in terms of the SysV shared memory API. However, on Mac OS X, the kernel limits on SysV shared memory are so severe that it's effectively crippled. I have reimplemented a SysV workalike based on the POSIX shared memory API, which doesn't face such restrictions, and then used that for the MIT-SHM extension.

We can do that because our X11 is special-purpose. It's not suitable for a general-purpose X11 environment, and only works because we control both the X server and the only X client that ever connects to it (Wine).

If you bought their version, pat your self on the back as it still helps wine - just check the commit logs and see the wealth of codeweaver patch submissions.

Screen or Display errors

Sometimes running wine with an emulated Desktop can get software to run, but J Zaroyko [oct 09] commented on Winehq Bugzilla entry 19188 (In reply to comment #9) You will NOT ENCOUNTER this bug if you check "Emulate Wine Desktop" in winecfg: That would suggest you don't have the correct modes setup in xorg if it crashes/doesn't work without the virtual desktop. Check the output of xrandr and compare it to the resolution that is set with the virtual desktop. (use xwininfo or something to get the window size if you can't guess it)


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

Very Old Video Cards

Codeweavers have done wonders for graphics and Wine. Unfortunately they have to draw a line somewhere. There is so much needing to be done for wine, they have to direct their efforts where it brings the most benefits. As the wine project is open source, if you really want this to work, this is where you can fix it or hire someone to do it for you. {{winebug|9888} gave an example [these] cards [were] just too old for me(ie, as part of my job at codeweavers) to care about, so unless a volunteer steps forward this bug is probably a WONTFIX or LATER.

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.

A comment about this error in the wineuser forum [nov09] noted that a user had this error with a very, very old version of wine: 1.0.0 is ancient, try [the] latest Wine.

[ed. because wine and linux both move at an impressive pace, this information can quickly become out of date. If the quotes are not recent, use this information as a starting point for further research]

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. [ed: This wipes the fake windows folder and all that was installed in it. As an alternative you might try renaming the .wine folder and try again - which will re create a new .wine folder]

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

Work on a dib engine may help speed up some part of games. http://bugs.winehq.org/show_bug.cgi?id=13801#c40. Unfortunately as Huw works for codeweavers and they have some bugs in Outlook that need attention. Unfortunately they specify his work while at work and pay him to do what earns money from their customers - see the money offered for Outlook on their page. Someone who volunteers to help keep the DIB patches so they apply to latest git - would help him and others. micomax is working on it a way that it will work in wine without the proper infrastructure to allow it to be tested. Hopefully he will publish his changes. apparently soon. reports are of good speed improvements even with what little has been done. Winehq Bugzilla entry 421 Some objects are missing completely. It seems to me that all missing objects are circles. Max wrote: Missing objects are foreseen, the graphic part of my engine is far from complete, as many primitives (seldom used ones, indeed) are missing. IIRC (it's a long time I don't look at my code ) circles are one of missing primitives. It would be almost trivial to add them... but I've got no time now. If somebody wants to do it,[..] welcome !

Video Drivers

As of the first half of 2009 This appears to be a common problem. Video drivers are responsible for many,many crashes and both developers and users are unable to fix it and have to wait for an update which may (and all too often it seems, updates do not) fix the problem. Perhaps the open graphics guys (www.opengraphics.org) will be able to open this field up, but they have a long way to go. Help with donations and developers will speed things up.

Nvidia

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.

Usually developers will ask if running glxinfo on the command line works as this can tell if some parts of graphics are working properly.

However Winehq Bugzilla entry 18502 noted glxinfo is *worthless* for debugging wine on amd64 platforms, since it uses the long mode userspace, while wine uses the ia32 emulation layer.

apparently the correct way to debug this class of problems is to use WINEDEBUG=wgl, (In a terminal, you would see: WINEDEBUG=wgl wine <yoursoftware>)and observe these lines:

0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo GL version             : 1.4(3.0.0 NVIDIA 180.44).
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo GL renderer            :GeForce 8400 GS/PCI/SSE2.
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo GLX version            : 1.4.
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX version     : 1.4.
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX vendor:     :NVIDIA Corporation.
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX version     : 1.4.
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX vendor:     : SGI.
                                            ^^^^^^^^^^^^^^^^^^ 
0009:trace:wgl:X11DRV_WineGL_InitOpenglInfo Direct rendering enabled:False

Which tells us:[..] client GLX vendor of SGI means that's mesa-glx, we're missing the ia32 version of the nvidia libGL, so half the extensions aren't working right. The part of the driver that loads into the X server is fine, so it seems fine everywhere else.

ATI

as of Jan 09, Not there yet for some games that run on wine with other cards, but with the open source development, some progress is being made. More open communication would help Wine. June 09 it seems that a number of applications may not work on ati cards due to a driver bug Winehq Bugzilla entry 18794.

A user posted: I get annoyed by some wine enthusiasts hatred of everything ATI. I am not associated with ATI (except by owning an ATI card) but I think this idea that ATI is wrong and Wine is right is mostly pure bias[..].

A. English apr 09: It's not that we hate ATI. It's that there are plenty of bugs in applications on Wine that ATI hasn't fixed, but work fine in Nvidia/Intel. Stefand put a lot of work into making testcases, and filed bugs with ATI about them, but they are reluctant to fix them unless they affect 'a large number of popular applications'.


a developer Asked May 09: Do we have a more formal way of reporting bugs to AMD/ATI? [...] I have a feeling that Wine is the only 'application' that really tests the Unix OpenGL drivers, by virtue of being the only application to run the really complex vertex and pixel shaders that are found only in Windows games. [then he compared to Intel...] But hey, I got a quick answer to my bug report to the Intel developers so it's not always bad. Unfortunately now I'm the one that's slow to answer as I have not had time to test their proposed fix. But I have not forgotten...

Another developer wrote: unless things changed recently http://ati.cchtml.com/ is probably the closest to a bug tracker there is, and I'm not completely sure they read that regularly.

The developer who has voiced quite pointed criticism in the past, which seemed to be mainly frustration over communication explained that AMD are doing good work: I'm not trying to just make AMD look bad here, I think it's great that they released the GPU documentation, and that they're paying people to work on the Mesa driver. Also, going by what I hear from other people, fglrx improved a lot in the more recent versions (certainly compared to the kind of support my Radeon 9800 Pro had...), so it's not all bad. They just *really* need to fix their developer relations stuff.

[Ed. Wine is one of the groups that apparently thoroughly tests their drivers and Wine developers even write helpful test cases when they find bugs. ATI may not have organized sufficient contact with the talented Wine developers. If this is the case, either internal politics or people skills may be letting AMD down here. AMD joining open source is a good thing and the developers who are actually writing the drivers are much appreciated. Perhaps this communication issue can only improve]

One developer opined: Actually ATI/AMD is quite interested in Wine. I have been in contact with them for joining their developer program and helping them fix issues.

INTEL

May 09 A user wrote: I hope WINE will someday have better INTEL OpenGL support.

R. Colenbrander: Wine is doing nothing wrong we use generic OpenGL extensions all through Wine. The issue is that the intel drivers don't offer all opengl extensions we need for decent d3d9 support, if the gl support isn't there we can't support it. Second the quality of the intel drivers still isn't very good, sure recent versions support GLSL, FBOs and other things but the drivers are first of all buggy and second very slow for those purposes. Further ATI works reasonably well with Wine as well these days (it used to be crap). Intel needs to fix their drivers.

However, because the drivers are open source... S Dossinger: Note that the intel drivers are open source, so you(The thread starter) can speed up this process by testing games, isolating the problems and filing bug reports in the Mesa or DRI bugzilla. I am pretty sure the developers could use extra manpower too.

A usr wrote feb 09:My card is an Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller, and uses the intel Xorg driver

C.E: In this case the graphic card is not the problem, but rather the driver. For me the open-source intel driver provided about 1/3 of the OSX or Windows couterpart, for native OpenGL applications. Best you can do would be to sign up to the IntelGfx mailing list and let them know you have problems, and that you expected it to run because the game is rather old and works flawless with the intel drivers on Windows.


According to Winehq Bugzilla entry 18948 the video card appears listed as GM965/GL960 Integrated Graphics Controller. [..] GMA965 is actually the chipset of my card. The model is the GMA X3100 wich according to wikipedia supports shader model 4.0.[..] With [this] intel graphic [card], however, they only show a black screen with the cursor, and sounds. Playing around with the cursor and clicking shows that one can interact with the menus, but there is no graphical output besides the cursor.

Anything older than i965 does not have GLSL support (due to no branching support in the gpu, according to mesa). Wine defaults to GLSL, so try setting UseGLSL=false . The games may also be using s3 texture compression, but I doubt it. (there is a way to turn it on through libtxc-dxtn)

HKEY_CURRENT_USER\Software\Wine\Direct3D\UseGLSL="disabled"

[Several suggestions were made in the bug report]

Winehq Bugzilla entry 18956 noted: fbo does not exist on the Intel i915 drivers, apparently causing Wine to tell applications that there's no 3D. H. Verbeet: It's supposed to fallback to PBuffer if FBO is not available, but PBuffer might be somewhat broken. We should probably fallback to backbuffer instead of PBuffer. [the bug was marked fixed for wine 1.1.25]

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:

noexec=off noexec32=off
/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.[or it may be fixed by now..]

Filesystem ntfs fat

A. English: Previously, we reported the file system type to be NTFS for hard disk mounts. Now we report the file system to be UNIXFS, because, e.g., the .Net 2.0 installer tries to do NTFS specific stuff on the disk, and with UNIXFS (which it doesn't recognize), it doesn't. The problem is some other apps DEPEND on seeing NTFS to work, e.g., Total War (downloading the demo now to test), and in the case of this bug, DVD Shrink. It's not using any NTFS specific features, and it's not using a 'real' NTFS mount through NTFS-3G.

A. Juliard: [to actually implement the NTFS-specific features of Windows, and call it NTFS] [is] actually the only viable option since there are apps that expect NTFS. We can't require users to change the fs type depending on which app they want to run.

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.

Themidia

Winehq Bugzilla entry 215852 Some parts of Themida's Virtual Machine checks can't be fixed in Wine by design. Ask the publisher of the game to enable Themida's Virtual Machine compatibility mode or just don't buy/support their products.

wineusr feb 10: vitamin: themedia protection. Try removing kernel32.dll and user32.dll files from system32 directory. They are not real dlls but [fakes], so Wine will continue to work just fine. [ed, you might want to use a different WINEPREFIX]

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]

Troubleshooting Dlls

While wine can use some dlls from windows, not all dlls are equal and you want to only use the bare minumum and dont forget to file a bug when Wine's version is incomplete.

You have to copy the dll to wines fake program's or system32 dir and using winecfg set it to 'native'. [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 which cause the least problems when 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]


Another way to check the dlls required using windows was mentioned in the wineusr [jul 09]: I'm sure I already have all the dll's that this program needs. Using (http://www.dependencywalker.com/) I copied all the requested dll's.

J. McKenzie pointed out a couple of traps for new players: [..] set the dlls to native using Winecfg for [your program]. Also, be prepared for all sorts of problems including Wine crashes if you [do] not use winetricks to install the dependent dlls.[Ed. so try to use winetricks and you should avoid a few problems.


Unimplemented Dlls

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

Not Correctly Registered

Sometimes if the dll is not registered successfully, you can fix this your self. Still consider filling a bug so that this can be fixed and then it will just 'work'. But here is an example of how you can fix it as shown in Winehq Bugzilla entry 3846.

"Component 'MSADODC.OCX' or one of its dependencies not correctly registered: a file is missing or invalid"

NSLW:I registered by following command [..] and the registration was successful.

wine regsvr32 MSADODC.OCX
Module:import_dll library

Other times it often is a missing file that should have been installed by the software: 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.

Winehq Bugzilla entry 19591

err:module:import_dll Library MSVCP60.dll (which is needed by L"C:\\Program Files\\Dialsoft\\The 4th Coming\\T4CLauncher.dll") not found

I've copied MFC42.DLL & MSVCP.dll in the folder System32 and now I've this message:

fixme:dsalsa:IDsDriverBufferImpl_SetVolumePan (0x139d08,0x139728): stub
wine: Call from 0x7ef98e90 to unimplemented function MFC42.DLL.6467,aborting

V. Margolen: Wine does not provide this dll. You got the old version of it. [Ed: it seems best to use winetricks when playing with dlls, as this makes sure a few of the easy traps for new users are avoided]


class {long list of numbers} not registered

Some errors show in a missing CSLID number. This is referring to a missing dll. You can track these down. Either google or use a windows computer with it in the registry and you are on your way. an example of how you can fix it as shown in Winehq Bugzilla entry 3846

err:ole:CoGetClassObject class {00000010-0000-0010-8000-00aa006d2ea4} not registered
err:ole:create_server class {00000010-0000-0010-8000-00aa006d2ea4} not registered
err:ole:CoGetClassObject no class object {00000010-0000-0010-8000-00aa006d2ea4} could be created for context 0x5

A user asked: explain how you got from CLSID err msg -> download this

The developer wrote: Sure . Searching for it in native registry shows (XP SP2):

DAO.DBEngine.35
InprocServer32 C:\WINDOWS\system32\dao350.dll ---

Then I googled for DAO redistributable.

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.

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.

Rebuilding Menu Entries

Wineusr forum feb 09 Is there some kind of command that will build a wine menu based on all the files in the standard locations (Start menu and Desktop)?

Vitamin:I've used this to rebuild menu structure:

export WINEPREFIX=~/.wine; find $WINEPREFIX/drive_c/ -name "*.lnk" -exec wine winemenubuilder '{}' \;

You can remove Menu Entries as well. There are several options with this tool, which can now associate wine software with file types. To prevent this from happening when this tool runs at wine startup Winehq Bugzilla entry 19182 notes [Jul 09] - You can set winemenubuilder.exe to disabled in the Libraries winecfg tab. [Ed it is not listed, but you can type it in] A. English noted you can: add 'WINEDLLOVERRIDES=winmenubuilder.exe=d' your environment (~/.bashrc).

Winehq Bugzilla entry 19213 noted [Jul 09] Currently the freedesktop.org menus are only deleted when (re)starting Wine. End all Wine applications, and then run an application under Wine (even notepad or winecfg) - it should update your menus then.


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.

accessing cdrom by number

Some programs appear to look through for a cdrom differently. In the application bug report Winehq Bugzilla entry 18012 a program called dvddecrypter looks for the drive differently. According to the bug: You can work around by manually creating a symlink WINEPREFIX/dosdevices/cdrom0 -> /dev/cdrom. see this thread: http://www.winehq.org/pipermail/wine-devel/2006-November/052416.html for a further discussion.

USB

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

Wine_Registry#Serial_Com_Port

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.

There are some patches on the official Wine wiki for incomplete USB support. These will not be accepted into wine in their current state, but they are a start. http://wiki.winehq.org/USB


Winehq Bugzilla entry 8783 I use a program (LG Contents Bank) to get pics from my Cell Phone. It uses a virtual serial port (those USB -> Serial converters). So, I create a link named "com1" pointing to ttyUSB0 in dosdevices.

Just like you said, I'm not able to list the serial ports on the app running over wine (An old issue, I guess). But, if edit the app's .ini file, and set manually the desired COM port, it works properly. This program you're trying to use (4DGL-WorkShop2) has also a config file (4DGL.ini, in Dep directory) and a parameter with the COM port to use ( Section [plataform], parameter port ). Maybe if you set it manually, maybe it works.

Other thing: I know this may look obvious, but your create device is really ttyUSB0 right? You can confirm this pluging it and typing "dmesg" in terminal

S. Leichter: Windows has some more registry key for com ports. Maybe the program [looks] for them too e.g.:

HKLM\Hardware\Description\System\*\*\SerialController\*
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Port
HKLM\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1\Device Parameters

USB Headsets

A user wrote: the only problem I have now is that the USB HEADSET I am using does not work properly, I can use the microphone but I can't use hear anything.

Vitamin wrote [feb 10]See this topic for how to point Wine to a different device (note you might need different device name, like a "hw:1" instead of "hw:2"). http://forum.winehq.org/viewtopic.php?t=7595 [..] [Using regedit to edit the registry] Editing the registry is the same in Wine as in Windows. Wine has its own regedit. The only difference is that the registry in Wine is a plain text file.

COM PORT

Usually with a com port it is a permissions issue. Some programs need further fixes in wine, but often if you cannot see it, it is a permissions issue. Previously you needed to add a link to the port under dos devices, but more recently it seems to auto detect ports. If desperate check that your bios has the serial port enabled, and try loging as a super user and changing the permissions to read and write for anyone on all of the serial ports (it usually reverts when you reboot):

chmod 775 /dev/ttyS*

If this fixes your problem then you know it is a permission issue and then can research how set it up with a more delicate touch.

Joystick/Gamepad

Winehq Bugzilla entry 191133 A user wrote: NFS detects the wheel twice with the same correct name of wheel. Vitamin: This is by design. Wine has 2 joystick drivers that will result in any joystick shown twice.

[Ed] 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

B. Klein Mar 09: A good way to check if Wine can access the internet is:

wine iexplore http://www.winehq.org/

Dont forget that network problems are sometimes due to a disconnected cord, plug or even a router configuration issue. Most people have done it at least once, so try and save some potential embarrassment by checking these things first.

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.


Windows Networking

Vitamin [Jan 09 wine user: As of Jan 09] Wine doesn't support m$ networking. You can open local files only. Or samba mounted remote shares. Also Wine does not implement most of remote RPC which most of m$ stuff uses to open "remote resources".


J. McKenzie Jan 09: Can you connect to the directory where this file exists through your Linux system using Samba? If you can, you can map the drive through Winecfg to appear as a local drive. Otherwise, you may have to use a VM running WindowsXP to work with this file until Wine becomes more mature. If you have programming skills and the desire, you can take this on as a project. Just remember, Wine developers cannot look at Windows source code nor can they reverse engineer Windows code. The idea is to replicate Windows functionality in a clean-room environment.

Advanced Network Software

April 09 Modifying the (Linux) networking stack via installing a (Windows) device driver is beyond Wine's scope. [A VPN program that does that, is] almost certainly not going to work in Wine, then. Winehq Bugzilla entry 18137

In some cases because of the differences in Linux networking and Windows, ie. you have a dynamic IP address. Then you may need to write a script to modify /etc/hosts for you. Winehq Bugzilla entry 21538

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. Jun 09 A. English: Wine doesn't support hardware drivers, e.g., winmodems

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

Language Troubleshooting

When using software that is not english, your menu items may look strange showing the wrong language or blank boxes. Wine can still work if you talk nice to it.

D. Kegel wineusr feb09: In the terminal, set the environment variable LANG to the desired language code; that will affect any wine jobs started in that window. Or see http://blog.radevic.com/2008/12/how-to-change-default-locale-ubuntu.html for how to set it systemwide. You might also be having a font problem, but get LANG sorted first.

[Ed for some versions of microsoft office you may need to set the richedit dll to native before installing as it installs its very own special richedit dll and relies on being able to find and use it. Also for some software you can set the font being used to one that has glyphs for your language]

P. Hampson: For me, LC_CTYPE=ja_JP.utf8 switches Wine to operate with Japanese codepage for font rendering and selection. See dlls/kernel32/locale.c for general POSIX locale to codepage mapping, and gdi32/freetype.c for nls_update_font_list which maps code pages to fonts for the Windows UI fonts which vary between countries.

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

l n -s /dev/lp0 ~/.wine/dosdevices/lpt1
e cho "test" > /dev/lp0
s udo chmod a+rw /dev/lp0
s u
c hmod a+rw /dev/lp0

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.

J. White has been working on this and posted an update to the wine mailing list http://permalink.gmane.org/gmane.comp.emulators.wine.devel/67969. He wrote: What works For Me (TM):

  1. .Most of what the TWAIN 1.8 specification defines as mandatory is now implemented. I'll document the exceptions in the code shortly.
  2. Scanning with IrfanView and Acrobat Professional seems to mostly behave.

If anyone else wants to play, I'd appreciate it


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

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox