Open wbern opened 2 years ago
I just tried using powershell and it doesn't seem to work either.
This is what I get back as result using wsl2
Hello
I have the same issue, it seems that the problem only occurs when the package is installed under the WSL2 file system.
If the package is installed under the Windows file system (/mnt/c/...
) and you try to use it in WSL2, the notifications work as expected.
Steps to reproduce: Open a WSL2 window
cd ~
mkdir test-node-notifier
cd test-node-notifier
npm i node-notifier
node
> const notifier = require("node-notifier");
> notifier.notify({ title: "Hey", message: "Hello" });
If you run the reproduction steps in a Windows path (e.g. under /mnt/c/Users/<your-username>/
) you will get the notification without issues.
Note: If I manually chmod +x on snoreToast/snoretoast-x*.exe (as per #353) the issue is fixed.
Thank you for your time.
This will probably be fixed if the permissions for the 2 binaries are updated (chmod +x) and committed again. I can open a pull request if you agree @mikaelbr.
WSL2 support via the binaries would be wonderful. I do understand there's a workaround to manually apply the execution bit, but a fix targeting WSL compatibility would be a huge win for Windows users.
It's working using WindowsBalloon on my installation (WSL ubuntu on W11)
Maybe switch WindowsToaster to WindowsBalloon for WSL installtion or use WindowsBalloon as a fallback ?
import isWsl from "is-wsl";
import notifier from "node-notifier";
if (isWsl) {
new notifier.WindowsBalloon({}).notify(
{ title: 'WindowsBalloon', message: 'Hello from WSL using WindowsBalloon' }
);
}
Hey!
I'm using wsl2 Ubuntu and integrated terminal with vscode and windows 10.
I don't get any errors but it seems I don't get any notifications? I couldn't find and previous issues about this, but is there something I need to set up? I've got the DISPLAY variable assigned to my local ip:0.0 as well.
I'm using it like this.
Thanks in advance.