1

Start Process is not working when starting GUI application in WSL on Windows 10 Pro.

I am calling Start Process as follows.

(start-process
 "yekneb-exec-2" nil
 "/mnt/c/WINDOWS/explorer.exe" "\\\\wsl$\\Ubuntu\\home\\bkey1\\.emacs.d\\yekneb")

According to the Process List this is starting a process but the UI is not being displayed.

6
  • Does it work if you use a regular single forward slash instead of all those backslashes? Also, if you just try to launch the explorer.exe with start-process without the command line argument of a directory thereafter, does it work for that limited type of use? In addition, I would suggest temporarily using an output buffer such as "*OUTPUT*" instead of nil to help you troubleshoot -- then, check that output buffer for error messages.
    – lawlist
    Commented Aug 19, 2020 at 20:52
  • The following does not work: (start-process "yekneb-exec-2" nil "/mnt/c/WINDOWS/explorer.exe" "//wsl$/Ubuntu/home/bkey1/.emacs.d/yekneb"). Commented Aug 19, 2020 at 20:55
  • This does not work either: (start-process "yekneb-exec-2" nil "/mnt/c/WINDOWS/explorer.exe"). Commented Aug 19, 2020 at 20:57
  • This does not work either: (start-process "yekneb-exec-2" "OUTPUT" "/mnt/c/WINDOWS/explorer.exe"). The buffer is created but it is empty. Commented Aug 19, 2020 at 20:59
  • Dumb question, but is WSL able to run non-WSL programs? If you run that command from the WSL shell, does it work?
    – phils
    Commented Aug 19, 2020 at 22:19

1 Answer 1

2

I do not know why this works, but I figured out how to get it to work.

(let ((process-connection-type nil)) ; use a pipe
  (start-process
    "yekneb-exec-2" nil
    "/mnt/c/WINDOWS/explorer.exe"
    "\\\\wsl$\\Ubuntu\\home\\bkey1\\.emacs.d\\yekneb"))
1
  • Can anyone tell me why setting process-connection-type to nil fixed the issue? Commented Aug 25, 2020 at 0:12

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.