Ask Your Question

Can't connect to X11 window server using ':0' as the value of the DISPLAY variable

asked 2016-11-21 21:55:52 -0500

Phuti gravatar image

updated 2016-11-28 04:27:53 -0500

hhlp gravatar image

Hi, I'm trying to install IntelliJ on my fedora 25 running wayland and I get the following error:

No protocol specified

Start Failed: Failed to initialize graphics environment

java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.access$200(
    at sun.awt.X11GraphicsEnvironment$
    at Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(
    at java.awt.GraphicsEnvironment.createGE(
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
    at sun.awt.X11.XToolkit.<clinit>(
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(
    at java.awt.Toolkit$
    at java.awt.Toolkit$
    at Method)
    at java.awt.Toolkit.getDefaultToolkit(
    at java.awt.Toolkit.getEventQueue(
    at java.awt.EventQueue.isDispatchThread(
    at javax.swing.SwingUtilities.isEventDispatchThread(
    at javax.swing.text.StyleContext.reclaim(
    at javax.swing.text.StyleContext.addAttribute(
    at javax.swing.text.html.StyleSheet.addAttribute(
    at javax.swing.text.StyleContext$NamedStyle.addAttribute(
    at javax.swing.text.StyleContext$NamedStyle.setName(
    at javax.swing.text.StyleContext$NamedStyle.<init>(
    at javax.swing.text.StyleContext.addStyle(
    at javax.swing.text.StyleContext.<init>(
    at javax.swing.text.html.StyleSheet.<init>(
    at javax.swing.text.html.HTMLEditorKit.getStyleSheet(
    at com.intellij.util.ui.UIUtil.<clinit>(
    at com.intellij.ide.plugins.PluginManager.start(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.intellij.ide.Bootstrap.main(
    at com.intellij.idea.Main.main(
edit retag flag offensive close merge delete


I assume that you are running this in a terminal in Wayland? Does xdpyinfo work?

ssieb gravatar imagessieb ( 2016-11-22 02:27:42 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-11-28 03:01:03 -0500

Phuti gravatar image

It's a bug in fedora 25, apps run via su or sudo are not authorised to connect to the X11 display server. I ran the installation without sudo and it worked.

edit flag offensive delete link more


Now that would have been a useful bit of information to include in the question. There was no mention of sudo there.

Also, it's not a bug. It's intended that you can't run apps with sudo under Wayland. Fedora 25 now uses Wayland by default.

ssieb gravatar imagessieb ( 2016-11-28 15:40:21 -0500 )edit

answered 2016-11-22 02:05:50 -0500

eddygeek gravatar image

I would first try this tip from

For GTK+ 3 apps, you can force a native Wayland app to run using XWayland like this:

GDK_BACKEND=x11 command

(Note: I am not sure if Intellij's Swing uses GTK3 yet)

There are other tips for debugging on that page.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-11-21 21:55:52 -0500

Seen: 6,622 times

Last updated: Nov 28 '16