MoTTY X11 proxy: No authorisation provided
Error
MoTTY X11 proxy: No authorisation provided
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
Causes:
-
$DISPLAY
is not correctly set, -
xauth
is missing or not configured, -
or
.Xauthority
is not being used or trusted.
Solution:
Step 1: Confirm xauth
is installed
which xauth
If it returns nothing:
sudo yum install xauth # RHEL/CentOS # or sudo apt install xauth # Debian/Ubuntusudo yum install xauth # RHEL/CentOS # or sudo apt install xauth # Debian/Ubuntu
Step 2: In session config:
-
Go to Advanced SSH settings
-
✅ Ensure “X11 forwarding” is checked
Step 3: Verify environment variable
After login, run:
echo $DISPLAY
Expected output:
Step 4: Generate .Xauthority
entries
xauth list
If it returns nothing or errors:
xauth generate $DISPLAY . trusted
Then re-check:
xauth list
Step 5: Test with lightweight GUI app
xclock
If xclock
opens a window on your Windows desktop → SUCCESS ✅
Step 6 : Check output of below command
echo $DISPLAY xauth list
export DISPLAY=localhost:10.0 xclock
If above one is failed
Step 7: Install xclock
sudo yum install xorg-x11-apps -y
Re-run the test
xclock