Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a windows program running on Linux using WINE.

How can I call Linux shell commands from the windows program?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
920 views
Welcome To Ask or Share your Answers For Others

1 Answer

With newer Wine versions (tested with Wine 1.7.38), you can run a Linux program from within Wine in the following way (here to launch gedit, as an example):

wineconsole cmd

...and from that wine console:

start /unix /usr/bin/gedit

If you want to launch a Linux program directly from within a Windows-application, the following line did work for me:

cmd /c start /unix /usr/bin/gedit

To test this, you can call directly on your Linux console this:

wine cmd /c start /unix /usr/bin/gedit

One important thing to Note: the program you want to start needs to have the executable bit set, otherwise calling it from Wine will fail!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...