Thursday, January 22, 2026

Run GUI as root on Linux with PowerBank

 

1) First, confirm you’re actually on an X11-forwarded display

Run as your normal user (not root):

echo "$DISPLAY" xauth info

If DISPLAY looks like localhost:10.0, you’re using SSH X11 forwarding. In that case, xhost is often unnecessary (and sometimes useless) because the “X server” is actually on your Mac and access is controlled by xauth cookies.

2) Use xauth (works even when xhost syntax fails)

Goal: let root use your forwarded X session by giving root the same Xauthority cookie.

As your normal user:

echo "$DISPLAY" xauth list "$DISPLAY"

If that prints a line, export the cookie into a temp file:

xauth extract /tmp/root.xauth "$DISPLAY" chmod 644 /tmp/root.xauth

Then become root via pbrun:

pbrun su -

As root:

export DISPLAY=<paste the exact value from user, e.g. localhost:10.0> export XAUTHORITY=/tmp/root.xauth xauth list

Test with something simple (if available):

xclock

Then start IBMIM:

/opt/IBM/InstallationManager/eclipse/IBMIM