building weston on ubuntu

主要看下面的链接安装:

https://wayland.freedesktop.org/ubuntu16.04.html

https://wayland.freedesktop.org/building.html

libinput的安装参考:

https://wayland.freedesktop.org/libinput/doc/latest/building.html

xserver安装

1、直接按指示安装会出现No package 'dri' found,所以需要:

find / -name "dri.pc"

把他所在目录加到PKG_CONFIG_PATH环境变量中。(有可能是我自己把这个环境变量该坏了导致的)

2、还有会出现许多头文件找不到的情况,find / -name 一下,把他添加到C_INCLUDE_PATH环境变量里就可以了。

3、/usr/bin/ld: cannot find -lxshmfence

apt search xshmfence

sudo apt-get install libxshmfence-dev

weston的安装方法跟libinput一样

出现的错误类似xserver编译链接过程中的错误

运行weston

Weston creates its unix socket file (for example, wayland-0) in the directory specified by the required environment variable $XDG_RUNTIME_DIR. Clients use the same variable to find that socket. This is provided using systemd by some distributions (Fedora, Arch since June 2012 or Exherbo). Ubuntu began providing it in Quantal. It is not provided by Gentoo.

我的XDG_RUNTIME_DIR环境变量设置好了,所以不用手动设置

$ mkdir -p ~/.config
$ cp weston/weston.ini ~/.config
$ $EDITOR ~/.config/weston.ini

If $DISPLAY is set, the weston will run under X in a window and take input from X. Run the compositor by typing:

$ weston
posted @ 2021-01-09 21:13  SuzanneHuang  阅读(517)  评论(0编辑  收藏  举报