headless question, and IPC question
Alex Villacís Lasso
a_villacis at palosanto.com
Thu Sep 29 17:47:56 CDT 2005
Ken Larson wrote:
> Alex -
> Thanks for the good info. As far as not needing an X server, when I
> try to run my exe under wine without one, I get:
> wine: Could not load graphics driver 'x11drv'.
> Make sure that your X server is running and that $DISPLAY is set
> but yes, the regedit /? trick works fine.
> I wonder if there is something obvious I'm missing in the compilation
> and linking of my EXE? Where might I look to make sure it doesn't
> think it needs a display.
> My exe and the wrapped DLL do use sockets and I know that sockets in
> windows often need a window handle to do their thing...
> My DLL is a true DLL as far as I know, I currently link to it using
> the accompanying .lib, but I think I could link dynamically to it.
It seems that you are using VisualC++ to compile your app. There is a
wizard to create a new application, in which the user can select to
create a "console app", one that runs from main() instead of WinMain().
Try creating such a skeleton app and running it from Wine. Once you
succeed, you can start adding source files from your previous app into
the skeleton console app. This would be the "blind" way of doing this -
I don't remember much about the options available for creating a console
app out of an arbitrary project in VisualC++. I know for a fact that
console apps run without an X server in Wine, because I have just tested
cl.exe from MS VisualStudio in a raw text console in Linux, after
resolving a missing dll.
If the above *still* does not solve your problem (even after upgrading
to the latest Wine CVS), you might try using a virtual framebuffer X server:
(output of yum xorg-x11-Xvfb):
Name : xorg-x11-Xvfb
Arch : i386
Size : 1.6 M
Repo : updates-released
Summary: A X Windows System virtual framebuffer X server.
Xvfb (X Virtual Frame Buffer) is an X server that is able to run on
machines with no display hardware and no physical input devices.
Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does
not open any devices, but behaves otherwise as an X display. Xvfb
is normally used for testing servers.
You can try installing and configuring this X server. It will not output
anything or use a console, but will behave otherwise like a valid X
server. Then you should point the DISPLAY environment variable to this X
server, and this will keep your app happy. However, I *strongly*
recommend to try and create a true console-mode app before trying the
virtual-framebuffer X server, because it will consume precious memory.
Alex Villacís Lasso
More information about the wine-devel