公告
财富商城
积分规则
提问
发文
2019-03-15 08:20发布
不美不萌又怎样
I have a windows program running on Linux using WINE.
How can I call Linux shell commands from the windows program?
I love the Far Commander, which does run under wine, so I set up these two scripts:
C:\windows\xt.bat
start /unix /usr/bin/xterm -e %*
C:\windows\xdg.bat
cd >C:\windows\command\mypwd start /unix /etc/init.d/winopen.sh %*
/etc/init.d/winopen.sh
#!/bin/sh PWDF=`winepath -u 'C:\windows\command\mypwd'` fromdos $PWDF xdg-open $(winepath -u $(cat $PWDF)/$1)
Now I can type on the Far command line:
xt top xdg SomeDocument.PDF
xt top
xdg SomeDocument.PDF
and get results in the Linux environment.
Try (where yourprogram is the linux/unix program you want to execute in wine)
ln -s /path/to/yourprogram /path/to/wineprefix/drive_c/windows/system32/yourprogram
That is how I have gotten java working.
The shell script that was listed on WineHQ FAQ can be slightly modified, eg like this:
#!/bin/bash WFILE=$(echo -E $2) FILE=$(wine winepath $WFILE) $1 $FILE
The rest works just as described in the FAQ.
最多设置5个标签!
I love the Far Commander, which does run under wine, so I set up these two scripts:
C:\windows\xt.bat
C:\windows\xdg.bat
/etc/init.d/winopen.sh
Now I can type on the Far command line:
and get results in the Linux environment.
Try (where yourprogram is the linux/unix program you want to execute in wine)
That is how I have gotten java working.
The shell script that was listed on WineHQ FAQ can be slightly modified, eg like this:
The rest works just as described in the FAQ.