Passing arguments from the command line to apps on Mac OS X (Darwine and CrossOver)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

There's a Windows application I've been running (called "WinBUGS.exe") on an
intel Mac OS X (ver. 10.5.5) using both Darwine and CrossOver Pro. My
application runs fine under Darwine and also under CrossOver. However, in
spite of being able to run these applications using either platform from the
command line, I still cannot pass arguments to the application. What I want
to do is simply invoke the application from the command line and pass it an
argument.

>From the command line, I am able to use "open WinBUGS.exe" to run my
application. If I try to open the application and pass it the command "/PAR
script.txt", it does not work:

$ open WinBUGS.exe '/PAR script.txt'
The file /PAR script.txt does not exist.

It parses '/PAR script.txt' as a file name rather than an argument. I tried
the following variation but it results in the same error:

$ open -a WinBUGS14 '/PAR script.txt'
The file /PAR script.txt does not exist.

When I try passing a simpler argument, just a file name, I see that it's
interpreted as a separate file to be opened:

$ open -a WinBUGS14 'script.txt'

This usually results in both applications opening separately -- it opens
WinBUGS14.exe, and then opens script.txt in a separate notepad or editor
window, suggesting that this is not passed as an argument to the
application.

In summary: I can run the application I am interested in using 'open' under
either CrossOver or Darwine, but not through the CrossOver 'wine' command
directly. However, I cannot pass it any arguments. Does anyone know how to
do this?

Any help on this would be greatly appreciated!  Thanks, --Yarden


==
P.S. Here are some other variations I've tried on the above, but none
worked:

I also tried using the wine command that comes with CrossOver directly, but
it results in these errors:

$ pwd
$ /Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin
$ ./wine --cx-app winbugs14.exe
_X11TransOpen: Unable to find transport for tcp
_X11TransOpen: Unable to find transport for tcp
_X11TransOpen: Unable to find transport for tcp
_X11TransOpen: Unable to find transport for tcp
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.

(The errors are actually repeated -- this is verbatim.)

I looked at my DISPLAY variable to see if I can correct the second error:

$ echo $DISPLAY
/tmp/launch-UTIOMG/:0

I tried this setting:

$ export DISPLAY=:0.0
:0.0
$ ./wine --cx-app winbugs14.exe
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.

(Again the error was printed twice.)

I tried this variation too, but it led to the same error:

$ ./wine C:\\Program\ Files\\WinBUGS14\\WinBUGS14
 ./wine C:\\Program\ Files\\WinBUGS14\\WinBUGS14
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.

My X11 server was running at all times. I also tried restarting it. I also
tried running the X11 server along with CrossOver in the background, and the
X11 server by itself, but these different conditions made no difference.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-users/attachments/20081013/61903f94/attachment.htm 


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux