#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 41. Other X-based Programs

- Prev

  Thunderbird-128.7.1esr

- Next

  Transmission-4.0.6

- Up
- Home

# Tigervnc-1.15.0

## Introduction to Tigervnc

Tigervnc is an advanced VNC (Virtual Network Computing) implementation. It allows creation of an Xorg server not tied to a physical console and also provides a client for viewing of the remote graphical desktop.

This package is known to build and work properly using an LFS 12.3 platform.

### Package Information

- Download (HTTP): https://github.com/TigerVNC/tigervnc/archive/v1.15.0/tigervnc-1.15.0.tar.gz

- Download MD5 sum: c8b8203dab00c7862dade8d964cec258

- Download size: 2.0 MB

- Estimated disk space required: 148 MB

- Estimated build time: 0.5 SBU (Using parallelism=4)

### Additional Downloads

- Required file: https://www.x.org/pub/individual/xserver/xorg-server-21.1.16.tar.xz

### Note

The version of Xorg may eventually be a few versions out of date, but is required for the customizations needed for this package.

- Required patch: https://www.linuxfromscratch.org/patches/blfs/12.3/tigervnc-1.15.0-configuration_fixes-1.patch

- Optional file to start the server without a display manager: https://anduin.linuxfromscratch.org/BLFS/tigervnc/vncserver

- Optional manual page: https://anduin.linuxfromscratch.org/BLFS/tigervnc/vncserver.1

### Tigervnc Dependencies

#### Required

CMake-3.31.5, FLTK-1.4.2, GnuTLS-3.8.9, libgcrypt-1.11.0, libjpeg-turbo-3.0.1, Linux-PAM-1.7.0, Pixman-0.44.2, Xorg Applications, xinit-1.4.3, and Xorg Legacy Fonts

#### Recommended

ImageMagick-7.1.1-43

## Installation of Tigervnc

First, make adjustments to the configuration files to make them compatible with LFS systems:

    patch -Np1 -i ../tigervnc-1.15.0-configuration_fixes-1.patch

Now, make the package consistent with fltk-1.4.1 and later:

    sed -i "s/maximize)/::&/"         vncviewer/DesktopWindow.cxx &&
    sed -i "/FL_MINOR_VERSION/s/3/4/" CMakeLists.txt

Install tigervnc by running the following commands:

    # Put code in place
    mkdir -p unix/xserver &&
    tar -xf ../xorg-server-21.1.16.tar.xz \
        --strip-components=1              \
        -C unix/xserver                   &&
    ( cd unix/xserver &&
      patch -Np1 -i ../xserver21.patch ) &&

    # Build viewer
    cmake -G "Unix Makefiles"          \
          -D CMAKE_INSTALL_PREFIX=/usr \
          -D CMAKE_BUILD_TYPE=Release  \
          -D INSTALL_SYSTEMD_UNITS=OFF \
          -W no-dev .                  &&
    make &&

    # Build server
    pushd unix/xserver &&
      autoreconf -fiv  &&

      CPPFLAGS="-I/usr/include/drm"       \
      ./configure $XORG_CONFIG            \
          --disable-xwayland    --disable-dri        --disable-dmx         \
          --disable-xorg        --disable-xnest      --disable-xvfb        \
          --disable-xwin        --disable-xephyr     --disable-kdrive      \
          --disable-devel-docs  --disable-config-hal --disable-config-udev \
          --disable-unit-tests  --disable-selective-werror                 \
          --disable-static      --enable-dri3                              \
          --without-dtrace      --enable-dri2        --enable-glx          \
          --with-pic &&
      make  &&
    popd

This package does not come with a test suite.

Now, as the `root` user:

    #Install viewer
    make install &&
    mv  /usr/share/doc/tigervnc /usr/share/doc/tigervnc-1.15.0

    #Install server
    ( cd unix/xserver/hw/vnc && make install ) &&

    [ -e /usr/bin/Xvnc ] || ln -svf $XORG_PREFIX/bin/Xvnc /usr/bin/Xvnc

Finally, modify the PAM file to be compatible with elogind:

    sed -i 's/pam_systemd.so/pam_elogind.so/' /etc/pam.d/tigervnc

## Command Explanations

tar -xf .. xorg-server...: This command extracts the standard Xorg package into the tree in a location needed for modification.

`--disable ...`: Most options that are usually needed for the standard Xorg server are not needed for the Xvnc instance being built.

[ -e /usr/bin/Xvnc ] || ln ... Xvnc: If the Xvnc server is not installed in the `/usr/bin` directory, then create a link so the vncserver script can find it.

## Configuring Tigervnc

The default installation of this package makes some changes in the way it is used. The vncserver perl script is placed in /usr/bin/libexec and the server is designed to be run via a systemd style .service file or the vncsession script as the root user. The man page for vncserver is placed in section 8 of the man pages. The new procedures require a display manager to be installed.

To restore the previous behavior, install the additional downloaded files as the `root` user:

    install -m755 --owner=root ../vncserver /usr/bin &&
    cp ../vncserver.1 /usr/share/man/man1

Using the previous procedures, the user specific configuration files of vncserver reside in the `.vnc` directory in the user's home directory. The `xstartup` file in that directory is a script specifying what commands to run when a VNC desktop is started. If no `xstartup` file exists, vncserver will try to start an xterm in a twm session. An example `xstartup` would be:

    #!/bin/sh
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    startlxqt &

The `xstartup` file must be executable for the commands in it to be executed, so run chmod a+x ~/.vnc/xstartup.

Set up the vnc passwd with vncpasswd. The server can then be started with the vncserver command. See the man pages in section 1 for the vncserver for the server system and vncviewer for the remote system.

## Contents

Installed Programs: Xvnc, vncconfig, vncpasswd, vncserver, vncviewer, and x0vncserver
Installed Libraries: libvnc.so
Installed Directories: /usr/share/doc/tigervnc-1.15.0

### Short Descriptions

Xvnc | is a X VNC (Virtual Network Computing) server. It is based on a standard X server, but it has a “virtual” screen rather than a physical one
vncconfig | is a program to configure and control a VNC server
vncpasswd | allows you to set the password used to access VNC desktops
vncserver | is a perl script used to start or stop a VNC server
vncviewer | is a client used to connect to VNC desktops
x0vncserver | is a program to make an X display on a physical terminal accessible via TigerVNC or compatible viewers

- Prev

  Thunderbird-128.7.1esr

- Next

  Transmission-4.0.6

- Up
- Home