~osomon/+junk/0ad-snap

« back to all changes in this revision

Viewing changes to play0ad.launcher

  • Committer: Olivier Tilloy
  • Date: 2019-07-15 12:57:34 UTC
  • Revision ID: olivier@tilloy.net-20190715125734-yx77yamg74gzmti4
Make PulseAudio socket available in snap-specific XDG_RUNTIME_DIR.

Taken from https://github.com/ubuntu/snapcraft-desktop-helpers/commit/52f6f177ab43e6a3c35a7aafe19cbe310a42f8e2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
export XDG_CACHE_HOME=$SNAP_USER_DATA/.cache
41
41
mkdir -p $XDG_CACHE_HOME
42
42
 
 
43
# Make PulseAudio socket available inside the snap-specific $XDG_RUNTIME_DIR
 
44
if [ -n "$XDG_RUNTIME_DIR" ]; then
 
45
    pulsenative="pulse/native"
 
46
    pulseaudio_sockpath="$XDG_RUNTIME_DIR/../$pulsenative"
 
47
    if [ -S "$pulseaudio_sockpath" ]; then
 
48
        export PULSE_SERVER="unix:${pulseaudio_sockpath}"
 
49
    fi
 
50
fi
 
51
 
43
52
# Font Config and themes
44
53
export FONTCONFIG_PATH=$SNAP/etc/fonts/conf.d
45
54
export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf