How to set DISPLAY variable in Linux

Whenever you want to invoke graphical interface in Linux, You must know how to set DISPLAY variable in order to open the GUI. Linux by default does not allow you to open any GUI (Linux Oracle Installer) until you enable the GUI display.

Use below command to enable Linux GUI interface at command prompt as root user:

# xhost +

Sometimes, even after issuing above command, you wont be able to invoke GUI because of “DISPLAY not set” error. In such case, you must export the display environmental variable:

export DISPLAY=:0.0;

Now you can invoke any Linux GUI interface by directly running the installer!

Visual Basic Creating a simple Calculator to get familiar with the interface and code





Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.