Skip to content

Commit 5af302c

Browse files
committed
Fix Linux crash on input by enforcing XCB and bundling Qt plugins
- Force QT_QPA_PLATFORM='xcb' in [main.py](cci:7://file:///e:/work/KnowEmail/main.py:0:0-0:0) to avoid Wayland input handling issues. - Update GitHub Actions workflow to use linuxdeploy-plugin-qt, ensuring proper bundling of Qt platform and input plugins for AppImages. - Resolves issue where application crashes upon typing in text fields on Linux distributions.
1 parent cbfb7f6 commit 5af302c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/build_and_release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,16 @@ jobs:
150150
cp AppDir/usr/share/applications/knowemail.desktop AppDir/knowemail.desktop
151151
cp AppDir/knowemail.png AppDir/.DirIcon
152152
153+
# --- AppImage ---
153154
# --- AppImage ---
154155
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
155-
chmod +x linuxdeploy-x86_64.AppImage
156+
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
157+
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
156158
157-
# Run linuxdeploy
158-
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
159+
# Run linuxdeploy with Qt plugin
160+
# We export the plugin path just in case, though usually it finds it in CWD
161+
export PATH=$(pwd):$PATH
162+
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
159163
160164
# Move and Rename AppImage
161165
mv KnowEmail-*.AppImage dist/KnowEmail-${TAG_NAME}-linux.AppImage

main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import sys
2+
import os
3+
4+
# Force XCB on Linux to prevent crashes on Wayland or missing plugin issues
5+
if sys.platform.startswith('linux'):
6+
os.environ['QT_QPA_PLATFORM'] = 'xcb'
7+
28
from src.gui import EmailValidatorApp
39
from PyQt5 import QtWidgets, QtCore
410
from PyQt5.QtWidgets import *

0 commit comments

Comments
 (0)