📜 ⬆️ ⬇️

Ubuntu Unity desktop shell launched in Windows 10 environment

It's easy to do, look through the short instructions and try to do the same.




Canonical, which is responsible for the development of Ubuntu and Microsoft , announced the inclusion of bash and the main Ubuntu toolkit in Windows 10 earlier this year . You could start exploring new features of Windows 10 with Ubuntu elements back in April, starting with update 14316 . In this update, a WSL layer was added to Windows 10 that translates Linux system calls into Windows system calls. As a result, in a Windows environment, it became possible to deploy a full-fledged Ubuntu Linux toolkit without emulation and virtualization. The final integration will be completed with the release of the Anniversary Update in August.
')
In April of this year, experts learned how to run Ubuntu desktop applications with a graphical interface in the Windows 10 environment. Reddit user w2qw found a way to install VIM and Firefox. Now the user Github with the nickname Guerra24 was able to launch the Ubunu Unity desktop shell in the Windows environment.

A successful launch requires several steps. The fact is that X servers like vcxsrv or Xming on Windows 10 run without any problems. But most applications need dbus service, which by default does not work. Because of this, desktop applications like Firefox or virt-manager running on the Linux subsystem “crash” already at startup or shortly after launch. Unity does not work directly either - dbus is also required for the shell.

The user ShaRose with Reddit managed to “get” dbus. Initially, he (or she) wanted to try to install the virt-manager in order to be able to administer the qemu-server in the Windows environment without the need to work from a virtual machine. And the dbus server, which is required for virt-manager to work, managed to “start”.

To install, you need a “clean” Windows 10 with integrated Ubuntu tools. If all this is already available, you need to complete just three steps:

1. Install the X server. Both vcxsrv and Xming work fine.

2. Add DISPLAY =: 0.0 to bashrc: This can be done as follows:

echo "export DISPLAY =: 0.0" >> ~ / .bashrc

After checking, it turns out that desktop programs that require “X's” to work, function normally.

3. Now we repair dbus. The problem with dbus is that it requires unix sockets, which bash for Windows does not yet support, to work here. Therefore, all that is needed is to “explain” dbus how to work with tcp.

It's pretty easy to do this. In /etc/dbus-1/session.conf, we replace unix: tmpdir = / tmp with the string tcp: host = localhost, port = 0 . That's all.

To do this, run the following command:

sudo sed -i 's /.*/ tcp: host = localhost, port = 0 /' /etc/dbus-1/session.conf

Firefox and virt-manager work fine. Chrome, unfortunately not. But the most important thing is that you can now start installing Unity in WSL.

Unity will not work right away, you need to install ccsm (CompizConfig Settings Manager), and then run VcXsrv using XLaunch (now it’s the only X server running Unity). After launching in the appeared window, we replace the display number by 0. All other settings are left as default.

Now we start ccsm where we activate Unity plug-in. When displaying the menu, the user will see several options, you need to select Copy to Texture plugin. After that, at the bottom of the Window Management settings, we activate all but one of the plug-ins - the Grid. This plugin must be inactive.

Now we exit ccsm, and we start compiz in bash. Several error messages will be displayed, but Unity should boot normally.


Is it still Windows or already Ubuntu?

In this environment, you can run only programs whose icons are on the panel. You cannot start the command line in Unity, so we open bash again in Windows, repeat the display operation and start gnome-terminal. Now there is a command line icon, and you can use it.



In addition to Unity, you can run xfce4. In this case, you only need to perform the first step in “repairing” dbus, the second step only applies to Unity, here it is not needed. Once the dbus starts up in the Windows environment, you can run xfce4, although the shell is not very stable.

Source: https://habr.com/ru/post/305372/


All Articles