xhost: unable to open display “” | Check if the DISPLAY variable is set | Oracle Linux

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 24 May, 2021
  • 0 Comments
  • 1 Min Read

xhost: unable to open display “” | Check if the DISPLAY variable is set | Oracle Linux

xhost:  unable to open display “” | Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set

Problem

[oracle@prim]$ ./runInstaller
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 500 MB.   Actual 17736 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4095 MB    Passed
Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] n

User Selected: No

Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2018-05-23_07-54-28PM/installActions2018-05-23_07-54-28PM.log

Solution

1) For xhost:  unable to open display “” Issue

Avoid using “su” to come to ROOT prompt. Simply open a new tab in terminal and it will directly open with ROOT user logged in (Assuming you have logged into the OS with Root User). Once new tab is opened, again run

[root@practice ~]# xhost +
access control disabled, clients can connect from any host

The command will be successful this time.

2) XHOST Access is provided, still you are unable to open the Installer with Oracle User for for Oracle Database Installation

Check for the value of DISPLAY variable for ROOT user using ECHO command,

[root@practice ~]# echo $DISPLAY
:0

Now define the same value for DISPLAY after switching to Oracle User and the Installer will open successfully this time.

[root@practice ~]# su – oracle
Last login: Wed May 23 20:04:23 IST 2018 on pts/1
[oracle@practice database]$ export DISPLAY=:0
[oracle@practice database]$ ./runInstaller
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 500 MB.   Actual 17736 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4095 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-05-23_08-05-46PM. Please wait …[oracle@practice database]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2018-05-23_08-05-46PM.log