Symptoms & scope
- The application opens from a desktop terminal but not a launcher or remote shell.
- A toolkit reports that it cannot open the display.
Relevant environment
X11 apps on Xorg or Xwayland, including SSH forwarding; run checks as the desktop user, not root.
Recognizable messages (synthetic examples)
(example-app:841): Gtk-WARNING **: cannot open display: :99Check the launch environment, server availability and authorization; this is not a GPU-crash diagnosis.
Possible causes
These are possible explanations, not a confirmed diagnosis. Several independent faults can coexist.
- DISPLAY may refer to a previous session or an unavailable Xwayland server.
- XAUTHORITY may refer to the wrong account or authority file.
Diagnose safely
Run one command at a time in the relevant session. Read the explanation first. Uppercase placeholders need your own values; tools and privileges vary by distribution. These commands are displayed here and never executed by the website.
Check 1
Run in the failing context and compare with a working terminal in the same session. Missing variables can make printenv return nonzero.
printenv DISPLAY XAUTHORITY XDG_SESSION_TYPEInterpret the result: A different display or authority path suggests stale launcher exports; an unset XAUTHORITY is not automatically wrong because a default file may be used.
Evidence-guided next steps
Remove stale display overrides from the launcher
If the working terminal has different session values, back up the launcher or shell fragment and remove only hard-coded DISPLAY and XAUTHORITY assignments. Start the program as the logged-in desktop user so it inherits the session’s current values.
Precautions: Do not run the GUI as root or use xhost + to bypass authentication. Wayland’s presence does not guarantee Xwayland is enabled.
Recovery / rollback: Restore the saved launcher or shell fragment if the override was required for a separate verified display.
Did this solution help you?
Reestablish the intended SSH X11 forwarding
If the failure occurs only over SSH, verify the local X server is available and the remote server permits X11 forwarding, then create a fresh ssh -X session. Use the DISPLAY assigned by SSH rather than setting the remote machine’s display manually.
Precautions: Trusted -Y forwarding increases the remote application’s access to the local display; use it only for an explicitly trusted host and application.
Recovery / rollback: Close the forwarded session and restore any host-specific forwarding setting changed for the test.
Did this solution help you?
References & review
This guide was prepared from primary project or distribution sources and reviewed on the date shown. This is an editorial source check, not evidence that a fix was reproduced on your hardware. Diagnostic log examples are synthetic fixtures. Version-dependent details must be checked against your installed release.
- X.Org xauth: authorization files and display selection (project or distribution documentation)
- OpenSSH ssh: X11 forwarding and DISPLAY (project or distribution documentation)
- GTK: display environment and backends (project or distribution documentation)