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.

phils
  • 48,657
  • 3
  • 76
  • 115
Benilda Key
  • 159
  • 8
  • 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"). – Benilda Key Aug 19 '20 at 20:55
  • This does not work either: (start-process "yekneb-exec-2" nil "/mnt/c/WINDOWS/explorer.exe"). – Benilda 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. – Benilda 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
  • If I run the following command directly from the WSL command prompt all is well: /mnt/c/WINDOWS/explorer.exe. The problem is Emacs specific. – Benilda Key Aug 19 '20 at 23:17

1 Answers1

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"))
Benilda Key
  • 159
  • 8