Skip to content

Commit

Permalink
AppImage: Fix Qt platform plugin failure for xcb on X11
Browse files Browse the repository at this point in the history
  • Loading branch information
L3337 committed Nov 25, 2023
1 parent d1e9564 commit 2b6e9a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/appimage/python-appimage/stargate/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,15 @@ fi

export QT_QPA_PLATFORM_PLUGIN_PATH="${APPDIR}/opt/python${PYVER}/lib/python${PYVER}/site-packages/PyQt5/Qt5/plugins/platforms"

export QT_DEBUG_PLUGINS=1

# exporting the DISPLAY fixes Qt errors regarding the xcb platform plugin
if [ -e "$(which xrandr)" ]; then
export DISPLAY=":$(xrandr --current | grep -Eo 'Screen [0-9]+:' | grep -Eo '[0-9]+')"
elif [ -e /tmp/.X11-unix ]; then
export DISPLAY=$(ls /tmp/.X11-unix | tr 'X' ':' | head -n 1)
fi


{{ python-executable }} -s \
-u "${APPDIR}/opt/stargate/scripts/stargate" "$@"

0 comments on commit 2b6e9a5

Please sign in to comment.