Categories: Ubuntu

How to install Xvfb on Ubuntu

X virtual framebuffer abbreviated as Xvfb is designed for Unix/ Linux Operating System. It allows you to execute graphical apps without having to use a monitor by connecting some input device. Virtual memory is used to perform graphical operations and it allows the program to run headlessly.

It is especially designed for Linux systems and in this article, we will discuss its installation and working on Ubuntu (Linux OS). If you wanted to run your browsers headlessly then follow the procedure below:

Installation of Xvfb on Ubuntu

To get Xvfb on Ubuntu follow given below steps:

Step 1: Installation of Xvfb :First you need to install Xvfb by below mentioned command:

Sponsored
$ sudo apt install xvfb

Step 2: Installation of Browsers : Now you need to download some browses, you can download any browser, here I will download chrome and Firefox browser on Ubuntu System:

Installation of Firefox

Now we need to install Firefox, in most of the system it is installed by default but needs to be upgraded, so the Firefox browser on my system is also installed by default it will just get upgraded. Now run the below mentioned in Ubuntu terminal command to install:

$ sudo apt-get install firefox

Step 4: Testing of Xvfb: To test whether xvfb is installed/working properly, run the below mentioned command to check the status of xvfb process:

$ ps -ef | grep xvfb

Sponsored

So, the result shows that it is properly installed on the system, now you can use it without any problem.

Step 3: Working of Xvfb: Xvfb allows you to run browsers/tests in the background without showing their processing. Use the below mentioned syntax for running/testing programs headlessly:

$ xvfb-run [options] [command]

For instance, below I am running Firefox using xvfb by the below mentioned command, it will open in the background and nothing will appear on screen.

$ xvfb-run firefox http://google.com

To get more information about this command, you can use help command with this command, run the below mentioned command to know more about its usage:

$ xvfb-run –help

Conclusion

Xvfb, referred to as X virtual framebuffer, allows you to run programs in background headlessly without showing actual processing. It is useful to run tests without opening an unrequited window. In this writeup I provide the procedure for installation and testing of xvfb on Ubuntu (Linux OS) and after installation I also elaborate on its working system.

Ubuntu Server Admin

Recent Posts

Cut data center energy costs with bare metal automation

Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…

20 hours ago

Build the future of *craft: announcing Starcraft Bounties!

Our commitment to building a thriving open source community is stronger than ever. We believe…

20 hours ago

NodeJS 18 LTS EOL extended from April 2025 to May 2032 on Ubuntu

The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…

20 hours ago

Native integration now available for Pure Storage and Canonical LXD

June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…

2 days ago

Revolutionizing Web Page Creation: How Structured Content is Slashing Design and Development Time

Co-authored with Julie Muzina A year ago, during our Madrid Engineering Sprint, we challenged ourselves…

3 days ago

Ubuntu Weekly Newsletter Issue 897

Welcome to the Ubuntu Weekly Newsletter, Issue 897 for the week of June 15 –…

4 days ago