File size: 1,448 Bytes
e5a3ec0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Launch script for LabPlot (Qt5/KF5 native desktop application)
# Self-contained: sets all runtime env and execs the installed binary.
set -e

INSTALL_PREFIX="/workspace/install"
BIN="$INSTALL_PREFIX/bin/labplot2"

# --- Display ---
# Use the pipeline-managed display as-is.
export DISPLAY="${DISPLAY:-:0}"

# --- Data / resource discovery ---
# The app is installed to a non-standard prefix, so make sure Qt/KF5 and
# freedesktop machinery can find its data, icons, mime, appdata, etc.
export XDG_DATA_DIRS="$INSTALL_PREFIX/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"

# Writable runtime/config/cache dirs (fall back for unprivileged users).
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$(mktemp -d)}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
mkdir -p "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" 2>/dev/null || true

# --- Library path ---
export LD_LIBRARY_PATH="$INSTALL_PREFIX/lib:$INSTALL_PREFIX/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}"

# --- Qt plugin path (system Qt5 plugins) ---
for qtplug in /usr/lib/x86_64-linux-gnu/qt5/plugins /usr/lib/qt5/plugins; do
    [ -d "$qtplug" ] && export QT_PLUGIN_PATH="$qtplug:${QT_PLUGIN_PATH}"
done

# Native GTK/Qt apps expose AT-SPI via the ATK/Qt bridge on the shared session
# bus. Do NOT disable the a11y bridge; join the existing session bus.
export NO_AT_BRIDGE=0
export QT_ACCESSIBILITY=1

exec "$BIN" "$@"