在uk 14.04上体验wayland

wayland是x服务器的替代,要运行图形界面的程序,现在即使没有x在后台运行我们一样可以通过wayland来完成,在14.04下可以通过一些步骤尝试运行wayland并在其上运行gtk的程序1、设置环境变量,修改~/.bashrc文件,添加如下内容

WLD=/opt/test/usr (下面我们自行编译的文件都放到这里)

2、抓取最新的wayland和weston(weston是wayland的一个窗口合成器)及依赖库源码

git clone git://anongit.freedesktop.org/wayland/libinput
git://anongit.freedesktop.org/wayland/wayland
git://anongit.freedesktop.org/wayland/weston

依次在这些源码目录下分别运行以下命令

./autogen.sh --prefix=$WLD
make
sudo make install

3、抓取最新的gtk库及其依赖

git clone git://git.gnome.org/glib
git clone git://git.gnome.org/pango
git clone git://git.gnome.org/atk
git clone git://git.gnome.org/gtk+

同样使用下面的命令编译安装

./autogen.sh --prefix=$WLD
make
sudo make install

现在就可以运行了,在命令行中进入如下步骤

export GDK_BACKEND=wayland
weston&
gtk3-demo

可以看到如下结果

消灭零回复

啥感觉?更快还是更炫?