Skip to content

Instantly share code, notes, and snippets.

@mjarkk
Created December 4, 2020 15:23
Show Gist options
  • Select an option

  • Save mjarkk/df2aeaeaf69e6263adb0890ff3b42d89 to your computer and use it in GitHub Desktop.

Select an option

Save mjarkk/df2aeaeaf69e6263adb0890ff3b42d89 to your computer and use it in GitHub Desktop.

Revisions

  1. mjarkk created this gist Dec 4, 2020.
    18 changes: 18 additions & 0 deletions app.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/bin/bash

    if [ -z "$CONTAINER_GPU" ]; then CONTAINER_GPU=0; fi

    echo "#!/bin/bash" > ~/.brioche_last_app.sh
    echo "xhost +" >> ~/.brioche_last_app.sh
    echo "/usr/bin/start-pulseaudio-x11" >> ~/.brioche_last_app.sh
    echo "${@:1}" >> ~/.brioche_last_app.sh
    chmod 0755 ~/.brioche_last_app.sh

    export GDK_SCALE=2
    export SOMMELIER_ARGS="--scale=2"
    sommelier \
    -X --x-display=:0 \
    --shm-driver=noop \
    --drm-device=/dev/dri/card$CONTAINER_GPU \
    --glamor $SOMMELIER_ARGS \
    ~/.brioche_last_app.sh > /dev/null