Run Ubuntu Unity on Windows 10

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.

Ubutntu on Windows 10 logo banner

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.

  1. Open Bash on Ubuntu from the Start menu. Windows 10 bash in start menu
  2. Execute the following command in bash:
    echo "export DISPLAY=:0.0" >> ~/.bashrc
  3. 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.

  4. Now, you need to install Unity and a few helper packages. Execute the following command:
    apt-get install ubuntu-desktop unity compizconfig-settings-manager
  5. Now, type compiz in bash and it will launch Unity after a few seconds! start compiz Run Unity in Windows 10

If you can't see the mouse pointer, you need to execute compizconfig-settings-manager and enable these plugins: compiz enable plugins 01 compiz enable plugins 02

Using this trick, you can run many GUI tools including Firefox. Credits: Guerra24 @Github

29 thoughts on “Run Ubuntu Unity on Windows 10

  1. Viktor Rucký

    Holy moly!

    Reply
    1. Sergey Tkachenko Post author

      Yeah, I wonder how far we can go with this Linux subsystem :)

      Reply
  2. Dmitriy

    Pretty awesome. But will it work with LXDE, KDE or any other DE?

    Reply
    1. Sergey Tkachenko Post author

      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 :)

      Reply
  3. Spectre

    Reminded me how ugly Unity is.

    Reply
    1. Sergey Tkachenko Post author

      Just curious, which desktop environment you find nice looking in Linux?

      Reply
      1. Spectre

        Budgie and Cinnamon.

        Reply
        1. Sergey Tkachenko Post author

          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.

          Reply
  4. Rick

    Note: this takes over 2GB of space.

    Reply
    1. Sergey Tkachenko Post author

      Yeah, it is a notable amount of space.

      Reply
  5. crnjaz

    it stops after:
    compizconfig – Info: Profile : default
    it just stands there :\
    any help?

    Reply
    1. Dechlan Hillard

      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.

      Reply
      1. Daniel Harris

        Same issue here…

        Reply
        1. MDJ

          Yep, me 4th.

          Reply
          1. Andre

            Same here, me 5th.

      2. Brandy

        Yup me 6th, got same hang at: “compizinfop – Info: Profile : default”

        Reply
    2. Pedro

      Me too!
      Should have read these comments before wasting about 3 hours downloading and configuring this stuff for nothing !

      Reply
      1. Jia

        Ok,I‘m 8th

        Reply
  6. MDJ

    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.

    Reply
    1. Sergey Tkachenko Post author

      no, you need to elevate the Linux command instead.
      type
      sudo your command’
      and confirm it with your password.

      Reply
      1. MDJ

        Thanks, this did the job!

        Reply
        1. MDJ

          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?

          Reply
          1. Sergey Tkachenko Post author

            Make sure your X server software is running. Xming server etc.

          2. MDJ

            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

          3. MDJ

            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

  7. Jas

    Has anyone managed to get sound to work? surly its possible.

    Reply
  8. Linz

    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?

    Reply
    1. Sergey Tkachenko Post author

      Create a file
      /etc/dbus-1/session.d/90-unity.conf
      Paste the line

      unix:tmpdir=/tmp

      Follow further steps.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.