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.

相关推荐
古希腊数通小白(ip在学)3 小时前
stp拓扑变化分类
运维·服务器·网络·智能路由器
Muxiyale3 小时前
使用spring发送邮件,部署ECS服务器
java·服务器·spring
l1x1n04 小时前
Vim 编辑器常用操作详解(新手快速上手指南)
linux·编辑器·vim
FreeBuf_5 小时前
微软365 PDF导出功能存在本地文件包含漏洞,可泄露敏感服务器数据
服务器·microsoft·pdf
lixzest6 小时前
C++ Lambda 表达式详解
服务器·开发语言·c++·算法
ajassi20006 小时前
开源 python 应用 开发(三)python语法介绍
linux·python·开源·自动化
o不ok!6 小时前
Linux面试问题-软件测试
linux·运维·服务器
DaxiaLeeSuper6 小时前
Prometheus+Grafana+node_exporter监控linux服务器资源的方案
linux·grafana·prometheus
尽兴-7 小时前
如何将多个.sql文件合并成一个:Windows和Linux/Mac详细指南
linux·数据库·windows·sql·macos
kfepiza7 小时前
Netplan 中 bridges、bonds、ethernets、vlans 之间的关系 笔记250711
linux·tcp/ip·shell