Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AppImage] Move lmms wrapper script into AppRun #4069

Closed
ghost opened this issue Dec 23, 2017 · 4 comments
Closed

[AppImage] Move lmms wrapper script into AppRun #4069

ghost opened this issue Dec 23, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2017

In the AppImage building process, there is originally a wrapper shell script named lmms, used to start the real LMMS executable lmms.real. This wrapper script is unused in the RC5 AppImage build. Instead, the AppRun script is used directly to start the LMMS executable. Code responsible for setting some environment variables, is not present in the AppRun script, which leads to issues like the GUI not scaling properly.

user@user-pc:~$ ps -aux
user      7579  0.0  0.0  15304  3020 pts/1    S+   14:17   0:00 bash /tmp/.mount_lmms-1PHiOKW/AppRun
user      7582  0.3  0.0  22340  2724 ?        Ssl  14:17   0:00 ./lmms-1.2.0-rc5-linux-x86_64.AppImage
user      7593 41.8  2.7 2023764 220588 pts/1  Sl+  14:17   1:10 /tmp/.mount_lmms-1PHiOKW/usr/bin/lmms.real

user@user-pc:~$ cat /tmp/.mount_lmms-1PHiOKW/AppRun
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if which carla > /dev/null 2>&1; then
   CARLAPATH="/usr/bin/carla"
   CARLAPREFIX="${CARLAPATH%/bin*}"
   echo "Carla appears to be installed on this system at $CARLAPREFIX/lib[64]/carla so we'll use it."
   export LD_LIBRARY_PATH=$CARLAPREFIX/lib/carla:$CARLAPREFIX/lib64/carla:$LD_LIBRARY_PATH
else
   echo "Carla does not appear to be installed.  That's OK, please ignore any related library errors."
fi
export LD_LIBRARY_PATH=$DIR/usr/lib/:$DIR/usr/lib/lmms:$LD_LIBRARY_PATH
# Prevent segfault on VirualBox
if lsmod |grep vboxguest > /dev/null 2>&1; then
   echo "VirtualBox detected.  Forcing libgl software rendering."
   export LIBGL_ALWAYS_SOFTWARE=1;
fi
if ldconfig -p | grep libjack.so.0 > /dev/null 2>&1; then
   echo "Jack appears to be installed on this system, so we'll use it."
else
   echo "Jack does not appear to be installed.  That's OK, we'll use a dummy version instead."
   export LD_LIBRARY_PATH=$DIR/usr/lib/lmms/optional:$LD_LIBRARY_PATH
fi
QT_X11_NO_NATIVE_MENUBAR=1 $DIR/usr/bin/lmms.real "$@"

user@user-pc:~$ env QT_AUTO_SCREEN_SCALE_FACTOR=1 ./lmms-1.2.0-rc5-linux-x86_64.AppImage
# Scales perfectly
@tresf
Copy link
Member

tresf commented Dec 23, 2017

What makes you think this script is not being executed?

@ghost
Copy link
Author

ghost commented Dec 24, 2017 via email

@tresf
Copy link
Member

tresf commented Dec 24, 2017

@flynn16 yes, we had to turn it off. You should be able to turn it back on with QT_AUTO_SCREEN_SCALE_FACTOR=1 ./lmms-1.2.0-rc5-linux-x86_64.AppImage. If that doesn't work, you can export it in a separate variable. When this behavior becomes more reliable in Qt, we'll happily turn it back on.

@tresf tresf closed this as completed Dec 24, 2017
@tresf
Copy link
Member

tresf commented Aug 25, 2018

FYI, @flynn16, it appearslinuxdeployqt will eventually be succeeded by linuxdeploy, which allows a custom AppRun to be specified.

I think this is the best approach long-term.

Reference: probonopd/linuxdeployqt#289 (comment)

For the short-term we will continue to use linuxdeployqt with the lmms.real workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant