Skip to content

Commit 224c00e

Browse files
committed
fix(AppImage): AppImages fail to run if appimaged process is running
Closes #827
1 parent 4536e91 commit 224c00e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

templates/linux/AppRun.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
3939
export XDG_DATA_DIRS="${APPDIR}/usr/share:${XDG_DATA_DIRS}"
4040
export GSETTINGS_SCHEMA_DIR="${APPDIR}/usr/share/glib-2.0/schemas:${GSETTINGS_SCHEMA_DIR}"
4141

42+
DESKTOP_FILE=$(find "$APPDIR" -maxdepth 1 -name "*.desktop" | head -n 1)
43+
DESKTOP_FILE_NAME=$(basename "${DESKTOP_FILE}")
44+
APP="${DESKTOP_FILE_NAME%.*}"
45+
BIN="$APPDIR/usr/bin/$APP"
46+
4247
trap atexit EXIT
4348

4449
# Note that the following handles 0, 1 or more arguments (file paths)
@@ -124,11 +129,6 @@ check_dep xdg-icon-resource
124129
check_dep xdg-mime
125130
check_dep xdg-desktop-menu
126131

127-
DESKTOP_FILE=$(find "$APPDIR" -maxdepth 1 -name "*.desktop" | head -n 1)
128-
DESKTOP_FILE_NAME=$(basename "${DESKTOP_FILE}")
129-
APP="${DESKTOP_FILE_NAME%.*}"
130-
BIN="$APPDIR/usr/bin/$APP"
131-
132132
if [ ! -f "$DESKTOP_FILE" ] ; then
133133
echo "Desktop file is missing. Please run ${THIS} from within an AppImage."
134134
exit 0

0 commit comments

Comments
 (0)