如何在 Ubuntu 16.10 的 Unity 8 上运行老式 Xorg 程序
Unity Mir Ubuntu
![](/data/attachment/album/201701/05/145126obztblftt6bqc16h.jpg)


随着 Ubuntu 16.10 的发布，Unity 8 越来越吸引到了更多人的关注。这是因为在这个大家最爱的 Linux 发行版的最新版本中可以体验其带有的试验性桌面。桌面发行版是人们最熟悉的 Unity 环境，但有一点点不同。它不再使用 X11 图形技术，Ubuntu 的开发者选择了另一种截然不同的方式。


原来，Unity 8 用的是 Mir，这是 Ubuntu 为了在 Linux 上提供显示服务而做出的努力。这项技术已经在 Ubuntu phone 和平板上大量使用，但是这次新版是我们在桌面环境上第一次见到 Mir 。


这项技术相当新颖，结果是没多少 Linux 程序能运行在它之上。不是所有，那也是大部分的程序设计在 Xorg 和 X11 之上运行。如果你想要试试在 Unity 8 上运行这些程序，你肯定会为在 Unity 8上确实能够运行之前的 Xorg 程序而高兴。接下来是如何做！


### 登录进 Unity 8


![](/data/attachment/album/201701/05/145153zkitdd5vv8cuuk1v.jpg)


Unity 8 在 Ubuntu 16.10 上是一个可选会话。在使用之前只须牢记一件事情：它不会加载 AMD 的图形驱动，Intel 的同样不会加载。唯一支持的图形驱动是 Nvidia 的开源驱动。要用 Unity 8 的话，只要像往常那样启动 Ubuntu，然后，在登录进去之前，点击用户名上面的 Ubuntu 图标，选择 Unity8 选项。如果万事顺利的话，这个新的、试验性的桌面环境将会加载。


**注意**： Unity 8 非常新而且不稳定，自行承担使用风险。


### 安装 Libertine


Xorg 程序（例如 Firefox 等）确实能在 Unity 8 上使用，在使用之前需要一点小调整。在 Mir 桌面上用终端打开 Libertine ，在 Scopes 窗口中点击终端图标就能完成。一旦打开，输入你的密码。接下来，输入以下的命令：


![](/data/attachment/album/201701/05/145213bcfz9jcc5fiipxfu.jpg)



```
sudo apt install libertine-tools libertine-scope libertine

```

当这些程序完成安装后，点击并拖动 Scopes 窗口以刷新内容。然后，在面板上点击来启动 libertine。


### 新建 Xorg 容器


打开 Libertine，就可以新建一些（应用）容器了。这些容器很特别，因为它们能让基于 X11 的 Linux 程序在 Mir/Unity 8 桌面上的容器之中运行。另外，如果需要支持 32 位应用，勾选“i386 multiarch support”复选框。否则，什么都不要动（或者输入名字和密码），点击“OK”。


![](/data/attachment/album/201701/05/145305e6botbsqqbzoqtob.jpg)


在这之后，这个 Xorg 容器就准备好，可以使用了。在 Libertine 找到它并启动。删除也很容易，右键点击容器，选择“删除”选项。


**注意**：每一个 Xorg 容器有 500 MB的最大内存限制。所以多个容器是有必要的。


### 安装软件


![](/data/attachment/album/201701/05/145349snakfoapr0kksqns.jpg)


在 Libertine 容器中安装软件有两个方法。第一种是允许用户启动容器后选择“输入包名或者 Debian 文件”，这意味着用户可以在软件中心或者终端找到一个软件的名字，然后在 Libertine 中输入它来安装。也可以指定特定的 DEB 文件来安装，可以在Libertine LXC 容器中直接搜索安装包。


**注意**：Unity 8 非常新，一些程序或许不能在 Libertine 里加载或者完全安装。


### 结论


Unity 8 展现了不少的新特性，它现代、时髦，而且比之前任何一个 Unity 迭代版本都快。唯一限制它的就是使用率。事实是大部分用户更乐意选择实用的应用程序，而不是一个别致新颖的桌面环境。某种程度上来说，使用 Libertine 能解决这个问题，但它不会永久有效。早晚有一天，Canonical 都需要自行移植这些程序或者向社区求助来彻底解决这个问题。




---


via: <https://www.maketecheasier.com/use-old-xorg-apps-unity-8/>


作者：[Derrik Diener](https://www.maketecheasier.com/author/derrikdiener/) 译者：[ypingcn](https://github.com/ypingcn) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 组织编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![](https://www.maketecheasier.com/assets/uploads/2016/10/unity8-feature-image.jpg)

With the release of Ubuntu 16.10, Unity 8 has been getting more attention than usual. This is because the latest release of everyone’s favorite Linux distribution comes with an experimental desktop to play with. This desktop is the Unity environment most are used to, with a twist. It no longer is making use of X11 graphics technology and instead the makers of Ubuntu have gone a different way.

In its place, Unity 8 is using Mir, Ubuntu’s answer to calls for a better-performing display server on Linux. This technology has been in heavy use already on the Ubuntu phone and tablet, but this new release is the first time we’ve seen it on the desktop.

This technology is new and shiny. As a result, not a lot of established Linux programs can work on it, as most, if not all, of these tools are built to work with Xorg and X11. However, if you’ve been wanting to try out Unity 8, you’ll be happy to know that it is indeed possible to get these old Xorg apps working in Unity 8. Here’s how!

## Logging Into Unity 8

Unity 8 comes as an optional session in Ubuntu 16.10. There’s one key thing to keep in mind before using it: it will not load with AMD graphics drivers, or Intel for that matter. The only supported graphics drivers as of now are the open source Nvidia drivers. To use the Unity 8 session, start up Ubuntu like normal. Then, before logging in, click the Ubuntu icon above your username and select “Unity8.” If all goes well, the new, experimental desktop will load.

**Note**: Unity 8 is very new and unstable. Use at your own risk.

## Installing Libertine

Xorg programs (like Firefox, etc.) do work in Unity 8; they just need a little tweak before anything will run. Start off by opening a terminal on the Mir desktop. This is done by clicking the terminal icon in the “scopes” window. Once open, enter your password. After that, enter the following commands:

sudo apt install libertine-tools libertine-scope libertine

When these programs finish installing, click and drag the scope window to refresh it. Then, click on the top-hat to launch libertine.

## Creating Xorg Containers

With Libertine open, it’s time to create some containers. These containers are special, as they allow X11 based Linux programs to run inside of a container on the Mir/Unity 8 desktop. Additionally, check the “i386 multiarch support” box for 32bit support. Otherwise, leave everything as is (or give it a name and password), and click OK.

From this point on, the Xorg container is ready to use. Look for it in Libertine and launch the container. It also should be noted that containers can be erased by right-clicking on them, then selecting the “Delete” option.

**Note**: each Xorg container has a maximum memory limit of 500 megabytes, so multiple containers may be necessary.

## Installing Software

Software is installed in Libertine containers in two ways. The first way allows for users to launch the container and select “Enter package name or Debian file,” meaning it is possible to find the name of a program in the software center or terminal and enter it into Libertine to install it. It is also possible to specify a .DEB package file for installation. It is also possible to search for the package directly within the Libertine LXC container.

**Note**: Unity 8 is very new, and some programs may not load or fully install with Libertine.

## Conclusion

Unity 8 shows a lot of promise. It’s modern, sleek, and faster than any iteration of Unity that came before it. The only thing that is holding it back is adoption. The simple fact is that most users would rather have programs that work instead of a fancy, fresh desktop. To an extent, using Libertine solves this issue, but it won’t work forever. Sooner or later Canonical will need to start porting programs on their own or reach out to the community as as whole to make this happen.

Our latest tutorials delivered straight to your inbox