Problem
In Linux x11 session, IntelliJ IDE does not start up.
When launched from the command-line, the error message says Unable to detect graphic environment or mentions "Wayland" (Could not connect to the Wayland server (check WAYALND_DISPLAY) but the window server x11, there is no Wayland
Resolution
Until v2025.3, IntelliJ was an x11 native application. If you log in to the Wayland session in the OS, the IDE will be run in XWayland (compatibility) mode.
There is an option to run IntelliJ IDE in native Wayland mode (beta). If it's turned on, IntelliJ will work in native Wayland mode, but it will not start in x11 session. If you still can start IntelliJ IDE, turn off Wayland mode as described in Linux: how to turn on/off native Wayland mode
If you can't start IntelliJ IDE, edit the file [IDE config directory]/idea64.vmoptions manually and remove line -Dawt.toolkit.name=WLToolkit from it. This will reset the setting to run IDE in Wayland mode, and it will start in the default (x11) mode.
If it takes extra time to clarify where your IDE config directory is, you may simply run IDE from the command-line with a key -Dawt.toolkit.name=XToolkit.
Since 2026.1, the IDE does not require any VM options and picks up the toolkit that corresponds to the current session. If for some reason WLToolkit is specified in VM options while the IDE is run in X11 session and that leads to startup fail, apply the same workarounds as above.
Comments
0 comments
Please sign in to leave a comment.