@confusion's comment nailed it for me (use case of just wanting to turn off the official repos)
rm -f /etc/rhsm-host /etc/yum.repos.d/redhat.repo
I'd prefer to leave a comment thanking him alas I'm ...
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....