Ubuntu 22.4 LTS 源码编译Tigervnc

1、安装前的依赖软件准备

-- make version > 3.10
apt install cmake      

-- tigervnc依赖         
apt install zlib1g-dev libpixman-1-dev  libjpeg-turbo8-dev libfltk1.3-dev

apt install libsystemd-dev libavutil-dev

apt-get install gettext  libffmpeg-ocaml-dev libgmp-dev libnettle-dev  libgnutls28-dev libxi-dev

-- Xorg xserver使用
apt install xutils-dev 

以上依赖在cmake中都有检查,不存在会提示。

2、Xorg Xserver

软件仓地址:

Files · server-1.20-branch · xorg / xserver · GitLab

tigervnc 1.14的官方指导安装文档是基于 server-1.20-branch的,在这个版本以上的高版本都不存在configure.ac

3、安装tigervnc的官方指导构建

Building the TigerVNC Server (Xvnc) is a bit trickier. Xvnc is typically built
to use the X11 shared libraries provided with the system.  The procedure for
this is system-specific, since it requires specifying such things as font
directories, but the general outline is as follows (this procedure assumes
that the viewer has already been built, per above.)

  > cd {build_directory}

    If performing an out-of-tree build:
  > cp -R {source_directory}/unix/xserver unix/

  > cp -R {xorg_source}/* unix/xserver/
    (NOTE: {xorg_source} is the directory containing the Xorg source for the
    machine on which you are building TigerVNC.  The most recent versions of
    Red Hat/CentOS/Fedora, for instance, provide an RPM called
    "xorg-x11-server-source", which installs the Xorg source under
    /usr/share/xorg-x11-server-source.)

  > cd unix/xserver/
  > patch -p1 < {source_directory}/unix/xserver{version}.patch
    (where {version} matches the X server version you are building, such as
    "120" for version 1.20.x.)
  > autoreconf -fiv

  > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
      --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
      --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
      --disable-config-hal --disable-config-udev --disable-dri2 --enable-glx \
      --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
      --with-xkb-path=/usr/share/X11/xkb \
      --with-xkb-output=/var/lib/xkb \
      --with-xkb-bin-directory=/usr/bin \
      --with-serverconfig-path=/usr/lib64/xorg \
      {additional configure options}
    (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
    9 and recent Fedora releases.  You should customize it for your particular
    system.  In particular, it will be necessary to customize the XKB
    directory.)

    For a regular, in-tree build:
  > make TIGERVNC_SRCDIR={source_directory}
    If performing an out-of-tree build:
  > make TIGERVNC_SRCDIR={source_directory} TIGERVNC_BUILDDIR={build_directory}
    (NOTE: Use absolute paths for source_directory and build_directory)

值得一提的是,前几步是在构建xserver,直到make TIGERVNC_SRCDIR={source_directory}才是构建tigervnc。

该操作指导,是一个in-tree和out-of-tree是指xserver。xserver的构建是放在tigervnc源码的unix/xserver中构建,还是使用单独的目录构建,上文中的{build_directory}就是用用来存在xserver的代码,和tigervnc对xserver的扩展。

如果使用in-tree方式构建,直接将xserver源码copy到tigervnc的源码的unix/xserver目录中。

如果使用out-of-tree方式构建,则新建文件夹{build_directory},并创建Unix目录,将xserver源码copy到Unix目录中,将tigervnc对xserver的扩展hw也copy到Unix下。此种方式,在构建tigervnc时,需要在make命令中指定tigervnc的源码目录和新建的{build_directory}。

4、将构建后的二进制打包

在tigervnc源码目录中,执行make tarball,可将构建的所有文件打到一个tar包中。

5、不包含xserver的构建

在构建时,如果直接在tigervnc中执行构建,只能构建x0vncserver,xvnc不能得到构建,因为其依赖xserver,xvnc是tigervnc的核心。正如其介绍:

Xvnc - the TigerVNC Server for Unix. Xvnc is both a VNC server and an X

server with a "virtual" framebuffer. You should normally use the vncserver service to start Xvnc.

x0vncserver - an inefficient VNC server which continuously polls any X

display, allowing it to be controlled via VNC. It is intended mainly as a demonstration of a simple VNC server.

相关推荐
打不了嗝 ᥬ᭄41 分钟前
Linux的权限
linux
落幕1 小时前
C语言-进程
linux·运维·服务器
深度Linux1 小时前
C++程序员内功修炼——Linux C/C++编程技术汇总
linux·项目实战·c/c++
风静如云2 小时前
OpenBMC:BmcWeb定义service
linux
leoufung3 小时前
VIM FZF 安裝和使用
linux·编辑器·vim
bugtraq20214 小时前
XiaoMi Mi5(gemini) 刷入Ubuntu Touch 16.04——安卓手机刷入Linux
linux·运维·ubuntu
xmweisi4 小时前
【华为】报文统计的技术NetStream
运维·服务器·网络·华为认证
CodeWithMe4 小时前
[ Vim ] 常用命令 and 配置
linux·编辑器·vim
DC_BLOG5 小时前
Linux-GlusterFS进阶分布式卷
linux·运维·服务器·分布式
yourkin6665 小时前
TCP...
服务器·网络·tcp/ip