How To Install xvfb on Ubuntu 20.04

In this tutorial we learn how to install xvfb on Ubuntu 20.04. xvfb is Virtual Framebuffer fake X server Virtual Framebuffer fake X server Virtual Framebuffer fake X server

Introduction

In this tutorial we learn how to install xvfb on Ubuntu 20.04.

What is xvfb

xvfb is:

Xvfb provides an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory. The primary use of this server was intended to be server testing, but other novel uses for it have been found, including testing clients against unusual depths and screen configurations, doing batch processing with Xvfb as a background rendering engine, load testing, as an aid to porting the X server to a new platform, and providing an unobtrusive way to run applications that don’t really need an X server but insist on having one anyway.

This package also contains a convenience script called xvfb-run which simplifies the automated execution of X clients in a virtual server environment. This convenience script requires the use of the xauth program.

More information about X.Org can be found at: URL:https://www.x.org

This package is built from the X.org xserver module.

Package: xvfb Architecture: amd64 Version: 2:1.20.9-2ubuntu1.2~20.04.2 Multi-Arch: foreign Priority: optional Section: universe/x11 Source: xorg-server Origin: Ubuntu Maintainer: Ubuntu X-SWAT [email protected] Original-Maintainer: Debian X Strike Force [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2213 Provides: xserver Depends: xserver-common (>= 2:1.20.9-2ubuntu1.2~20.04.2), libaudit1 (>= 1:2.2.1), libbsd0 (>= 0.7.0), libc6 (>= 2.29), libgcrypt20 (>= 1.8.0), libgl1, libpixman-1-0 (>= 0.30.0), libselinux1 (>= 2.0.82), libsystemd0, libunwind8, libxau6, libxdmcp6, libxfont2 (>= 1:2.0.1), xauth, x11-xkb-utils Recommends: libgl1-mesa-dri Filename: pool/universe/x/xorg-server/xvfb_1.20.9-2ubuntu1.2~20.04.2_amd64.deb Size: 778184 MD5sum: b22a6734eb97c0ed3fcc1712fbfeeab9 SHA1: 3205558a9ef8233cdc226c1ad3c3a4d3d0472715 SHA256: d1ec076aae89b4d10214a8a28823e770b933eee695d1f1278ffa6bbc9b93fbb4 SHA512: 1dd9e261353ec435d05e75cf9378f4934973d27582a36c458e54738149fedbce09e83a0d3e85016098549752926323925eb7554564c81220a8bc18000b364071 Homepage: https://www.x.org/ Description-en: Virtual Framebuffer ‘fake’ X server Xvfb provides an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory. The primary use of this server was intended to be server testing, but other novel uses for it have been found, including testing clients against unusual depths and screen configurations, doing batch processing with Xvfb as a background rendering engine, load testing, as an aid to porting the X server to a new platform, and providing an unobtrusive way to run applications that don’t really need an X server but insist on having one anyway.

This package also contains a convenience script called xvfb-run which simplifies the automated execution of X clients in a virtual server environment. This convenience script requires the use of the xauth program.

More information about X.Org can be found at: URL:https://www.x.org

This package is built from the X.org xserver module.

Package: xvfb Architecture: amd64 Version: 2:1.20.8-2ubuntu2 Multi-Arch: foreign Priority: optional Section: universe/x11 Source: xorg-server Origin: Ubuntu Maintainer: Ubuntu X-SWAT [email protected] Original-Maintainer: Debian X Strike Force [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 2208 Provides: xserver Depends: xserver-common (>= 2:1.20.8-2ubuntu2), libaudit1 (>= 1:2.2.1), libbsd0 (>= 0.7.0), libc6 (>= 2.29), libgcrypt20 (>= 1.8.0), libgl1, libpixman-1-0 (>= 0.30.0), libselinux1 (>= 2.0.82), libsystemd0, libunwind8, libxau6, libxdmcp6, libxfont2 (>= 1:2.0.1), xauth, x11-xkb-utils Recommends: libgl1-mesa-dri Filename: pool/universe/x/xorg-server/xvfb_1.20.8-2ubuntu2_amd64.deb Size: 776784 MD5sum: 4deb918311963be2754ff883e320e395 SHA1: eb612eeb4bae7743cbf1094f08ff8e18d50b9aed SHA256: a8469731024e168761f22870d6fe76e46bdbf71b1c3fac5b50c1b5a3a0602f12 Homepage: https://www.x.org/ Description-en: Virtual Framebuffer ‘fake’ X server Xvfb provides an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory. The primary use of this server was intended to be server testing, but other novel uses for it have been found, including testing clients against unusual depths and screen configurations, doing batch processing with Xvfb as a background rendering engine, load testing, as an aid to porting the X server to a new platform, and providing an unobtrusive way to run applications that don’t really need an X server but insist on having one anyway.

This package also contains a convenience script called xvfb-run which simplifies the automated execution of X clients in a virtual server environment. This convenience script requires the use of the xauth program.

More information about X.Org can be found at: URL:https://www.x.org

This package is built from the X.org xserver module.

There are three methods to install xvfb on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install xvfb Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install xvfb using apt-get by running the following command:

sudo apt-get -y install xvfb

Install xvfb Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install xvfb using apt by running the following command:

sudo apt -y install xvfb

Install xvfb Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install xvfb using aptitude by running the following command:

sudo aptitude -y install xvfb

How To Uninstall xvfb on Ubuntu 20.04

To uninstall only the xvfb package we can use the following command:

sudo apt-get remove xvfb

Uninstall xvfb And Its Dependencies

To uninstall xvfb and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove xvfb

Remove xvfb Configurations and Data

To remove xvfb configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge xvfb

Remove xvfb configuration, data, and all of its dependencies

We can use the following command to remove xvfb configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge xvfb

References

Summary

In this tutorial we learn how to install xvfb package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.