When you try to run Google Chrome on Ubuntu and encounter the following error:
This indicates that the X server is not running or the $DISPLAY
environment variable is not set correctly. Here are some steps to resolve this issue:
Install Xvfb
if haven't install.
It does not require additional hardware.
Install some dependencies to make "headless" Chrome/selenium work
[Optional]: Install dependencies for capturing screenshots of Xvfb display
Make sure that Xvfb
stars every time the box/vm is booted.
You can add the above commands to your .bashrc
or .profile
file to ensure they are executed every time you log in.
Rerun the Google chrome command
Written by
KarChunT
Last Updated
Fri Jun 27 2025
Tags