As you might be knowing, Windows 10 Anniversary Update comes with the Bash on Ubuntu feature. This is an app which provides access to the full features of the Linux terminal with a basic set of tools, which can be extended using the default Ubuntu package manager. It is similar to a virtual machine with Ubuntu installed, but it is a native implementation of the Linux subsystem on Windows, according to Microsoft, so it works much faster. Now imagine if you could run Unity, the default desktop environment of Ubuntu, on Windows 10! Yes that is possible. Let's see how it can be done.
Before proceeding, you need to enable Bash on Ubuntu. Just follow this simple tutorial.
How to enable Bash on Ubuntu in Windows 10
Next, you need a third party display server which will render GUI apps running in Ubuntu on Windows 10. The built-in Ubuntu X Server won't start if you install it. A good X Server implementation for Windows is the Xming app. To install it, follow the steps mentioned in this article:
How to run GUI apps in Ubuntu on Windows 10
Now you will end up with both Xming installed and Bash on Ubuntu enabled. After that, do the following.
- Open Bash on Ubuntu from the Start menu.
- Execute the following command in bash:
echo "export DISPLAY=:0.0" >> ~/.bashrc
- Edit the file /etc/dbus-1/session.conf. This can be done using the console editor nano. Type this:
nano /etc/dbus-1/session.conf
Find the following line:
unix:tmpdir=/tmp
And change it to this:
tcp:host=localhost,port=0
Press Ctrl+O to save the file and then Ctrl+X to exit nano.
- Now, you need to install Unity and a few helper packages. Execute the following command:
apt-get install ubuntu-desktop unity compizconfig-settings-manager
- Now, type compiz in bash and it will launch Unity after a few seconds!
If you can't see the mouse pointer, you need to execute compizconfig-settings-manager and enable these plugins:
Using this trick, you can run many GUI tools including Firefox. Credits: Guerra24 @Github
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Holy moly!
Yeah, I wonder how far we can go with this Linux subsystem :)
Pretty awesome. But will it work with LXDE, KDE or any other DE?
XFCE will work. It is tested.
LXDE should work as well.
KDE will not work.
If I have recognized you properly from your email, you can ping me in Skype to discuss it :)
Reminded me how ugly Unity is.
Just curious, which desktop environment you find nice looking in Linux?
Budgie and Cinnamon.
Yeah, Cinnamon is awesome.
I also tried budgie, but didn’t like the idea of Windows 8 – like charms bar to change settings. The DE is way too bareboned by itself, require apps from Gnome or/and Cinnamon.
Note: this takes over 2GB of space.
Yeah, it is a notable amount of space.
it stops after:
compizconfig – Info: Profile : default
it just stands there :\
any help?
Having issues, Stops after: “compizinfop – Info: Profile : default”
I have waited for around an hours, having high hopes, I got to my PC and it was still there :'(…
Not a Linux/Unix expert yah know, so if any one can help that would be great…
Dechlan.
Same issue here…
Yep, me 4th.
Same here, me 5th.
Yup me 6th, got same hang at: “compizinfop – Info: Profile : default”
Me too!
Should have read these comments before wasting about 3 hours downloading and configuring this stuff for nothing !
Ok,I‘m 8th
So no answer to this? Running Unity is no longer possible?
After I change “unix:tmpdir=/tmp” to “tcp:host=localhost,port=0”, hit Ctrl + O and then Enter to save the modified file with original name I get an error message which says that permission to write was denied. How do I fix this? I already tried running “Bash on Ubuntu on Windows” as administrator.
no, you need to elevate the Linux command instead.
type
‘sudo your command’
and confirm it with your password.
Thanks, this did the job!
However, now I’m stuck at the last step: http://i.imgur.com/CCOPRIW.png
My laptop has both Intel and Nvidia video cards. I usually keep Intel one disabled as it tends to make visual artifacts from time to time. I now enabled it but this didn’t change anything so this isn’t the case. Any suggestions?
Make sure your X server software is running. Xming server etc.
Thanks for trying to help. I missed this step at first and now I fixed that but it seems that it’s just not meant for me to run Ubuntu in Windows out of the box—I’m stuck at the last step again but this time with a different error message: “sudo: unable to resolve host ” http://i.imgur.com/9rHwYWj.jpg
See Fix unable to resolve host error in Bash on Ubuntu in Windows 10
It failed to automatically edit hosts file so I added a line 127.0.0.1 DESKTOP-GAREQGQ myself. Nevertheless I still can’t run Ubuntu, now I don’t get any error message but the console window is still stuck: i.imgur.com/8bgym9V.jpg
Has anyone managed to get sound to work? surly its possible.
Hello , I can’t find “/etc/dbus-1/session.conf”, there only have a directory — “/etc/dbus-1/session.d”
And then ,what should i do?
Create a file
/etc/dbus-1/session.d/90-unity.conf
Paste the line
Follow further steps.
Hi Sergey,
Thanks for the posted information. I made “90-unity.conf” in the session.d but my Compiz still does not work. Apparently, the plugins do not load. See the below
compiz (core) – Info: Loading plugin: core compiz (core) – Info: Starting plugin: core compiz (core) – Info: Loading plugin: ccp compiz (core) – Info: Starting plugin: ccp compizconfig – Info: Backend : ini compizconfig – Info: Integration : true compizconfig – Info: Profile : default compiz (core) – Info: Loading plugin: composite compiz (core) – Info: Starting plugin: composite compiz (core) – Fatal: No composite extension compiz (core) – Error: Plugin initScreen failed: composite compiz (core) – Error: Failed to start plugin: composite compiz (core) – Info: Unloading plugin: composite compiz (core) – Info: Loading plugin: opengl compiz (core) – Info: Starting plugin: opengl compiz (core) – Error: Plugin ‘composite’ not loaded. compiz (core) – Error: Plugin init failed: opengl compiz (core) – Error: Failed to start plugin: opengl compiz (core) – Info: Unloading plugin: opengl compiz (core) – Info: Loading plugin: resize compiz (core) – Info: Starting plugin: resize compiz (core) – Fatal: No composite extension compiz (core) – Fatal: No composite extension Segmentation fault (core dumped)