Hi all,
I'm running HeidiSQL in wine, and it can do ssh tunnels, but only using plink.exe. So can I create a fake plink, that is actually a linux program, that will grab the command line arguments Heidi sends and do my own ssh -L with it?
I tried just calling a bash script plink.exe but wine didn't like that. Any ideas?
Thanks!
Run linux command from wine (fake exe)
wine cmd /c /bin/ps aux should work (For exemple)
If you really need a .exe file,
test.c
Then, build it like this: i586-mingw32msvc-gcc test.c [/code]
If you really need a .exe file,
test.c
Code: Select all
#include <stdio.h>
int main()
{
system("cmd /c /bin/ps aux");
}
Sorry, no that doesn't work. It still gives a bad exe error.
Still, I now pretty much have the C program I need to execute whatever I need to execute! I can print out my SSH line at least from a .exe that runs in Wine, so thanks for the details on that.
Now, I just need to know how to get my local ssh to run from wine...Anyone?
Still, I now pretty much have the C program I need to execute whatever I need to execute! I can print out my SSH line at least from a .exe that runs in Wine, so thanks for the details on that.
Now, I just need to know how to get my local ssh to run from wine...Anyone?
Re: Run linux command from wine (fake exe)
I think the problem you are having with "bad exe" might be that you're compiling the program as a Linux executable and renaming it plink.exe.phaemon wrote:Hi all,
I'm running HeidiSQL in wine, and it can do ssh tunnels, but only using plink.exe. So can I create a fake plink, that is actually a linux program, that will grab the command line arguments Heidi sends and do my own ssh -L with it?
I tried just calling a bash script plink.exe but wine didn't like that. Any ideas?
Thanks!
You will also get a bad exe if plink.exe is a renamed shell script.
The example given by qparis uses a cross-compiler to build a windows executable from the C source.
You need either a cross-compiler or build the code on a windows machine.
Too complicated. See this: http://wiki.winehq.org/FAQ#head-a2e0e85 ... ebfefa7ce4qparis wrote:int main()
{
system("cmd /c /bin/ps aux");
}