VOGONS

Common searches


First post, by rien333

User metadata
Rank Newbie
Rank
Newbie

I'm trying to communicate between the X11 window manager and DOSBox, and so far I have no luck. What I'm trying to do is exactly the same as this guy http://richard.to/programming/wolfenstein-3d-ai-part-3.html, that is send keystrokes and get screen data from X11. His works shows that this is possible for DOSBox, but my efforts have led to nothing. The main problem seems to be that I can't launch DOSBox in X11 window manager, but he can, as he is using a X11 based OS. What I've tried so far is launching DOSBox (and DOSBox-x) from the XQuartz terminal, and trying to get the window ID with xdotool (a tool that is able to communicate with X11 windows http://www.semicomplete.com/projects/xdotool/). This works for all X11 applications that I launch but not for DOSBox. I tried this with XQuartz 2.7.8 - 2.7.10 (beta, only released yesterday!). I think this is because DOSBox is build for the native OS X window manager, and therefore is not able to launch in X11 modus. Could I be right in this, and is it possible to build DOSBox in such a way that it uses the X11 window manager (it's possible for Linux, so I think it is)? I am able to build DOSBox myself (although I do not know how to build with X11 support) and I've installed DOSBox via homebrew.

Reply 3 of 4, by Monotremata

User metadata
Rank Newbie
Rank
Newbie

Well Apple didn't really intend for a lot of people to use X11 when they had their nice GUI ready to go (probably why they got rid of it as well).. It was only included so people could compile and run Unix apps that didn't support the Apple GUI.

You can make DOSBox see X11 by typing these:
export CPPFLAGS=-I/usr/X11/include
export LDFLAGS=-L/usr/X11/lib
and then run ./configure.

But it still doesn't work. It works in that first example you posted because he's also running Linux, so X11 is what he's got to work with natively. You're building it on OS X, so all of the dependencies you're using to configure it are pointing it to build a native Mac app. X11 was only really included early on, when Apple was really big on promoting that it was 'Built on Unix' so people could compile unix apps that didn't natively support the Mac's window manager. It only used X11 if that was the only option, so I don't think its going to work for DOSBox, but maybe someone who knows more about the configure script can chime in. Your Mac built versions of SDL and everything else on your system are going to use the systems frameworks and libs and build you a Mac OS native app. Apple pretty much removed all support for X11 some time ago, and the third party XQuartz is all you've got letting it hang on.

Reply 4 of 4, by rien333

User metadata
Rank Newbie
Rank
Newbie

Thanks for your response! I also failed trying to do what you tried, even with a SDL version that I configured to only have x11 support, and no OS X native window manager support. I have no idea how DOSBox manages to use the native windows while I build everything without cocoa support, but maybe someone else knows a better way to build binaries without cocoa support?