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

Thursday, May 23, 2024

Recover the deleted files in Linux

 Reference: https://forums.unraid.net/topic/101686-xfs_undelete-seems-to-be-a-better-way-to-recover-files/


mkdir xfs_undelete

cd xfs_undelete/

wget https://github.com/ianka/xfs_undelete/archive/refs/tags/v12.0.zip -O temp.zip

dnf install tcl

dnf install tcllib


xfs_undelete -t 2024-05-14 -o /root/recover /dev/mapper/ol-root

Wednesday, May 22, 2024

Settings for Live SASS Compiler in Visual Studio

 Add below block into file>preference>settings>user Settings


Settings

"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
"savePath": "/css/apps"
}
],
"liveSassCompile.settings.generateMap": true,
"liveSassCompile.settings.includeItems": [
"/scss/apps/**/*.scss"
],