xhost setting problem for local users

$su – oracle
$env | grep DISPLAY
DISPLAY=:0.0
$xclock
Xlib: connection to “:0.0″ refused by server
Xlib: No protocol specified

Error: Can’t open display: :0.0

The problem is that the local users were not authorized to access control on xhost. To solve this problem, you need to make the authorization using “root”.

[root@localhost]# xhost
access control enabled, only authorized clients can connect
[root@localhost]# xhost +oracle
xhost:   bad hostname “oracle”
[root@localhost]# xhost +local:oracle
non-network local connections being added to access control list
[root@localhost]# su – oracle
[oracle@localhost] $ xclock

xclock successfully started.

Sometimes, there is communication problem between guest Linux server and Windows XP host server. Applications or tools like OEM or DBCA might have problems or appear freezed. Using xhost to show the GUI on Linux server would be much more stable.

Leave a Reply