Hi All,
Is there any way to invoke an Window Application (for eg say calc.exe) from a Unix Server. I think we might be needing a Windows X Server running. I am not sure how to invoke an application from the unix server. Any help on this.

Regards,
Ahamed.

Dani AI

Generated

There are two different problems hidden in the original question and the replies: (A) run a Windows binary on the Unix machine itself, so its UI appears on the Unix side; or (B) tell a separate Windows machine to start a Windows program. The tools and trade‑offs are not the same. and hinted at the VM/compatibility approaches, and ’s note on Wine’s stability is relevant if you want local execution.

If you want the app to run locally on the Unix box (so you can interact with it), run it under a compatibility layer or inside a VM. Wine is the lightweight path for small GUI tools; a VM is more reliable for heavier or deeply Windows‑dependent applications. Example (after installing Wine):

wine /path/to/calc.exe

If you use a VM, connect to the VM’s desktop using RDP/VNC/SPICE so the GUI is visible.

If you want to invoke an application on a remote Windows host from Unix (no local Windows runtime), use a remote‑exec method: SMB/RPC tools, WinRM, scheduled tasks or an SSH service on the Windows side. Example approaches:

# winexe (Samba-based)
winexe -U 'Administrator%Password' //192.168.1.10 'C:\\Windows\\System32\\calc.exe'

# Impacket/wmiexec
wmiexec.py Administrator:Password@192.168.1.10 'cmd /c start calc.exe'

# Python + pywinrm
from winrm import Session
s = Session('192.168.1.10', auth=('Administrator','Password'))
r = s.run_cmd(r'C:\Windows\System32\calc.exe')
print(r.status_code, r.std_out.decode())

Important cautions and troubleshooting: remotely started GUI apps often run in a non‑interactive session (Session 0 or service context) and will not appear on a logged‑in desktop. To see a GUI, use RDP/RemoteApp or run the program inside a user session on the Windows box. Ensure the right service/port is open (SMB 445, WinRM 5985/5986, RDP 3389), the account has sufficient rights, and test by confirming the process with Task Manager or tasklist. If automation rather than UI is the goal, consider creating a scheduled task or a small Windows service to run the executable.

Recommended Answers

All 3 Replies

If you intend to run calc.exe ON the Unix server, you'll need some sort of emulation/translation software first. Assuming that your Unix server is capable of executing Linux binaries, one program that comes to mind is VMWare Server. It's free, you don't need an X11 environment to run the server program, and you can connect to it from any Linux or Windows client. qemu can also work in a similar fashion over VNC, although its performance is generally below VMWare's.

Alternatively, you can run X11 on the server and use Wine to run it in real time. You could then connect to the server either through an ssh tunnel, or through a remote desktop environment (like VNC).

Or you can use Wine to run a small application like calc.exe.

Wine has recently come a very long way. Version 1.0 brought new levels of usability that I hadn't expected from them (I half-assumed that it might someday may minor improvements but that its stability would never be really usable with larger scaled applications -- glad I was wrong!). The latest version is 1.1.5 which you can grab at http://www.winehq.org.

Bill

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.