1

I'm not that au fait with Linux, let alone things like X and display/window managers.

I am trying to run the GUI installer for Oracle Enterprise Manager, but it is complaining about the value for the DISPLAY environment variable, and is not able to load the GUI.

I am logging in as root then launching terminal, and can see the value for the variable is hostname:0. I need to run the installer as Oracle, so I su - oracle and then set the variable to the same value using export DISPLAY=hostname:0

I assume there is some kind of permission mechanism that prevents this from working, so I am wondering what I can do with the DISPLAY environment variable for Oracle, to allow the installer to run? Is it a case of having to log in as Oracle and launching the terminal directly, or can it be done after su'ing?

1 Answer 1

1

You need to configure X11 authentication MIT-MAGIC-COOKIE.

You can use xauth to configure it:

xauth list $DISPLAY # To list X11 cookies
sudo -iu oracle
# Import the cookies one by one
xauth add laptop.example.org/unix:  MIT-MAGIC-COOKIE-1  someHexString

Or alternatively:

xauth extract - $DISPLAY | ssh oracle@localhost xauth merge -

Or set $XAUTHORITY environment variable:

export XAUTHORITY=$(xauth info|grep "^Authority file"|awk '{print $3}')
sudo -iu oracle
2
  • Thank you. I'm not sure if there is a preferred approach when logging into the machine via the console session on RHEL 8? In any case, I tried the first method and get error: xauth timeout in locking authority file /run/user/0.mutter-Xwaylandauth Dec 2 at 6:44
  • When do you see this error? After which command? 2 days ago

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .