How can I configure Emacs, such that I am able to compile files remotely on a Windows machine, while Emacs is running under Linux? I am using tramp via the smb method to edit files on the Windows machine, but I could not get remote compilation to work until now.

  • I used Cygwin to run sshd in the VirtualBox VM. For some reason I couldn't convince Cygwin's sshd to accept my RSA keys, but password authentication worked fine and the whole setup worked reliably more or less.
    – wvxvw
    Mar 25, 2015 at 8:47
  • I thought it should work without resorting to Cygwin somehow. Nevertheless if no other solution pops up, I will try that approach.
    – Martin
    Mar 25, 2015 at 9:07

2 Answers 2


Disclaimer: I don't use MS Windows

Tramp's smb method is able to start processes on a remote MS Windows machine via winexe. Install it locally on your Linux machine, and adapt tramp-smb-winexe-program if necessary. See also the Tramp manual (info "(tramp) Remote processes").

  • I tried using winexe some time ago, but could never get to run properly. As it seems not to be maintained and it also doesn't show up in the standard distribution repositories (in my case Debian), I had the impression, that this approach is not recommendable.
    – Martin
    Mar 25, 2015 at 10:18
  • Well, I believe there were attempts to include winexe into Samba 4, but this didn't happen. I would be really happy to use something which is supported by Samba, but I don't know of any alternative. I would integrate it into Tramp, if existing. Mar 25, 2015 at 12:45

You can give my package (ppcompile) a try, if there is a way to run a ssh service on Windows, so that files can be rsync'ed, and remotely compiled.

  • Thanks for the recommendation. I tried it out, but couldn't get it to work so far. I filed an issue in the issue tracker on Githib with the details.
    – Martin
    Mar 16, 2020 at 9:55
  • Sorry to bother you, I'll look into it if I have the time, this weekend I guess.
    – whatacold
    Mar 16, 2020 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.