-
Notifications
You must be signed in to change notification settings - Fork 58
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
Show Icon when application runs in WSL environment #88
Comments
It's possible to detect if it's running Ubuntu on Windows -- that's a good idea, and I didn't even think about that. I have some ideas on what to do... I'm swamped working on so many other things right now, it might be a while to do this, but it will happen. |
Is this even possible? Last I knew, WSL couldn't run a GUI without a dedicated X server. Am I missing something? |
Not missing anything -- possible to detect, but not sure if possible to show the icon ;) |
I just tried, and WSL says that it can't find an X11 display server. You can -- however -- run it with For example, this is possible through WSL... Linux version: java -jar /mnt/c/my-app.jar Windows version: java.exe -jar C:\my-app.jar This has the advantage of being able to stay inside the WSL terminal window, but execute the Windows version of the app. @dorkbox I'm not sure you can do better than this until the UI components are directly accessible, which is not really your bug to sort. :) |
:D thanks for figuring this out @tresf! I'll leave this issue open (and even include this somehow in the readme) so if anyone else has this question, there is an answer. |
Thnaks for caring. I have not tried myself by now but I understand there are X servers for Windows available. Would that work? |
Installing an X server should work. See: https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/ |
I've used XMing on Windows for years and it works OK, but to do as you're describing the XMing source code would have to be modified to work with the native system tray. I still don't see this as a problem that can be solved inside a Java library. :) |
Any input helps! Thanks alot for caring. I installed
Please feel free to close this issue. |
New release 3.15, now includes a windows native tray icon implementation - which might solve the issue with the SwingTray type. edit: clarity on which issue it might solve. |
I've now added comments to the readme regarding this issue. @tresf, thank you for your help/feedback with this. |
Hi,
I'm not a JAVA devloper myself. However, I'm using a JAVA console application that uses your library to display a TaskTray icon. I'd love to use Ubuntu on windows (WSL) rather than
cmd
to start the software. Difference when using this application in the WSL environment is the missing TrayIcon.Can your lib somehow detect it's running Ubuntu on Windows and use the taskbar?
Do you have an idea?
The text was updated successfully, but these errors were encountered: