mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-05 16:38:17 +00:00
AppRun sets XDG_DATA_DIRS to
"$APPDIR/usr/local/share:$APPDIR/usr/share:$XDG_DATA_DIRS". When the host
leaves XDG_DATA_DIRS unset, the result contains no /usr/share, and setting
the variable at all suppresses the XDG default of /usr/local/share:/usr/share.
gdk-pixbuf 2.43+ (Arch, CachyOS, Gentoo, Fedora, openSUSE) no longer ships PNG,
JPEG or WebP as loader modules; libgdk_pixbuf links libglycin and decodes them
through it, and glycin discovers its loaders in
$XDG_DATA_DIRS/glycin-loaders/<ver>/conf.d/*.conf. With /usr/share missing,
glycin finds none and every PNG decode inside the AppImage fails with
"Unrecognized image file format".
RustDesk sends remote cursors to flutter_custom_cursor as PNG, and that plugin
returns nullptr from a std::string function when the decode fails, so the first
non-default cursor of a session aborts the process:
GdkPixbuf-CRITICAL **: gdk_pixbuf_copy: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Debian and Ubuntu compile PNG straight into libgdk_pixbuf and never reach
glycin, which is why this only affects non-Debian hosts.
Append the two XDG defaults so they are present when the host does not provide
them. They go last, so a session that sets XDG_DATA_DIRS properly keeps its own
precedence, and appending is a no-op where those paths are already listed.
Verified on CachyOS (gdk-pixbuf 2.44.7) against a stock 1.4.9 AppImage: with
only this variable changed, a full remote session runs without crashing and
renders remote cursors correctly.
Refs #4565 #5457 #7013 #9164 #10563 #11499 #12257 #14305 #14405 #15625
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
104 lines
4.5 KiB
YAML
104 lines
4.5 KiB
YAML
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
|
|
version: 1
|
|
script:
|
|
- rm -rf ./AppDir || true
|
|
- bsdtar -zxvf rustdesk.deb
|
|
- tar -xvf ./data.tar.xz
|
|
- mkdir ./AppDir
|
|
- mv ./usr ./AppDir/usr
|
|
# 32x32 icon
|
|
- for i in {32,64,128}; do mkdir -p ./AppDir/usr/share/icons/hicolor/$i\x$i/apps/; cp ../res/$i\x$i.png ./AppDir/usr/share/icons/hicolor/$i\x$i/apps/rustdesk.png; done
|
|
- mkdir -p ./AppDir/usr/share/icons/hicolor/scalable/apps/; cp ../res/scalable.svg ./AppDir/usr/share/icons/hicolor/scalable/apps/rustdesk.svg
|
|
# desktop file
|
|
# - sed -i "s/Icon=\/usr\/share\/rustdesk\/files\/rustdesk.png/Icon=rustdesk/g" ./AppDir/usr/share/applications/rustdesk.desktop
|
|
- rm -rf ./AppDir/usr/share/applications
|
|
AppDir:
|
|
path: ./AppDir
|
|
app_info:
|
|
id: rustdesk
|
|
name: rustdesk
|
|
icon: rustdesk
|
|
version: 1.4.9
|
|
exec: usr/share/rustdesk/rustdesk
|
|
exec_args: $@
|
|
apt:
|
|
arch:
|
|
- arm64
|
|
allow_unauthenticated: true
|
|
sources:
|
|
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse
|
|
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
|
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse
|
|
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
|
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
|
|
universe multiverse
|
|
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
|
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted
|
|
universe multiverse
|
|
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
|
include:
|
|
- libc6:arm64
|
|
- libgtk-3-0
|
|
- libxcb-randr0
|
|
- libxdo3
|
|
- libxfixes3
|
|
- libxcb-shape0
|
|
- libxcb-xfixes0
|
|
- libasound2
|
|
- libsystemd0
|
|
- curl
|
|
- libva2
|
|
- libva-drm2
|
|
- libva-x11-2
|
|
- libgstreamer-plugins-base1.0-0
|
|
- gstreamer1.0-pipewire
|
|
- libwayland-client0
|
|
- libwayland-cursor0
|
|
- libwayland-egl1
|
|
- libpulse0
|
|
- packagekit-gtk3-module
|
|
- libcanberra-gtk3-module
|
|
- libdrm2
|
|
exclude:
|
|
- humanity-icon-theme
|
|
- hicolor-icon-theme
|
|
- adwaita-icon-theme
|
|
- ubuntu-mono
|
|
files:
|
|
include: []
|
|
exclude:
|
|
- usr/share/man
|
|
- usr/share/doc/*/README.*
|
|
- usr/share/doc/*/changelog.*
|
|
- usr/share/doc/*/NEWS.*
|
|
- usr/share/doc/*/TODO.*
|
|
runtime:
|
|
env:
|
|
GIO_MODULE_DIR: /lib64/gio/modules:/usr/lib/aarch64-linux-gnu/gio/modules:$APPDIR/usr/lib/aarch64-linux-gnu/gio/modules
|
|
GDK_BACKEND: x11
|
|
# Append the XDG defaults: AppRun drops /usr/share when the host has XDG_DATA_DIRS unset, and gdk-pixbuf 2.43+ (Arch, Fedora) then finds no glycin loaders, so every PNG decode fails and the first remote cursor aborts the process.
|
|
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:$XDG_DATA_DIRS:/usr/local/share:/usr/share
|
|
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/aarch64-linux-gnu:$APPDIR/usr/lib/aarch64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/aarch64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/aarch64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/aarch64-linux-gnu/pulseaudio:$APPDIR/usr/lib/aarch64-linux-gnu/sasl2:$APPDIR/usr/lib/aarch64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/aarch64
|
|
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
|
|
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
|
|
test:
|
|
fedora-30:
|
|
image: appimagecrafters/tests-env:fedora-30
|
|
command: ./AppRun
|
|
debian-stable:
|
|
image: appimagecrafters/tests-env:debian-stable
|
|
command: ./AppRun
|
|
archlinux-latest:
|
|
image: appimagecrafters/tests-env:archlinux-latest
|
|
command: ./AppRun
|
|
centos-7:
|
|
image: appimagecrafters/tests-env:centos-7
|
|
command: ./AppRun
|
|
ubuntu-xenial:
|
|
image: appimagecrafters/tests-env:ubuntu-xenial
|
|
command: ./AppRun
|
|
AppImage:
|
|
arch: aarch64
|
|
update-information: guess
|
|
comp: gzip
|