mviereck / runx

Provide X server on MS Windows with cookie authentication.
MIT License
87 stars 14 forks source link

Doesn't detect VcXsrv installed into C:\Program Files (x86)\VcXsrv #5

Closed OhadRau closed 3 years ago

OhadRau commented 3 years ago

Hi! First of all, really cool script! I was trying it out on my machine and noticed that I got an error:

runx ERROR: No X server found.
Please either install X server VcXsrv:
  https://sourceforge.net/projects/vcxsrv
or install Cygwin with packages xinit and xauth to provide XWin:
  https://www.cygwin.com/ 

I looked into what the script was doing and realized my VcXsrv installation was in C:\Program Files (x86). It's a pretty easy fix but wanted to put up an issue for this in case anyone bumps into a similar issue. I can submit a quick patch to check that directory in a sec, but wondering if there's a better way to go about checking for the executable in Windows?

mviereck commented 3 years ago

I can submit a quick patch to check that directory in a sec

It would be nice if you would do that! I have some hurdles to run tests on MS Windows, so if you apply a patch and check if it works flawlessly, that would be great. There might be issues due to the whitespaces in the path that need to be escaped well.

but wondering if there's a better way to go about checking for the executable in Windows?

Maybe, but I have no idea. I am not very familiar with Windows, though.

mviereck commented 3 years ago

Current check:

  [ "$Vcxsrvexe" ] || Vcxsrvexe="$(command -v "$(convertpath subsystem "C:/Program Files/VcXsrv/vcxsrv.exe")")"

Ideally it will just work adding one line:

  [ "$Vcxsrvexe" ] || Vcxsrvexe="$(command -v "$(convertpath subsystem "C:/Program Files/VcXsrv/vcxsrv.exe")")"
  [ "$Vcxsrvexe" ] || Vcxsrvexe="$(command -v "$(convertpath subsystem "C:/Program Files/VcXsrv (x86)/vcxsrv.exe")")"
mviereck commented 3 years ago

I've added that line myself yet. Could you please try out if it works?