PokeMMO Support

"No Available Display Compositor" on Linux

Overview

PokeMMO offers two display compositor choices for the game client on Linux: X11 or Wayland. The game client determines which display compositors are available based on what environmental variables are set.


"No display compositor was available for the platform."

In rare cases, your desktop environment may be misconfigured and the game client will be unable to start with an error stating "No display compositor was avilable for the platform." This most often happens in distributions such as Arch Linux where the user configures their own desktop environment from scratch.


How to resolve for X11 general / portable installations

For X11, PokeMMO tests if $XDG_SESSION_TYPE contains the string x11 to enable the X11 compositor.

To debug this problem:

  • Open a terminal
  • Type env | grep XDG_SESSION_TYPE

If this value is set to tty or the return result is blank, your desktop environment is misconfigured and you need to make the client aware that it's running on an X11 server. Consult the below documentation on how to set environment variables.


How to resolve for Wayland general / portable installations

For Wayland, two environment variables are tested when starting the game:

  • $XDG_SESSION_TYPE to check if it contains the string wayland
  • $WAYLAND_DISPLAY to check if any value is set

To debug this problem:

  • Check if $WAYLAND_DISPLAY is set by using env | grep WAYLAND_DISPLAY in a terminal. An expected return value would be, for example, WAYLAND_DISPLAY=wayland-0. If this command does not return any text, your desktop environment is not properly configured for Wayland.

  • Check if $XDG_SESSION_TYPE returns the value wayland using env | grep XDG_SESSION_TYPE

If $XDG_SESSION_TYPE is set to wayland but $WAYLAND_DISPLAY is blank, your desktop environment is misconfigured.

If $XDG_SESSION_TYPE is set to x11, tty, or is blank, but $WAYLAND_DISPLAY is set, your desktop environment is misconfigured.


Resolving environment variable issues

To set environment variables on linux, first determine whether you're using x11 or wayland. Expected values for XDG_SESSION_TYPE are either x11 or wayland. In these examples, substitute "REPLACEME" with your choice of x11 or wayland.

Manually setting the variables:

For the game client only:

  • Modify PokeMMO.sh and add an export command before java is started. An example of this for wayland would be:
    export XDG_SESSION_TYPE=REPLACEME ; java -Xmx384M $os_flags -Dfile.encoding="UTF-8" -cp PokeMMO.exe com.pokeemu.client.Client

For your entire user profile

Modify the text file ~/.profile and append export XDG_SESSION_TYPE=REPLACEME to the file

For X11 only

Modify the text file ~/.xinitrc and append export XDG_SESSION_TYPE=x11 to the file

For all users on the system

Open /etc/environment as a superuser, add XDG_SESSION_TYPE=REPLACEME, and restart the system.

For further help on resolving environment issues, please consult your distribution's documentation.


Author: Kyu
122 views.