I get the following error if I login as root; if I login as admin user, then x11 starts with no problems.
Ubuntu 14.04
Xming server 2.0 running on Windows 8.1
PuTTY X11 proxy: Unsupported authorisation protocol
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:2020)
at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:1158)
at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:431)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:539)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:579)
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349)
at javax.swing.UIManager.initialize(UIManager.java:1459)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1426)
at javax.swing.UIManager.getUI(UIManager.java:1006)
at javax.swing.JPanel.updateUI(JPanel.java:126)
at javax.swing.JPanel.<init>(JPanel.java:86)
at javax.swing.JPanel.<init>(JPanel.java:109)
at javax.swing.JPanel.<init>(JPanel.java:117)
at com.install4j.runtime.installer.frontend.FormPanel.<init>(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(Unknown Source)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.Launcher.main(Unknown Source)
Could not display the GUI. This application needs access to an X Server.
While logged in as su, after a few "PuTTY X11 proxy: wrong authorisation protocol attempted", and "PuTTY X11 proxy: Unsupported authorisation protocol" -type errors, I realized it was an authentication problem. I then remembered to copy the .Xauthority file from my own profile /home directory to /root. Problem solved!
来源:https://stackoverflow.com/questions/33072836/putty-x11-proxy-unsupported-authorisation-protocol