0

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
    Aug 19 '20 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").
    – Ben Key
    Aug 19 '20 at 20:55
  • This does not work either: (start-process "yekneb-exec-2" nil "/mnt/c/WINDOWS/explorer.exe").
    – Ben Key
    Aug 19 '20 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.
    – Ben Key
    Aug 19 '20 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
    Aug 19 '20 at 22:19
1

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?
    – Ben Key
    Aug 25 '20 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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