Skip to content

Commit

Permalink
Also check for Wayland's WAYLAND_DISPLAY to detect a graphical session (
Browse files Browse the repository at this point in the history
#972)

* Also check for Wayland's WAYLAND_DISPLAY to detect a graphical session

* Correct error message on missing graphical session
  • Loading branch information
j-b-m committed Feb 27, 2024
1 parent 299bf23 commit 025afaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/modules/glaxnimate/producer_glaxnimate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ static bool createQApplicationIfNeeded(mlt_service service)
+ QStringLiteral("/plugins"));
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
if (getenv("DISPLAY") == 0) {
if (getenv("DISPLAY") == 0 && getenv("WAYLAND_DISPLAY") == 0) {
mlt_log_error(
service,
"The MLT Qt module requires a X11 environment.\n"
"Please either run melt from an X session or use a fake X server like xvfb:\n"
"The MLT Glaxnimate module requires a X11 or Wayland environment.\n"
"Please either run melt from a session with a display server or use a fake X server like xvfb:\n"
"xvfb-run -a melt (...)\n");
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/modules/qt/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ bool createQApplicationIfNeeded(mlt_service service)
+ QStringLiteral("/plugins"));
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
if (getenv("DISPLAY") == 0) {
if (getenv("DISPLAY") == 0 && getenv("WAYLAND_DISPLAY") == 0) {
mlt_log_error(
service,
"The MLT Qt module requires a X11 environment.\n"
"Please either run melt from an X session or use a fake X server like xvfb:\n"
"The MLT Qt module requires a X11 or Wayland environment.\n"
"Please either run melt from a session with a display server or use a fake X server like xvfb:\n"
"xvfb-run -a melt (...)\n");
return false;
}
Expand Down

0 comments on commit 025afaf

Please sign in to comment.