Closed CherryDT closed 2 years ago
Looks that you don't have the zenity
program installed.
That may be the case but why would users of my software have to install some additional tool to see a message displayed? VBScript is installed by default on Windows. I didn't know what zenity even was until now. If zenity isn't by default available on popular Linux distributions then maybe it shouldn't be the (only) tool used by this library for Linux...
It seems other solutions with wider compatibility exist, such as script-dialog, apparently a shell script that will use not only zenity but also other options as available and fall back to a text-mode dialog if no viable option was found, providing the same level of reliability as your VBScript solution provides for Windows. It would be great if dialog
could use that script-dialog.sh
script (or some custom but similarly reliable solution) on Linux. If that's not possible for some reason, it would be nice to at least see some warning in the readme file that on Linux it will work only for some users, and for others an ENOENT exception may be thrown and should be handled in some meaningful way. (Although I'm not sure what way that would be, to be honest. It makes me feel like using this on Linux is just not an option if you want to have others use your software afterwards... which is a bit unexpected.)
I ran
npm i dialog
, then I used this code:Result:
WSL (Ubuntu 20.04).
DISPLAY
variable is set.