Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not doing anything on WSL 2 with burnt toast installed #85

Open
noahgaertner opened this issue Jun 14, 2020 · 22 comments
Open

Not doing anything on WSL 2 with burnt toast installed #85

noahgaertner opened this issue Jun 14, 2020 · 22 comments

Comments

@noahgaertner
Copy link

When I run sleep 6 like in the readme.md, no burnt toast output is displayed. Burnt toast does work when the New-BurntToastNotification command is run in both PowerShell 5 (default windows) and PowerShell 7 (the new open source one), which means it isn't a executionpolicy issue.

@ammgws
Copy link
Contributor

ammgws commented Jun 14, 2020

Does it still do nothing if you minimise the window while it's sleeping?

@noahgaertner
Copy link
Author

Yes, it does. I'm using the new windows terminal, if that matters at all.

@noahgaertner
Copy link
Author

I just also tested it in the ubuntu app and it also doesn't work, so it shouldn't be an emulator issue

@ammgws
Copy link
Contributor

ammgws commented Jun 14, 2020

There were recent changes made regarding WSL, to rule those out perhaps try an older release such as https://github.com/franciscolourenco/done/releases/tag/1.14.5 and see if it still reproduces?

@noahgaertner
Copy link
Author

I just tried the old version, it does the same thing.

@noahgaertner
Copy link
Author

Is the issue perhaps that done needs to be running a custom command? I do not have one set at the moment.

@ammgws
Copy link
Contributor

ammgws commented Jun 14, 2020

For troubleshooting you could try setting a custom command to see if it even tries to run it or not. I don't have access to WSL2 so can't try it myself. Can you see if it works on WSL1?

@noahgaertner
Copy link
Author

Okay, so I just tried the normal command in WSL 1 by cloning a large git repo (sleep doesn't work in wsl 1 apparently) and it still did not work. I'll try a couple custom commands tomorrow morning.

@archilkarchava
Copy link

The issue for me was this chunk of code uname -a | string match --quiet --regex Microsoft on lines 57 and 204. Unlike WSL1, WSL2 comes bundled with a real linux kernel, here's the output of uname -a: Linux DESKTOP-RDMPIAF 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux. We could try matching both microsoft and Microsoft, but WSL2 can use custom kernels without microsoft included in the name.

@ammgws
Copy link
Contributor

ammgws commented Aug 25, 2020

There's an active issue on the WSL issue tracker about detection but I can't find it at the moment.

@franciscolourenco
Copy link
Owner

Does this improve detection for custom kernels? https://stackoverflow.com/a/43618657

@archilkarchava
Copy link

Here's fork with a quick fix https://github.com/archilkarchava/done, custom kernel detection is not supported.

@ammgws
Copy link
Contributor

ammgws commented Aug 25, 2020

Found the thread: microsoft/WSL#423

@eugene-babichenko
Copy link
Contributor

eugene-babichenko commented Sep 3, 2020

I did a simple fix for that in #88, but a better way may be to rely on WSL specific variables being set (for instance, WSLENV). I am not sure it will work for custom kernels though.

❯ env | rg WSL
WSLENV=WT_SESSION::WT_PROFILE_ID
WSL_DISTRO_NAME=Ubuntu-20.04
WSL_INTEROP=/run/WSL/25821_interop

@franciscolourenco
Copy link
Owner

@noahgaertner can you check if this is fixed in v1.14.10?

@franciscolourenco
Copy link
Owner

@noahgaertner ping

@noahgaertner
Copy link
Author

@noahgaertner ping

My laptop is currently with {manufacturer} to get fixed, I'll take a look at this when I get it back.

@franciscolourenco
Copy link
Owner

@noahgaertner

@Pitasi
Copy link

Pitasi commented Apr 20, 2021

@franciscolourenco i'm using ubuntu on wsl2 and nothing seems to happen to me too.

$ echo $__done_version
1.16.1

$ uname -a
Linux DESKTOP-XXX 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

launching __done_windows_notification test notif manually seems to be working fine.

I'll be happy to provide more info since this plugin was really part of my workflow on linux (and thanks btw!) 😁

@Pitasi
Copy link

Pitasi commented Apr 20, 2021

hah, I may have found my issue.

I have a X org server running (VcXsrv) so that I can use xorg apps in windows, and the problem seems to be here:

done/conf.d/done.fish

Lines 84 to 85 in 8fd2bc5

else if type -q xprop
and test -n "$DISPLAY"

that returns true.

Swapping this if with the windows one at

else if uname -a | string match --quiet --ignore-case --regex microsoft
is sufficient, personally tested.

@std4453
Copy link

std4453 commented Jan 25, 2022

WSL systems might have Linux desktop utililies like notify-send that come installed with other packages, but Linux systems should not (normally) contain 'microsoft' in their uname -a, so I think it might be preferrable to put WSL-specific checks before the others.

@nadarian
Copy link

I am also having problems to get a notification from WSL. Even though the __done_windows_notification test notif command works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants