Monero Wallet Gui AppImage no longer runs

I am getting an error in Whonix 18 Workstation KVM:


/monero-wallet-gui.AppImage
qt.qpa.plugin: Could not find the Qt platform plugin “wayland” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, xcb, minimal, offscreen, vnc.

Aborted (core dumped)
zsh: exit 134   ./monero-wallet-gui.AppImage

Anyone know what to do?

1 Like

Here are a few options:

  1. Install the qt6-wayland platform plugin package (using sysmaint), restart your computer, then try again.
  2. Execute the AppImage using any of the other available platform plugins, such as X11:
/monero-wallet-gui.AppImage export QT_QPA_PLATFORM=xcb
1 Like

I’d be surprised if that isn’t already installed, given that LXQt in Whonix 18 is Qt-based and running on Wayland via the Wayland backend. Maybe the Monero Wallet GUI has a built-in Qt that was compiled without Wayland support.

This seems like the best option, although I think the arguments are backwards; wouldn’t you need export QT_QPA_PLATFORM=xcb; /monero-wallet-gui.AppImage? Or perhaps just QT_QPA_PLATFORM=xcb /monero-wallet-gui.AppImage (note the missing semicolon) if you don’t want to export the variable in the current terminal.

3 Likes

`export QT_QPA_PLATFORM=xcb; ./monero-wallet-gui.AppImage ran

2 Likes

My bad, Docker Engine has retrained my environment variables order to be the other way around.

Great, I am glad we were able to resolve your issue.

3 Likes

I don’t understand why this happened and why this solution worked! I am still learning!

2 Likes

This is a kind of weird issue that you hopefully won’t run into very often, but basically:

Qt is a “library” (a fancy word for “reusable code”) that allows people to make graphical user interfaces for applications. Programs often use Qt to create buttons, text boxes, check boxes, etc. In order to display windows with UI elements like this, Qt has to talk to a thing called a “display server”, which is the application that actually does things to the pixels on your screen. Only one application can be in charge of drawing things on the screen, but most people use multiple GUI apps at once, so a display server’s job is to allow other apps to talk to it, and then it handles drawing the application windows to the screen.

There are basically two kinds of display servers under Linux, X11 and Wayland. The two do pretty much the same job in different ways, with X11 being the older, less secure way of doing things and Wayland being the newer, more secure way. The code needed to talk to these two kinds of display servers is dramatically different because the servers speak a different “language” under the hood, so in order to be compatible with both, Qt has bits of code that acts adapters between the display server and the rest of the Qt library.

What went wrong here is that the Monero GUI appears to contain an embedded copy of Qt that only has the X11 adapter. Whonix 18 uses a Wayland display server, and tries to tell all applications to use the Wayland adapter for security reasons. When you try to launch the GUI, the version of Qt bundled inside of the Monero GUI says “whoops, I don’t have a Wayland backend, guess I’d better tell the user about that!” and you get an error message.

The export QT_QPA_PLATFORM=xcb bit tells Qt to use the X11 backend instead. On the surface, this sounds totally ridiculous, because if X11 and Wayland are so different, surely the X11 adapter isn’t going to work on Wayland! Well, that’s true, but there’s yet another piece of “adapter” software involved called Xwayland. This is an X11 server that talks to a Wayland display server and basically translates messages from the X11 “language” to the Wayland “language”. This way X11-only applications can still display windows when using a Wayland desktop.

Putting it all together, the application now uses Qt to draw its window, Qt uses its X11 adapter to talk to Xwayland, Xwayland talks to the Wayland server, and then the Wayland server puts pixels on your screen. It’s a lot of layers, but it works.

2 Likes

This is now documented here.

2 Likes

Could you report this issue upstream on the Monero issue tracker please? @whoyoo

2 Likes