https://www.reddit.com/r/bashonubuntuonwindows/comments/j2i5ix/fully_working_kde_on_bash_on_ubuntu_2004/ Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts [ ] Log InSign Up User account menu 92 Fully Working KDE on Bash on Ubuntu 20.04!!! [renderTimi] WSL2 Close 92 Posted by8 months ago Archived Fully Working KDE on Bash on Ubuntu 20.04!!! [renderTimi] WSL2 KDE on Ubuntu on Windows!!! That's right, you heard me correctly, and the proof lies right here before your very eyes, absolutely no GIMPing necessary! All those who wish to pay for Windows just so they can bypass it and run free Linux distributions and apps non-natively, rejoice! I have KDE (from the kubuntu-desktop package) working pretty much 100% just like on a native setup! No need for fancy custom Linux kernels, no flashy custom WSL distributions, just good old Ubuntu from the Windows store and a bunch of free downloads to supplement it. Obviously it doesn't have direct bluetooth access and whatnot, but I think I've got just about everything I could need for now and everything WSL 2 currently permits. As you can see, I've got high resolution graphical output with VcXsrv and working audio with Pulseaudio, the microphone works too (many setup guides recommend disabling the Pulseaudio microphone capability, but it appears that some recent Windows update fixed this issue). There's no software rendering warning in the KDE system tray because I disabled the Windows native OpenGL rendering option and allow WSL 2 to perform its own direct hardware rendering, also the authentication system in KDE works properly and allows me to change system settings or install apps and updates because I'm using Genie to run a fake SystemD environment (without this you would have to run it as root). With SystemD running, you need to set up NetPlan to manage your internet connection, there's all sorts of fantastic tips on this and other WSL issues found here. To get Muon Package Manager running and authenticating properly without undesirable workarounds, I had to edit the file org.kubuntu.qaptworker3.policy in the PolicyKit actions folder and add in "allow_any" flags for all the actions, because it appears that WSL doesn't log you in as an active or inactive user (try the "w" or "who" commands, I get empty output), but apparently you do get counted under the "any" category. I might possibly need to do a similar fix for other apps, but I haven't noticed any similar such issues yet. If you follow the high DPI graphics tips in the second link I posted, I recommend adding GDK_SCALE=2 to your /etc/environment file to compensate. You could set it in your own .bashrc, but then it won't be picked up by programs that run in their own environments. Edit: Upon further testing, it's actually best to set it in both files. Add "GDK_SCALE=2" to etc/environment and "export GDK_SCALE=2" to your .bashrc. There's also a GDK_DPI_SCALE variable you can set, but I didn't personally find any need or benefit to doing so in my case. If you find the KDE system tray icons to be ridiculously tiny because of the high DPI settings, you can fix that by first resizing and re-docking the associated panel, then editing the appropriate config file as detailed here. This more or less covers my basic setup, there might be a tweak or two I'm forgetting. A last couple of tips, if you find Pulseaudio refusing to start up again after shutting it down, go to your Windows user home directory, enter the .pulse directory and the daughter directory beneath it, then delete the little pid file you see there (it's normally supposed to be deleted by Pulseaudio on exit, but won't be if you shut it down by closing its command window). You can avoid this issue altogether by shutting down pulseaudio.exe with the ctrl+C key combo. Also make sure to run VcXsrv in one of the single window modes when running the Plasma desktop, if that's what you choose for graphics output as I did. Conversely, run in multi-window mode outside the Plasma environment. You could start two X-servers on channels 0 and 1 and have a WSL session running with each one to get the best of both worlds. Special thanks to Arkane Systems for making Genie, Steve Brown for his amazingly useful tips, and all the countless others who took the time and effort to put important info out there on the web for stoners like myself to muck around with. Edit: Also my apologies, if possible could the mods please edit my post title to read "Fully Working KDE on Bash on Ubuntu 20.04 on Windows 10!!!" Edit 2: Another big tip: to run KDE apps outside Plasma that require authentication without running as root, you will need a graphical authentication agent such as polkit-kde-agent-1 to be loaded in the background. Plasma does this automatically when you start it up, but outside that environment you must do it manually. I can't speak for other authenticators, but the one provided by KDE requires SystemD to be running, which I accomplish as mentioned above using Genie. I believe you will also need to run it with genie -s to start a fake SystemD login, but I haven't fully tested the effects of genie -c. Edit 3: I personally recommend installing the mesa-utils package if you don't already have it. This will provide you with the llvmpipe graphics driver, which has some limited capabilities within WSL for leveraging your graphics card to speed things up (Correction! It's entirely CPU based). Once installed, and with your X-server loaded and set to allow direct OpenGL rendering as opposed to indirect rendering through Windows, run the graphical program "glxgears" and verify that the gears are turning smoothly. It appears that WSL doesn't currently have much if any support for hardware acceleration with OpenGL, so you should set your KDE Plasma window compositor to run on the Xrender backend rather than OpenGL 2 or 3.1. You'll miss out a few OpenGL desktop window transition effects, but the MASSIVE boost in performance should be well worth it. Sadly using indirect rendering via Windows isn't an option here because X11 forwarding only supports OpenGL 1.4 and lower; if you try to go for that option with Plasma's windows compositor set to run on OpenGL, you'll most likely just cause your X-server to crash and shut down. I'm about to start experimenting with X2Go as a substitute for X11 forwarding and see what kind of OpenGL support and other capabilities it provides, if anyone else has tips or suggestions on how to get optimal hardware acceleration, please don't hesitate to let me know! Update: Steve Brown has posted another excellent guide which covers many of the steps I've recommended in this post, you can find it here , covering instructions for getting Plasma running beautifully on a Surface Pro 3 and of course Windows 10 devices in general. I personally recommend further security precautions when setting up your firewall rather than opening it up to all public networks, and if you want any advice on this matter then please feel free to contact me or look for the many existing guides on setting up a secure firewall with WSL. 57 comments share save hide report 99% Upvoted This thread is archived New comments cannot be posted and votes cannot be cast Sort by best View discussions in 1 other community [renderTimi] level 1 8 months ago The screenshot you took is pure genius 12 Share ReportSave level 1 8 months ago whats the performance like, ignoring linus of course. I know I'm mean :) 4 Share ReportSave level 2 Original Poster8 months ago * edited 8 months ago It's running super well so far! I haven't disabled KDE's unneeded services yet like the Bluetooth daemon etc but that will probably make it run even better. No significant lag or latency issues as far as I can tell, I think it runs better with LIBGL_ALWAYS_INDIRECT unset and letting WSL 2 take care of its own OpenGL hardware acceleration. Running VcxSrv without the high DPI tweak should make it even better if necessary at the cost of reduced resolution, also I could enable access to my full 16GB of RAM rather than the WSL default of 12GB, but I like reserving some RAM for Windows just in case WSL or something else crashes. 4 Share ReportSave level 1 7 months ago This is fantastic - and as the author of the Most Useful article, thank you for the references :) I've now set this up and actually, it works considerably better on my Surface Pro 3 than the Gnome environment I wrote the article about. Why? Because fractional scaling works properly under KDE which it doesn't on Gnome (in WSL2 - it does on native). Seems I may be a KDE Plasma convert... And setting it up was pretty easy - except I had to install LightDM because I couldn't see how (if it's even possible) to get SDDM to deal with XDMCP? Having done this again I can see my article needs some updates, particularly around Genie because the repository has moved. Also, I'm not entirely sure the libdaemon stuff is needed anymore? 4 Share ReportSave level 2 Original Poster7 months ago * edited 7 months ago Sir, may I say firstly what an honour it is to hear from you directly, and secondly I can't tell you enough how thrilled I am that you saw this post and that it actually had an impact on your own experience. I would love to collaborate with you further to get this thing working just like a native Linux experience, I have some experimenting I plan to be doing to see what I can do about hardware acceleration and I plan to make a followup post if my experiments are successful. I must admit that I don't actually have that much experience with Linux and am mostly learning as I go, as you might notice from my post's misspellings of Systemd and Netplan with incorrect capitalization. I was forced to use Linux back in grad school and used to SSH into the school's network all the time to do stuff, but having it running on my own desktop is a real gamechanger and I've been on a learning binge recently both with Linux and Windows. So that having been said, I must admit I know very little about SDDM, XDMCP and other display manager issues. I don't even have GNOME desktop currently installed and used KDE on the office desktop back in grad school, although I have a few GNOME utilities I installed manually and might try out the whole thing just for a learning experience. I know that on my school desktop it used to load into KDE by default and then you'd get a login screen where you could pick the user, whereas I'm loading it from the console and just get a PolicyKit prompt for my password rather than a login screen. When I lock the screen or go to logout I get the SDDM prompts, but not when I start it up. I only have one user account in my setup right now so I don't know if adding more accounts would make a difference, I haven't tried it yet. If you know anything about getting SDDM to load its login prompt and allow you to select the user regardless of who starts it up from the console, any advice or guidance would be terrific. On a slightly unrelated note, I've recently been thinking that not only is WSL a great tool for Windows users who want to access Linux apps and utilities without dual booting or running a slow virtual machine, but it's also a great tool for Linux users in general. The hardware support for Linux is terrible whereas practically everything made for Windows works without a hitch as soon as you plug it in. Passing a standardized set of virtualized hardware to Linux via WSL means everyone gets the same results when they do the same steps, so setups can be automated and any needed hacking and whacking can be done from user-friendly standardized guides such as yours. You get to run Linux in a sanitized environment where it can be safely and conveniently started up, shut down and restarted on demand very quickly, and given the lack of hardware support for Linux compared to Windows, you might even be able to get better than native performance! As far as my experiments are going, I was about to try out X2Go and see how well that works out, but I just read the the RDP protocol now supports indirect hardware rendering up to OpenGL 4.6, which means we might be able to get KDE working blazing fast with the full set of OpenGL 3.1 windows compositing effects! So I'm about to start trying it out and I'd love to hear any suggestions or thoughts from you on the matter. 3 Share ReportSave level 2 Original Poster7 months ago Update: Sorry to spam you but I should let you know about some important progress on my end. I had no clue what you were referring to when you mentioned XDMCP, I had always thought it was just an alternative X11 protocol considered less secure than the normal one. After consulting your guide once again I finally understand, and now it makes sense what the DM stands for. TIL how to login remotely and get a GUI greeting screen, this is precisely one of the things I was trying to figure out! So I did some research and now I understand your concerns with SDDM. The head programmer in charge of that project specifically says he doesn't want anything to do with the XDMCP protocol and will neither support nor allow it, so it definitely seems like a no-go. As per your guide's recommendations, I installed the lightdm display manager. I managed to get to the login screen, but it wouldn't let me get any further than that. After more fiddling around I discovered that the lightdm launch settings for KDE Plasma need updating, and once I made the necessary tweaks it loaded up beautifully. Only thing was that I was now missing sound even though sound was working when I launched from console. After another few hours of fiddling and futility looking for help on forums meant for problems experienced by native Linux users, I figured out that the issue was a simple matter of putting the PULSE_SERVER variable inside the appropriate Plasma launch script. I had assumed the variable would be picked up from having it both in my etc/environment file and in my ~/.bashrc, but I guess that's only the case when launching from console. KDE Konsole had also shown that my PULSE_SERVER variable was set, but in retrospect this must have been due it launching a separate console session inside the terminal from within Plasma, independent of Plasma's own variable settings. Regarding your notes on Genie, I definitely think they need some updating. Not only has the repository changed but it seems with the latest versions you don't need to do any manual editing once it's installed. I was lucky enough to grab a copy while the pre-compiled Ubuntu package was available on the old repository, all I can say is that the version I have worked right out of the box and you just need to complete supplementary steps like setting up Netplan. In addition, the commands for starting up and shutting down WSL have changed. wsl.exe --shutdown will shut down the whole machine even if you specify a distribution after the command, causing WSL to renew its IP address upon restart, whereas wsl.exe -t will only shut down the desired distro. I'm not sure if this is specifically an Ubuntu thing but I don't even need to type ifconfig to get my virtual network IP address, I can just type "hostname -I" and it returns the address plain and simple with no parsing required. I think now I can get back to seeing about RDP and indirect OpenGL rendering, but that will have to wait until tomorrow at the earliest. :) 3 Share ReportSave Continue this thread level 2 Original Poster7 months ago * edited 7 months ago Also yes there is the issue with Genie now that the repository has moved. Last I checked they don't have an official Ubuntu package on the new repo and you have to build it manually, I really hope someone gets that sorted out soon because I much prefer to have my package manager deal with everything and avoid accumulating clutter on the HD. Edit: I didn't notice but it seems that editing the original post with my iPhone caused some corruption issues in the code and I only just noticed and fixed. Be sure to check out the screenshot if you haven't seen it! 2 Share ReportSave level 1 7 months ago WHOOOOOOAAAAAAA I'VE TRIED TO DO THIS FOR MONTHS. THANK YOU. 3 Share ReportSave level 2 Original Poster7 months ago There's still plenty more work to be done to make this all feel like an authentic native Linux experience as much as possible, and progress has been very good so far, so stay tuned! 3 Share ReportSave level 1 8 months ago Nice work 2 Share ReportSave level 1 8 months ago Great guide! Followed it and is working flawlessly on my end. Thanks man! 2 Share ReportSave level 2 Original Poster8 months ago I should mention just for completeness that the KDE package I'm using is kubuntu-desktop, although I'm sure a similar setup will work for others. It's amazing how much functionality is already built into WSL out of the box. 3 Share ReportSave Continue this thread level 1 CentOS 8 8 months ago Ubuntu 20.04 ah too bad i'm on CentOS 8 on WSL. idk what's the difference but i can recall having decent X server performance on Ubuntu. using X server on CentOS on WSL is a pure, distilled pain 2 Share ReportSave level 2 Original Poster8 months ago You should also be able to get it working just as nicely with Wayland, RDP or VNC protocols for graphics, I believe the latter two also handle sound. You can also try Jack as an alternative to Pulseaudio if the latter's not working out for you. If you're missing packages for SystemD, NetPlan etc I'm sure you can easily download everything you need for any major distribution. 3 Share ReportSave level 1 8 months ago That screenshot with Linus's video is gold 2 Share ReportSave level 1 7 months ago If you run kcmshell5 qtquicksettings And set the backend to software you'll probably get a speed boost for plasmashell. It's not as fast as opengl, but almost always faster than llvmpipe . 2 Share ReportSave level 2 Original Poster7 months ago Right now I have it set to auto, I like the idea of being able to at least potentially access OpenGL effects in cases where the system thinks it's not too demanding. Performance is very smooth for me, should I manually force software rasterizer mode? 2 Share ReportSave level 1 7 months ago Does baloo indexes users folders on windows without any problems? 2 Share ReportSave level 2 Original Poster7 months ago Great question! I'll try to have an answer for you as soon as I get a chance to check. 2 Share ReportSave level 2 Original Poster7 months ago Ok I have the answer, Baloo indexer does indeed work on mounted Windows files from within WSL! I had a heck of a time trying first to get it to index the whole computer (/), then I tried just indexing / mnt/c, but in the first case it indexed around 54 files before sputtering to a complete halt, and in the second it didn't even index a single file. However I created a test text file in Windows and selectively indexed it with "balooctl config index ", and it appeared in search when I used Dolphin even though I was initially browsing in my WSL home drive. If anyone knows what's causing baloo indexing to have such hiccups, please do let me know, because other people (running native Linux) have claimed to index their entire filesystems in a fraction of the time that mine stayed at 0 files while choking on /mnt/c before I gave up. I excluded OneDrive from the indexing just in case but maybe there was something else like iCloudDrive that was also getting in the way, haven't had a chance to test it to that extent. 2 Share ReportSave Continue this thread level 2 Original Poster6 months ago * edited 6 months ago Hey I have an update on Baloo file indexer, it seems to be working great now, I will do some further testing and let you know when it's all done. As noted previously, I was having serious issues with Baloo and also Plasma not shutting down cleanly. I believe both problems were caused by having dbus set to automatically launch at login before initializing genie. If you're launching genie then I highly recommend not to have dbus running beforehand, and possibly other services might interfere as well. dbus and all the other standard system services will launch when you start genie anyhow so there wasn't any need for me to have it manually launched anymore. 1 Share ReportSave View Entire Discussion (57 Comments) More posts from the bashonubuntuonwindows community Continue browsing in r/bashonubuntuonwindows Subreddit Icon r/bashonubuntuonwindows This is a Windows Subsystem for Linux (WSL) Subreddit where you can get help installing, running or using the Linux on Windows features in Windows 10. 18.2k Members 160 Online --------------------------------------------------------------------- Created Apr 11, 2016 Join [left][center][right][upvotes] [line] Top posts september 30th 2020Top posts of september, 2020Top posts 2020 helpReddit AppReddit coinsReddit premiumReddit gifts aboutcareerspressadvertiseblogTermsContent policyPrivacy policyMod policy Reddit Inc (c) 2021. All rights reserved Back to Top