wine on mac os x and x11

Questions about Wine on macOS.
Locked
Jon Christopher

wine on mac os x and x11

Post by Jon Christopher »

I have a console-only windows application which I'd like to run on OS
X. It runs, but insists on starting X11 every
time I invoke wine, even though all the app does is write to a file.
According to the the documentation
at http://www.winehq.org/site/docs/wineusr ... i-programs, wine
should not require X11 for CLI programs.

I've also tried invoking via wineconsole with no effect.

Is it possible to run a CLI program on Mac OS X w/o wine starting X11?
I'm running on Leopard, BTW.

Thanks,
Jon
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

I don't know if either of these will work...

one.. you can try compiling Wine without X11 support... see what happens.

two... you can try setting $DISPLAY to something invalid, like "export DISPLAY=:55" so that X will totally fail to launch, but then Wine may just error that X isn't running and not work at all.

worth testing out though.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: wine on mac os x and x11

Post by vitamin »

Jon Christopher wrote:should not require X11 for CLI programs.
A CLI progam doesn't mean it's not using anything that does require GUI. Lots of Wine parts (most notably ole) need to create windows. And that won't work without X.
Jon Christopher wrote:Is it possible to run a CLI program on Mac OS X w/o wine starting X11?
You'll need X at least for initial setup, or you'll endup with broken wineprefix. Then it's up to the program you are running, if it really is pure CLI or not.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

doh123 wrote:one.. you can try compiling Wine without X11 support... see what happens.
You can't. Wine will not compile with X libs.
doh123 wrote:two... you can try setting $DISPLAY to something invalid, like "export DISPLAY=:55"
Won't do anything either. It's the same as not having X. X-client (wine) can't create windows on it's own. It's what the X server is for...
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

you could package it up in Wineskin

It uses X, but it doesn't use your systems X11, it has its own built in and I go for start up time... so a command line app could launch and have command line and run with its own X server built in all in a few seconds, nothing super slow like X11.app on its own.
Jon Christopher

wine on mac os x and x11

Post by Jon Christopher »

Thanks for the suggestions, everyone. I checked out wineskin, but
that didn't really fit the bill,
as what I'm trying to run is a command-line program (comskip.exe, in
fact), and I need to pass
a command-line argument to comskip, which is the filename of the file
to process.

The windows command would be something like

comskip.exe --ini="/path/to/file.ini" /path/to/recording.mpg

where recording.mpg is going to vary. This script will be invoked
from a python script, which is
in turn triggered by an applescript triggered from EyeTV.

With wineskin, there didn't seem to be a way to alter the command line
argument(s) from another script.

I did some more poking around, and found a reference to ttydrv in the
wine.conf manual page:

format: """GraphicsDriver""=""<x11drv|ttydrv>"""
default: "x11drv"
Tells Wine which graphics driver to use. Normally you'd want to use
x11drv (for X11). In case you want to run programs as text console/TTY
only without having Wine rely on X11 support, then use ttydrv.

It *looks* like I should just be able to set wine to use ttydrv and
not have it fire up X. However, I don't have a wine.conf file (or a
~/.wine/config file). I tried creating one containing the relevant
commands, but invoking wine still started up X11.app.

So, can anyone tell me how to properly set up wine with ttydrv on a mac?

Thanks,
Jon
Charles Davis

wine on mac os x and x11

Post by Charles Davis »

On 1/22/11 11:10 PM, Jon Christopher wrote:
The windows command would be something like

comskip.exe --ini="/path/to/file.ini" /path/to/recording.mpg

where recording.mpg is going to vary. This script will be invoked
from a python script, which is
in turn triggered by an applescript triggered from EyeTV.
Surely, there's a Mac program that skips commercials. Why bother with
Wine at all? Whenever there's a native version, our advice is usually
"use the native version instead of mucking around with Wine."
I did some more poking around, and found a reference to ttydrv in the
wine.conf manual page:

format: """GraphicsDriver""=""<x11drv|ttydrv>"""
default: "x11drv"
Tells Wine which graphics driver to use. Normally you'd want to use
x11drv (for X11). In case you want to run programs as text console/TTY
only without having Wine rely on X11 support, then use ttydrv.

It *looks* like I should just be able to set wine to use ttydrv and
not have it fire up X. However, I don't have a wine.conf file (or a
~/.wine/config file). I tried creating one containing the relevant
commands, but invoking wine still started up X11.app.
That's because they don't exist anymore. Ever since Wine got registry
support, all of Wine's settings have been stored in the registry. Also,
the TTY driver is gone, too, so setting the GraphicsDriver won't do you
any good.

What we really need is for someone (me, possibly) to finish up
quartzdrv. This is the driver that uses native Mac OS X graphics instead
of X11 graphics. With quartzdrv, you won't need X11 anymore.

Chip
Alexandre Julliard

wine on mac os x and x11

Post by Alexandre Julliard »

"vitamin" <[email protected]> writes:
You'll need X at least for initial setup, or you'll endup with broken
wineprefix.
No you don't. Initial setup doesn't require X.

--
Alexandre Julliard
[email protected]
James McKenzie

wine on mac os x and x11

Post by James McKenzie »

On 1/21/11 11:39 PM, Jon Christopher wrote:
I have a console-only windows application which I'd like to run on OS
X. It runs, but insists on starting X11 every
time I invoke wine, even though all the app does is write to a file.
According to the the documentation
at http://www.winehq.org/site/docs/wineusr ... i-programs, wine
should not require X11 for CLI programs.

I've also tried invoking via wineconsole with no effect.

Is it possible to run a CLI program on Mac OS X w/o wine starting X11?
Short answer: NO. There is NO such thing as a Windows CLI program btw.
They all require starting the Windowing system in some fashion or
another. However, you CAN try using DOSBOX or something like it and try
running the program there. Otherwise you will have to use X11.

James McKenzie
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Re: wine on mac os x and x11

Post by doh123 »

Jon Christopher wrote:Thanks for the suggestions, everyone. I checked out wineskin, but
that didn't really fit the bill,
as what I'm trying to run is a command-line program (comskip.exe, in
fact), and I need to pass
a command-line argument to comskip, which is the filename of the file
to process.

The windows command would be something like

comskip.exe --ini="/path/to/file.ini" /path/to/recording.mpg

where recording.mpg is going to vary. This script will be invoked
from a python script, which is
in turn triggered by an applescript triggered from EyeTV.

With wineskin, there didn't seem to be a way to alter the command line
argument(s) from another script.
you could set the command line flags to be what you want... but if they change all the time it would be a problem. You'd have to have your python script edit the Wineskin wrapper Info.plist on the Program Flags line to be what you wanted, then have the python script just run the app. Luckily if you needed to edit the Info.plist from another script it should work, its a simple string entry for all command line arguments... and just takes python editing a text file.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: wine on mac os x and x11

Post by vitamin »

Alexandre Julliard wrote:No you don't. Initial setup doesn't require X.
I guess that got fixed, with few minor exceptions. These keys weren't created on Wine running without X:

Code: Select all

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\Video\{e063c400-197a-42de-a161-28310bbe59f2}\0000]
[HKEY_USERS\S-1-5-4\Keyboard Layout\Preload]
OP, then you should be able to run a pure CLI program, assuming it's not using anything sophisticated, like OLE. However, what you trying to use (video processing program) surely will use OLE, and that's where it will break. Thanks to MS for creating such a wonderful masterpiece that can't work without ... windows.
Locked