Fontforge cannot open display on Wayland Plasma session

Trying to start fontforge on plasma/wayland results in:

fontforge
Copyright (c) 2000-2023. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20230101
 Based on sources from 2023-04-07 06:26 UTC-ML-D-GDK3.

(fontforge:37290): Gdk-WARNING **: 18:12:56.283: cannot open display:

Using a plasma/X11 session makes fontforge works.

The same version works fine on my laptop running KDE/Wayland.

Can it be a matter of environment variables? I see I have the following ones referring to Wayland:

DESKTOP_SESSION=plasmawayland
XDG_SESSION_TYPE=wayland
WAYLAND_DISPLAY=wayland-0
QT_WAYLAND_FORCE_DPI=96
GDK_BACKEND=wayland

Do you have the same?
Referring to X11, I have

DISPLAY=:1

(wondeer if it is sddm to use :0, which was the norm for a single screen machine until pre-Wayland times).

Diagnosed: you need to unset GDK_BACKEND for fontforge to run. Or env -u GDK_BACKEND fontforge. Or GDK_BACKEND='x11' fontforge.

A default Manjaro Linux system running Plasma on Wayland has

 $ env | grep wayland
DESKTOP_SESSION=plasmawayland
XDG_SESSION_TYPE=wayland
WAYLAND_DISPLAY=wayland-0

So your extra variables is an addition - possibly to solve an issue with an application which needs the GDK_BACKEND.

Another reason it exist could be having both Gnome and Plasma installed or perhaps at some point exchanged Gnome for Plasma.

I will add your finding to my private notebook with reasons to avoid mixing Gnome and Plasma :slight_smile:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.