suipaste
Posts: 17
Joined: Tue Jul 17, 2012 6:50 pm

Xming issue

Tue Jan 14, 2014 9:38 pm

Hi I'm trying to run a program (jBerries) though SSH with Xming.
Previously it worked but since changing the launch options of the program so it runs as sudo I can't get it to work over SSH.

Code: Select all

PuTTY X11 proxy: wrong authorisation protocol attemptedPuTTY X11 proxy: wrong authorisation protocol attemptedException in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:119)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at java.awt.Toolkit$2.run(Toolkit.java:868)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:860)
        at java.awt.Toolkit.getEventQueue(Toolkit.java:1730)
        at java.awt.EventQueue.invokeLater(EventQueue.java:1217)
        at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1290)
        at net.sf.jberries.MainClass.main(MainClass.java:26)

If there are any xming / ssh power users who can fathom this error and perhaps suggest a work around it would be much appreciated.

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Xming issue

Tue Jan 14, 2014 9:56 pm

Try using gksudo instead. You may need to install it.

Code: Select all

sudo apt-get install gksu

suipaste
Posts: 17
Joined: Tue Jul 17, 2012 6:50 pm

Re: Xming issue

Tue Jan 14, 2014 10:10 pm

Thanks! Works a charm.

Return to “Advanced users”