256ColorsWorkarounds

If your application says that it needs 256 colors even though you have millions of colors enabled, you may be able to get it working with the workaround below.

Use Xnest. Once you have installed Xnest, you should be able to

Xnest -display :1; env DISPLAY=:1 wine name_of_application 

If that doesn't work, try

Xnest -display :1 -depth 8; env DISPLAY=:1 wine name_of_application 

If you have more than one display, or are using :1 for something already (e.g. vnc or another Xnest session), simply use :n, where n is any unused display number, in place of :1.

Of course you can use just plain 'ol X:

cd "~/.wine/drive_c/Program Files/My game/" 
xinit /usr/bin/wine "my game.exe" -- :1 -ac -depth 8
  • In case you can't use Xnest (-depth 8 fails on my system), or xinit (no permissions to launch X server as regular user), you may need to use VNC with -cc 3 -depth 8
  • With vnc4 if you use

vnc4server :2 -cc 3 -depth 8 -geometry 640x480 -localhost 

then issue the command

xvnc4viewer :2 

you can have a virtual 8bpp display (in the example a 640x480 window with the virtual screen would appear). This is known as PseudoColor mode in the VNC documentation.


I had to use the following command to start Xnest:

Xnest :1 

and since I use bash as my shell, I had to leave out the command 'env' when running the wine command. I.e. my complete command became

Xnest :1; DISPLAY=:1 wine name_of_application 

Hope this helps anyone who is struggling! Neil Greenwood neil.greenwood.lists _AT_ gmail _DOT_ com

256ColorsWorkarounds (last edited 2008-04-30 01:24:10 by nathan.n)