Setting up Ubuntu (WSL) for Linux GUI Apps
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up. This does cause some problems though as everything is done on the command line. I am running Windows 10 Pro with the update installed. I'm just curious about how I might go about using this feature? If it won't work in Windows 10 natively then I can always run a Linux virtual machine to connect to the Raspberry Pi.
This is definitely possible given your current setup. Note that you also have the option of using Putty but either way, you'll need to have an X server running on the client machine, your Windows Subsystem for Linux — WSL. The client-server model of the X window system is partially what makes X forwarding so easy to pull off. All you need is an X server running on host and client. First, you'll want to make a minor config adjustment to your SSH server on the host machine your Raspberry Pi.
You can run these commands by ssh-ing into the Raspberry Pi with a sudo-capable accountor accessing the Pi directly and then opening a terminal. You can choose any text editor you're comfortable with see here for the nano text editor shortcuts. This is the main config file for the ssh server. Find and uncomment the following lines:.
You're done with your host. Now all you need to do is install an X server for Windows. There are a few options to choose from but I would go with Cygwin X which you can download here. Install it and once you run it, it should spawn a little window on your client which will be used to display the X program. You can now test that X forwarding is happening by returning to your WSL shell and running the simple command:. A simple clock should appear in the window spawned by Cygwin.
If this command isn't recognized, you may first need to install xgraphics applications on the host machine with:. X forwarding should now be enabled for you and you can now run most if not all of your Raspberry Pi's applications from Windows. You may wish to take things a step further and set things up to run an entire desktop environment from your Pi rather than just app-by-app which is what X forwarding allows.
Here are a couple common options available to you:. I had the same problem. Think of the local machine the one with the physical display as the graphics server and the remote machine as the graphics client.
Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Ask Question. Asked 1 year, 10 months ago. Active 2 months ago. Viewed 29k times.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. I searched around, and currently there are two methods suggested; installing an enhancement for Windows Subsystem for Linux and installing an XServer.
I want to know which method is the most hassle-free easy to install AND to useand which one is less memory-heavy. The short answer is you can not as WSL does not yet support this function.
I did not copy that tutorial here as it is fairly ubiquitous X over ssh and I would expect some apps simply will not work even with this technique. Installation is straight forward. As of March 17, you can simply accept the defaults. This then allowed me to run gedit and nautilus. When I want to try many of my Ubuntu bash scripts within WSL VcXsrv must be installed so zenity and yad x-windows dialog boxes are displayed for user input. I did not focus on running Unity desktop as it is useless and resource consuming.
Install VcXsrv from here on Sourceforge. Run the VcXsrv app directly, do not launch XLaunch. You should see localhost You are done! Now just run synaptic, nautilus or firefox from Bash and they should load on Win10 desktop. GUI options like this are buggy but operational. You can install ubuntu-desktopunityccsmcompiz and try to run Unity Desktop for Ubuntu. I did not try to set the "Steam" because I am still suffering rrying to run "Unreal", Good luck :.A Productive Linux Development Environment on Windows with WSL, Docker, tmux, VSCode and More
If someone knows how to run gnome-terminal on XServer instead of XTerm please share S You can add VcXsrv as a Win10 bootable. Although you will run "Steam" under "Unix" the shell is still "Windows" which allows you to launch "Steam" on "Unix" …. Here you need to go through the list of sub-keys to locate the network adapter entry that is used to connect to the Internet.
Double-click the value afterwards and set its Decimal value to 1. Double-click it afterwards and change its Decimal value to 1. To restore the key at a later point in time change it to 0 or delete the key.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up. I have a functioning Cygwin installation on my Windows 10 device a Surface 3, in case that mattersincluding a functioning Xorg windowing environment. I've just begun to experiment with with the Windows Subsystem for Linux, as well. Usually Xming is recommended, but I haven't seen any suggestions that Cygwin shouldn't work. If not, how shall I proceed? You do this by passing the option -listen tcp to XLaunch.
When you do this, it works really fine. More details in the manual. Open the "Properties" of this link, and change the target from. Xauthority from your Cygwin's home dir to your WSL's home dir. You have to start the X server with startx.
If you don't have X Windows installed, run the Cygwin setup. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Asked 3 years, 1 month ago.
How to run graphical Linux applications on Windows 10 using the Windows Subsystem for Linux (WSL)
Active 2 years, 11 months ago. Viewed 7k times. Limited output.For minimal setup, please check the followings:. Please note that X also supports changing its display number with a command-line argument.
For example, if you've set the display number to ' 1 ', you need to change the last part of the DISPLAY environment variable from " If you're using multiple WSL distros, you can use this feature to concurrently run separate GUI desktops for each one.
Are you using WSL2? More detailed information is found here. In order to check if it's properly installed, try running the following commands after launching X if your version of 'dbus-launch' doesn't support the " --exit-with-x11 " option, you can also try " --exit-with-session " option :.
When you launch a Linux GUI desktop environment such as Xfce4you don't need to worry about 'dbus-launch'.
However, if you're launching a Linux GUI app directly and getting errors about 'dbus-daemon', try running the 'dbus-launch' as mentioned above before launching your Linux GUI app. If it works, you can permanently add it to your batch file or script ex.
Screen savers and lockers are one of those essentials if you're running Linux as the main OS for your system. But WSL lives within Windows and such executables are not needed. In fact those screen savers and lockers interfere with Windows components that can actually access hardware and do the real screen and power saving. For example, while installing the Xfce4 package in Ubuntu, it automatically installs 'xscreensaver' and adds a 'Screensaver' settings shortcut.
You can remove them by executing the following command:. Removing those packages also automatically removes the shortcut. You can execute the following command to remove some of the popular screen savers and lockers for Ubuntu:. In case you forgot about the screen locker and get a black screen, don't panic! You're now ready to run your Linux GUI apps! Just make sure X is running before launching them.In MayWSL 2 was announced,  introducing important changes such as a real Linux kernel through a subset of Hyper-V features.
The architecture was redesigned in WSL 2,  with a Linux kernel running in a lightweight virtual machine environment. When introduced with the Anniversary Update on August 2,only an Ubuntu image was available. WSL is available only in bit versions of Windows 10 from version It is also available in Windows Server Microsoft announced WSL 2 on May 6, which features a completely new VM-based backend based on a subset of Hyper-V features in lieu of the prior system-call adaptation layer, planned for release through the Windows Insider program in June The technology behind Windows Subsystem for Linux originated in the unreleased Project Astoriawhich enabled some Android applications to run on Windows 10 Mobile.
Instead of wrapping non-native functionality into Win32 system calls as these prior systems utilized, WSL's initial design WSL 1 leveraged the NT kernel executive to serve Linux programs as special, isolated minimal processes known as "pico processes" attached to kernel mode "pico providers" as dedicated system call and exception handlers distinct from that of a vanilla NT process, opting to reutilize existing NT implementations wherever possible.
Though WSL via this initial design was much faster and arguably much more popular than its brethren UNIX-on-Windows projects, Windows kernel engineers found difficulty in trying to increase WSL's performance and syscall compatibility by trying to reshape the existing NT kernel to recognize and operate correctly on Linux's API. At a Microsoft Ignite conference inMicrosoft engineers gave a high-level overview of a new "lightweight" Hyper-V VM technology for containerization where a virtualized kernel could make direct use of NT primitives on the host.
Microsoft envisages WSL as "primarily a tool for developers — especially web developers and those who work on or with open source projects". LXSS Manager Service is the service in charge of interacting with the subsystem through the drivers lxss. All Linux processes invoked by a particular user go into a "Linux Instance" usually, the first invoked process is init.
Once all the applications are closed, the instance is closed. The wsl. It can list available distributions, set a default distribution, and uninstall distributions. Example using sudo command from Command Prompt.
Subscribe to RSS
An instance with elevated privileges must be launched in order to get "sudo" to give real root privileges, and allow such access. WSL 1 is not capable of running all Linux software, such as bit binaries,   or those that require specific Linux kernel services not implemented in WSL. Due to a lack of any "real" Linux kernel in WSL 1, kernel modules, such as device drivers, can't be run. WSL 2, however, makes use of live virtualized Linux kernel instances. It is possible to run some graphical GUI applications such as Mozilla Firefox by installing an X11 server within the Windows host environment such as VcXsrv or Xming although not without caveats, such as the lack of audio support or hardware acceleration resulting in poor graphics performance.
Microsoft stated WSL was designed for the development of applications, and not for desktop computers or production serversrecommending the use of virtual machines Hyper-VKubernetes and Azure for those purposes. Version 2 introduces changes in the architecture.
Microsoft has opted for virtualization through a highly optimized subset of Hyper-V features, in order to run its provided kernel and the underlying distributions, promising performance equivalent to WSL 1. For backward compatibilitydevelopers don't need to change anything in their published distributions.
The distribution installation resides inside an ext4 -formatted filesystem inside a virtual diskand the host file system is transparently accessible through the 9P protocol. WSL 2 requires Windows build or higher. Synaptic package manager running on WSL.
From Wikipedia, the free encyclopedia. Compatibility layer for running Linux binary executables natively on Windows.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. This does not work for me. I just get the standard error:.
What X server are you using? If it's Cygwin's, you will need to run it with -listen tcp as TCP connections are disabled by default. I am using the windows Xming. I get it to work and display things and it works for a bit, but it then freezes up. Aneurin Do you know why emacs cannot be resized? For other gui apps like galculator, if I resize the window, the interface will be resized. But for emacs, if I resize the border of the window, there will be a blank space between the original emacs and the new border, the content of emacs will not be resized Ooh, that's farther than I get.
When I run emacsI get a window that looks like your screen shot above, except with a blank white box where you have the main buffer and the minibuffer. The process appears to have gone into an infinite loop with the following strace :. Ditto the blank emacs window, I think this might just be emacs not getting along with Xming though. I imagine that a native X Server might be a big as, but please MS, can has? Maybe you need to reconfigure the port used by xrdp to avoid collision with the remote desktop server of Windows.
For anyone who stumbled upon xarthurx 's problem, emacs 24 and later resizes properly emacs 23 doesn't.No account, login, license server negotiation, nor payment required. Some of these you can even get running on top of WSL. On Linux, graphical programs are historically drawn by talking to a display and windowing server simply called X or X However, third-party open-source developers are awesome and have had working X servers running on top of Windows for years!
Because X can do that. No one has had time to iron out the bugs caused by the unique nature of this setup. On the X server-side, I ended up using Cygwin Xbut you should have similar luck with the much simpler vcXsrv.
Download and install the window server like any other Windows program, then find and start vcXsrv from the Start menu.
Then jump over to Bash and let it know about the new X server by running the command:. This is enough to run some of the simpler programs: Classic toys like xclockxcalcand xeyes work fine. Even some modern and classic GNOME programs will run mostly fine if you attempt to start them two—three times.
Including, most surprisingly, the gnome-control-center! The venerable xeditor and SciTE text editors also run fine. Things start to fall apart if you try to get more ambitious, though. R works until you try to plot anything, then crashes. Xemacs21 pops up a window for a fraction of a second, then crashes. The Liferea RSS reader manages to fetch feeds, but crashes when you try to look at one.
No KDE programs work — they are all completely dependent on dbus. I should mention that several of the aforementioned crashes were generic Linux segfaults and the like. I tried to look into those with gdb the GNU debuggerbut it was unable to properly start the process to be debugged — I suspect it would work on single-threaded programs, but anything graphical is likely to be multithreaded. In summary, a large swathe of programs currently fail for technical reasons that might well be fixed; another large group fail for mysterious reasons that might or might not get better and simple standalone programs, especially very old ones, mostly work.
Why, you may ask? Because I could. There are two kinds of problems that will keep Linux desktop apps from running on Windows: Problems with Windows Subsystem for Linux not being a completely faithful recreation of a running Linux kernel and the Ubuntu system. Problems with the X for Windows server not implementing everything that modern Linux programs expect. X on Bash on Ubuntu on Windows — unimaginable just two weeks ago! What unholy contraption can you get running on WSL?