Resolve KASM-3480 "Feature/ new game images"

This commit is contained in:
Ryan Kuba 2022-11-02 15:40:14 +00:00 committed by Justin Travis
parent 1137d204f9
commit 813e9bcb25
21 changed files with 1208 additions and 5 deletions

View File

@ -5,7 +5,7 @@ variables:
KASM_RELEASE: "1.11.0"
DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG}
PLATFORM: "linux/amd64"
ARM_BUILDS: ",chromium,firefox,gimp,remmina,terminal,ubuntu-bionic-desktop,ubuntu-focal-desktop,ubuntu-jammy-desktop,vlc,vs-code,doom,sublime-text,tor-browser,java-dev,telegram,opensuse-15-desktop,oracle-8-desktop,libre-office,thunderbird,audacity,deluge,filezilla,inkscape,pinta,qbittorrent,vivaldi,"
ARM_BUILDS: ",chromium,firefox,gimp,remmina,terminal,ubuntu-bionic-desktop,ubuntu-focal-desktop,ubuntu-jammy-desktop,vlc,vs-code,doom,sublime-text,tor-browser,java-dev,telegram,opensuse-15-desktop,oracle-8-desktop,libre-office,thunderbird,audacity,deluge,filezilla,inkscape,pinta,qbittorrent,vivaldi,minetest,retroarch,super-tux-kart,"
CORE_IMAGE_TAG: "develop"
CORE_IMAGE: "core-ubuntu-focal"
USE_PRIVATE_IMAGES: 0
@ -38,6 +38,9 @@ variables:
- vs-code
.MULTI_ARCH_BUILDS2: &MULTI_ARCH_BUILDS2
- minetest
- retroarch
- super-tux-kart
- vivaldi
.SINGLE_ARCH_BUILDS: &SINGLE_ARCH_BUILDS
@ -137,7 +140,7 @@ build_app_images:
- aws-autoscale
parallel:
matrix:
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, remmina, discord, libre-office, thunderbird, atom, audacity, deluge, filezilla, inkscape, pinta, qbittorrent, blender, unityhub]
- KASM_IMAGE: [sublime-text, gimp, vs-code, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, remmina, discord, libre-office, thunderbird, atom, audacity, deluge, filezilla, inkscape, pinta, qbittorrent, blender, unityhub]
build_ubuntu_desktop_images:
stage: build
@ -207,6 +210,35 @@ build_non_ubuntu:
matrix:
- KASM_IMAGE: [centos-7-desktop, tracelabs, opensuse-15-desktop, oracle-7-desktop, oracle-8-desktop]
build_games:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
script:
- BUILD_PLATFORM=$PLATFORM
- if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi;
- echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}"
# to get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# to prepare the buildx env
- docker buildx create --use
# Ensure readme and description files are present
- ls docs/$KASM_IMAGE/README.md
- ls docs/$KASM_IMAGE/description.txt
# Check for private variable to build against private core images
- if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi;
- docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE .
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
parallel:
matrix:
- KASM_IMAGE: [doom, minetest, retroarch, super-tux-kart]
# These jobs should run on the feature/bugfix branches - anything that is not the develop or release branches. It should only push images to the private repos
build_multi_arch_dev:
stage: build
@ -332,6 +364,7 @@ test_multi_arch_dev:
except:
- develop
- /^release\/.*$/
needs: [ manifest_dev ]
tags:
- ${TAG}
parallel:
@ -363,6 +396,7 @@ test_multi_arch_dev2:
except:
- develop
- /^release\/.*$/
needs: [ manifest_dev2 ]
tags:
- ${TAG}
parallel:
@ -394,6 +428,7 @@ test_single_arch_dev:
except:
- develop
- /^release\/.*$/
needs: [ build_single_arch_dev ]
tags:
- aws-autoscale
parallel:
@ -412,6 +447,7 @@ manifest_dev:
except:
- develop
- /^release\/.*$/
needs: [ build_multi_arch_dev ]
tags:
- aws-autoscale
parallel:
@ -430,6 +466,7 @@ manifest_dev2:
except:
- develop
- /^release\/.*$/
needs: [ build_multi_arch_dev2 ]
tags:
- aws-autoscale
parallel:
@ -446,6 +483,7 @@ link_tests_single_arch_dev:
except:
- develop
- /^release\/.*$/
needs: [ test_single_arch_dev ]
parallel:
matrix:
- KASM_IMAGE: *SINGLE_ARCH_BUILDS
@ -460,6 +498,7 @@ link_tests_multi_arch_dev:
except:
- develop
- /^release\/.*$/
needs: [ test_multi_arch_dev ]
parallel:
matrix:
- ARCH: [ aarch64, x86_64 ]
@ -475,6 +514,7 @@ link_tests_multi_arch_dev2:
except:
- develop
- /^release\/.*$/
needs: [ test_multi_arch_dev2 ]
parallel:
matrix:
- ARCH: [ aarch64, x86_64 ]
@ -535,7 +575,7 @@ build_schedules_app_images:
- aws-autoscale
parallel:
matrix:
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, remmina, discord, libre-office, thunderbird, atom, audacity, deluge, filezilla, inkscape, pinta, qbittorrent, blender, unityhub]
- KASM_IMAGE: [sublime-text, gimp, vs-code, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, remmina, discord, libre-office, thunderbird, atom, audacity, deluge, filezilla, inkscape, pinta, qbittorrent, blender, unityhub]
build_schedules_ubuntu_desktop_images:
image: ${ORG_NAME}/docker-buildx-private:develop
@ -602,6 +642,34 @@ build_schedules_non_ubuntu:
matrix:
- KASM_IMAGE: [centos-7-desktop, tracelabs, opensuse-15-desktop, oracle-7-desktop, oracle-8-desktop]
build_schedules_games:
image: ${ORG_NAME}/docker-buildx-private:develop
stage: build
script:
- BUILD_PLATFORM=$PLATFORM
- if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi;
- echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}"
# to get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# to prepare the buildx env
- docker buildx create --use
# Ensure readme and description files are present
- ls docs/$KASM_IMAGE/README.md
- ls docs/$KASM_IMAGE/description.txt
# Check for private variable to build against private core images
- if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi;
# Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64.
# The only way to push multiple architectures to the same tag is to use buildx.
- docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE .
only:
- schedules
tags:
- aws-autoscale
parallel:
matrix:
- KASM_IMAGE: [doom, minetest, retroarch, super-tux-kart]
update_readmes:
stage: readme
script:
@ -688,6 +756,9 @@ update_readmes2:
parallel:
matrix:
- KASM_IMAGE:
- vivaldi
- minetest
- retroarch
- super-tux-kart
- ubuntu-jammy-dind
- ubuntu-jammy-dind-rootless
- vivaldi

34
dockerfile-kasm-minetest Normal file
View File

@ -0,0 +1,34 @@
ARG BASE_TAG="develop"
ARG BASE_IMAGE="core-ubuntu-focal"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
COPY ./src/ubuntu/install/minetest $INST_SCRIPTS/minetest/
RUN bash $INST_SCRIPTS/minetest/install_minetest.sh && rm -rf $INST_SCRIPTS/minetest/
COPY ./src/ubuntu/install/minetest/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod +x $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh
# Update the desktop environment to be optimized for a single application
RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel
######### End Customizations ###########
RUN chown 1000:0 $HOME
ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
USER 1000

34
dockerfile-kasm-retroarch Normal file
View File

@ -0,0 +1,34 @@
ARG BASE_TAG="develop"
ARG BASE_IMAGE="core-ubuntu-focal"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
COPY ./src/ubuntu/install/retroarch $INST_SCRIPTS/retroarch/
RUN bash $INST_SCRIPTS/retroarch/install_retroarch.sh && rm -rf $INST_SCRIPTS/retroarch/
COPY ./src/ubuntu/install/retroarch/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod +x $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh
# Update the desktop environment to be optimized for a single application
RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel
######### End Customizations ###########
RUN chown 1000:0 $HOME
ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
USER 1000

View File

@ -0,0 +1,34 @@
ARG BASE_TAG="develop"
ARG BASE_IMAGE="core-ubuntu-jammy"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
COPY ./src/ubuntu/install/super_tux_kart $INST_SCRIPTS/super_tux_kart/
RUN bash $INST_SCRIPTS/super_tux_kart/install_super_tux_kart.sh && rm -rf $INST_SCRIPTS/super_tux_kart/
COPY ./src/ubuntu/install/super_tux_kart/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod +x $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh
# Update the desktop environment to be optimized for a single application
RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel
######### End Customizations ###########
RUN chown 1000:0 $HOME
RUN $STARTUPDIR/set_user_permission.sh $HOME
ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
USER 1000

11
docs/minetest/README.md Normal file
View File

@ -0,0 +1,11 @@
# About This Image
This Image contains a browser-accessible version of [Minetest](https://www.minetest.net/).
![Screenshot][Image_Screenshot]
[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/minetest.png "Image Screenshot"
# Environment Variables
* `APP_ARGS` - Additional arguments to pass to the application when launched.

7
docs/minetest/demo.txt Normal file
View File

@ -0,0 +1,7 @@
# Live Demo
**Launch a real-time demo in a new browser window:** <a href="https://app.kasmweb.com/#/cast/8654875325" target="_blank">Live Demo</a>.
<a href="https://app.kasmweb.com/#/cast/8654875325" target="_blank"><img src="https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/casting-buttons/Minetest.png" width="300" height="104"></a>
&lowast;*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.*

View File

@ -0,0 +1 @@
Minetest for Kasm Workspaces

11
docs/retroarch/README.md Normal file
View File

@ -0,0 +1,11 @@
# About This Image
This Image contains a browser-accessible version of [Retroarch](https://www.retroarch.com/).
![Screenshot][Image_Screenshot]
[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/retroarch.png "Image Screenshot"
# Environment Variables
* `APP_ARGS` - Additional arguments to pass to the application when launched.

7
docs/retroarch/demo.txt Normal file
View File

@ -0,0 +1,7 @@
# Live Demo
**Launch a real-time demo in a new browser window:** <a href="https://app.kasmweb.com/#/cast/9387187179" target="_blank">Live Demo</a>.
<a href="https://app.kasmweb.com/#/cast/9387187179" target="_blank"><img src="https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/casting-buttons/RetroArch.png" width="300" height="104"></a>
&lowast;*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.*

View File

@ -0,0 +1 @@
RetroArch for Kasm Workspaces

View File

@ -0,0 +1,11 @@
# About This Image
This Image contains a browser-accessible version of [SuperTuxKart](https://supertuxkart.net/).
![Screenshot][Image_Screenshot]
[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/super-tux-kart.png "Image Screenshot"
# Environment Variables
* `APP_ARGS` - Additional arguments to pass to the application when launched.

View File

@ -0,0 +1,7 @@
# Live Demo
**Launch a real-time demo in a new browser window:** <a href="https://app.kasmweb.com/#/cast/4254995256" target="_blank">Live Demo</a>.
<a href="https://app.kasmweb.com/#/cast/4254995256" target="_blank"><img src="https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/casting-buttons/SuperTuxCart.png" width="300" height="104"></a>
&lowast;*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.*

View File

@ -0,0 +1 @@
SuperTuxKart for Kasm Workspaces

View File

@ -1 +1 @@
Steam for Kasm Workspaces
Microsoft Teams for Kasm Workspaces

View File

@ -0,0 +1,85 @@
#!/usr/bin/env bash
set -ex
START_COMMAND="/usr/bin/minetest"
PGREP="minetest"
export MAXIMIZE="true"
export MAXIMIZE_NAME="Minetest"
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
DEFAULT_ARGS=""
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
eval set -- "$options"
while [[ $1 != -- ]]; do
case $1 in
-g|--go) GO='true'; shift 1;;
-a|--assign) ASSIGN='true'; shift 1;;
-u|--url) OPT_URL=$2; shift 2;;
*) echo "bad option: $1" >&2; exit 1;;
esac
done
shift
# Process non-option arguments.
for arg; do
echo "arg! $arg"
done
FORCE=$2
kasm_exec() {
if [ -n "$OPT_URL" ] ; then
URL=$OPT_URL
elif [ -n "$1" ] ; then
URL=$1
fi
# Since we are execing into a container that already has the browser running from startup,
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
if [ -n "$URL" ] ; then
/usr/bin/filter_ready
/usr/bin/desktop_ready
bash ${MAXIMIZE_SCRIPT} &
$START_COMMAND $ARGS $OPT_URL
else
echo "No URL specified for exec command. Doing nothing."
fi
}
kasm_startup() {
if [ -n "$KASM_URL" ] ; then
URL=$KASM_URL
elif [ -z "$URL" ] ; then
URL=$LAUNCH_URL
fi
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
echo "Entering process startup loop"
set +x
while true
do
if ! pgrep -x $PGREP > /dev/null
then
/usr/bin/filter_ready
/usr/bin/desktop_ready
set +e
bash ${MAXIMIZE_SCRIPT} &
source $STARTUPDIR/generate_container_user
$START_COMMAND $ARGS $URL
set -e
fi
sleep 1
done
set -x
fi
}
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
kasm_exec
else
kasm_startup
fi

View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -ex
apt-get update
apt-get install -y minetest
# Add desktop icon
cp /usr/share/applications/net.minetest.minetest.desktop $HOME/Desktop/
chmod +x $HOME/Desktop/net.minetest.minetest.desktop
# Wrap game bin for VGL support
cat >/usr/bin/minetest <<EOL
#!/usr/bin/env bash
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then
echo "Starting Minetest with GPU Acceleration on EGL device \${KASM_EGL_CARD}"
vglrun -d "\${KASM_EGL_CARD}" /usr/games/minetest "\$@"
else
echo "Starting Minetest"
/usr/games/minetest "\$@"
fi
EOL
chmod +x /usr/bin/minetest
# Cleanup
apt-get autoclean
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

View File

@ -0,0 +1,85 @@
#!/usr/bin/env bash
set -ex
START_COMMAND="retroarch"
PGREP="retroarch"
export MAXIMIZE="false"
export MAXIMIZE_NAME="retroarch"
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
DEFAULT_ARGS="-f"
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
eval set -- "$options"
while [[ $1 != -- ]]; do
case $1 in
-g|--go) GO='true'; shift 1;;
-a|--assign) ASSIGN='true'; shift 1;;
-u|--url) OPT_URL=$2; shift 2;;
*) echo "bad option: $1" >&2; exit 1;;
esac
done
shift
# Process non-option arguments.
for arg; do
echo "arg! $arg"
done
FORCE=$2
kasm_exec() {
if [ -n "$OPT_URL" ] ; then
URL=$OPT_URL
elif [ -n "$1" ] ; then
URL=$1
fi
# Since we are execing into a container that already has the browser running from startup,
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
if [ -n "$URL" ] ; then
/usr/bin/filter_ready
/usr/bin/desktop_ready
bash ${MAXIMIZE_SCRIPT} &
$START_COMMAND $ARGS $OPT_URL
else
echo "No URL specified for exec command. Doing nothing."
fi
}
kasm_startup() {
if [ -n "$KASM_URL" ] ; then
URL=$KASM_URL
elif [ -z "$URL" ] ; then
URL=$LAUNCH_URL
fi
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
echo "Entering process startup loop"
set +x
while true
do
if ! pgrep -x $PGREP > /dev/null
then
/usr/bin/filter_ready
/usr/bin/desktop_ready
set +e
bash ${MAXIMIZE_SCRIPT} &
source $STARTUPDIR/generate_container_user
$START_COMMAND $ARGS $URL
set -e
fi
sleep 1
done
set -x
fi
}
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
kasm_exec
else
kasm_startup
fi

View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -ex
SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
add-apt-repository -y ppa:libretro/stable
apt-get update
apt-get install -y retroarch
cp /usr/share/applications/retroarch.desktop $HOME/Desktop/
chmod +x $HOME/Desktop/retroarch.desktop
mkdir -p $HOME/.config/retroarch/{assets,cores}
cp $SCRIPT_PATH/retroarch.cfg $HOME/.config/retroarch/retroarch.cfg
echo "Downloading Assets"
wget -q https://buildbot.libretro.com/assets/frontend/assets.zip
wget -q https://buildbot.libretro.com/assets/frontend/info.zip
unzip assets.zip -d $HOME/.config/retroarch/assets
unzip info.zip -d $HOME/.config/retroarch/cores
rm -f assets.zip info.zip
chown -R 1000:1000 $HOME/.config/retroarch
# Wrap with VGL
rm /usr/bin/retroarch
cat >/usr/bin/retroarch <<EOL
#!/usr/bin/env bash
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then
echo "Starting Retroarch with GPU Acceleration on EGL device \${KASM_EGL_CARD}"
vglrun -d "\${KASM_EGL_CARD}" /usr/games/retroarch "\$@"
else
echo "Starting Retroarch"
/usr/games/retroarch "\$@"
fi
EOL
chmod +x /usr/bin/retroarch
cat >/usr/bin/desktop_ready <<EOL
#!/usr/bin/env bash
until pids=\$(pidof Thunar); do sleep .5; done
EOL
chmod +x /usr/bin/desktop_ready
# Cleanup
apt-get autoclean
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

View File

@ -0,0 +1,588 @@
input_player1_a = "x"
input_player1_a_axis = "nul"
input_player1_a_btn = "1"
input_player1_a_mbtn = "nul"
input_player1_analog_dpad_mode = "0"
input_player1_b = "z"
input_player1_b_axis = "nul"
input_player1_b_btn = "0"
input_player1_b_mbtn = "nul"
input_player1_down = "down"
input_player1_down_axis = "nul"
input_player1_down_btn = "13"
input_player1_down_mbtn = "nul"
input_player1_gun_aux_a = "nul"
input_player1_gun_aux_a_axis = "nul"
input_player1_gun_aux_a_btn = "nul"
input_player1_gun_aux_a_mbtn = "nul"
input_player1_gun_aux_b = "nul"
input_player1_gun_aux_b_axis = "nul"
input_player1_gun_aux_b_btn = "nul"
input_player1_gun_aux_b_mbtn = "nul"
input_player1_gun_aux_c = "nul"
input_player1_gun_aux_c_axis = "nul"
input_player1_gun_aux_c_btn = "nul"
input_player1_gun_aux_c_mbtn = "nul"
input_player1_gun_dpad_down = "nul"
input_player1_gun_dpad_down_axis = "nul"
input_player1_gun_dpad_down_btn = "nul"
input_player1_gun_dpad_down_mbtn = "nul"
input_player1_gun_dpad_left = "nul"
input_player1_gun_dpad_left_axis = "nul"
input_player1_gun_dpad_left_btn = "nul"
input_player1_gun_dpad_left_mbtn = "nul"
input_player1_gun_dpad_right = "nul"
input_player1_gun_dpad_right_axis = "nul"
input_player1_gun_dpad_right_btn = "nul"
input_player1_gun_dpad_right_mbtn = "nul"
input_player1_gun_dpad_up = "nul"
input_player1_gun_dpad_up_axis = "nul"
input_player1_gun_dpad_up_btn = "nul"
input_player1_gun_dpad_up_mbtn = "nul"
input_player1_gun_offscreen_shot = "nul"
input_player1_gun_offscreen_shot_axis = "nul"
input_player1_gun_offscreen_shot_btn = "nul"
input_player1_gun_offscreen_shot_mbtn = "nul"
input_player1_gun_select = "nul"
input_player1_gun_select_axis = "nul"
input_player1_gun_select_btn = "nul"
input_player1_gun_select_mbtn = "nul"
input_player1_gun_start = "nul"
input_player1_gun_start_axis = "nul"
input_player1_gun_start_btn = "nul"
input_player1_gun_start_mbtn = "nul"
input_player1_gun_trigger = "nul"
input_player1_gun_trigger_axis = "nul"
input_player1_gun_trigger_btn = "nul"
input_player1_gun_trigger_mbtn = "1"
input_player1_joypad_index = "0"
input_player1_l = "q"
input_player1_l2 = "nul"
input_player1_l2_axis = "nul"
input_player1_l2_btn = "6"
input_player1_l2_mbtn = "nul"
input_player1_l3 = "nul"
input_player1_l3_axis = "nul"
input_player1_l3_btn = "10"
input_player1_l3_mbtn = "nul"
input_player1_l_axis = "nul"
input_player1_l_btn = "4"
input_player1_l_mbtn = "nul"
input_player1_l_x_minus = "nul"
input_player1_l_x_minus_axis = "-0"
input_player1_l_x_minus_btn = "nul"
input_player1_l_x_minus_mbtn = "nul"
input_player1_l_x_plus = "nul"
input_player1_l_x_plus_axis = "+0"
input_player1_l_x_plus_btn = "nul"
input_player1_l_x_plus_mbtn = "nul"
input_player1_l_y_minus = "nul"
input_player1_l_y_minus_axis = "-1"
input_player1_l_y_minus_btn = "nul"
input_player1_l_y_minus_mbtn = "nul"
input_player1_l_y_plus = "nul"
input_player1_l_y_plus_axis = "+1"
input_player1_l_y_plus_btn = "nul"
input_player1_l_y_plus_mbtn = "nul"
input_player1_left = "left"
input_player1_left_axis = "nul"
input_player1_left_btn = "14"
input_player1_left_mbtn = "nul"
input_player1_mouse_index = "0"
input_player1_r = "w"
input_player1_r2 = "nul"
input_player1_r2_axis = "nul"
input_player1_r2_btn = "7"
input_player1_r2_mbtn = "nul"
input_player1_r3 = "nul"
input_player1_r3_axis = "nul"
input_player1_r3_btn = "11"
input_player1_r3_mbtn = "nul"
input_player1_r_axis = "nul"
input_player1_r_btn = "5"
input_player1_r_mbtn = "nul"
input_player1_r_x_minus = "nul"
input_player1_r_x_minus_axis = "-2"
input_player1_r_x_minus_btn = "nul"
input_player1_r_x_minus_mbtn = "nul"
input_player1_r_x_plus = "nul"
input_player1_r_x_plus_axis = "+2"
input_player1_r_x_plus_btn = "nul"
input_player1_r_x_plus_mbtn = "nul"
input_player1_r_y_minus = "nul"
input_player1_r_y_minus_axis = "-3"
input_player1_r_y_minus_btn = "nul"
input_player1_r_y_minus_mbtn = "nul"
input_player1_r_y_plus = "nul"
input_player1_r_y_plus_axis = "+3"
input_player1_r_y_plus_btn = "nul"
input_player1_r_y_plus_mbtn = "nul"
input_player1_right = "right"
input_player1_right_axis = "nul"
input_player1_right_btn = "15"
input_player1_right_mbtn = "nul"
input_player1_select = "rshift"
input_player1_select_axis = "nul"
input_player1_select_btn = "8"
input_player1_select_mbtn = "nul"
input_player1_start = "enter"
input_player1_start_axis = "nul"
input_player1_start_btn = "9"
input_player1_start_mbtn = "nul"
input_player1_turbo = "nul"
input_player1_turbo_axis = "nul"
input_player1_turbo_btn = "nul"
input_player1_turbo_mbtn = "nul"
input_player1_up = "up"
input_player1_up_axis = "nul"
input_player1_up_btn = "12"
input_player1_up_mbtn = "nul"
input_player1_x = "s"
input_player1_x_axis = "nul"
input_player1_x_btn = "3"
input_player1_x_mbtn = "nul"
input_player1_y = "a"
input_player1_y_axis = "nul"
input_player1_y_btn = "2"
input_player1_y_mbtn = "nul"
input_player2_a = "nul"
input_player2_a_axis = "nul"
input_player2_a_btn = "1"
input_player2_a_mbtn = "nul"
input_player2_analog_dpad_mode = "0"
input_player2_b = "nul"
input_player2_b_axis = "nul"
input_player2_b_btn = "0"
input_player2_b_mbtn = "nul"
input_player2_down = "nul"
input_player2_down_axis = "nul"
input_player2_down_btn = "13"
input_player2_down_mbtn = "nul"
input_player2_gun_aux_a = "nul"
input_player2_gun_aux_a_axis = "nul"
input_player2_gun_aux_a_btn = "nul"
input_player2_gun_aux_a_mbtn = "nul"
input_player2_gun_aux_b = "nul"
input_player2_gun_aux_b_axis = "nul"
input_player2_gun_aux_b_btn = "nul"
input_player2_gun_aux_b_mbtn = "nul"
input_player2_gun_aux_c = "nul"
input_player2_gun_aux_c_axis = "nul"
input_player2_gun_aux_c_btn = "nul"
input_player2_gun_aux_c_mbtn = "nul"
input_player2_gun_dpad_down = "nul"
input_player2_gun_dpad_down_axis = "nul"
input_player2_gun_dpad_down_btn = "nul"
input_player2_gun_dpad_down_mbtn = "nul"
input_player2_gun_dpad_left = "nul"
input_player2_gun_dpad_left_axis = "nul"
input_player2_gun_dpad_left_btn = "nul"
input_player2_gun_dpad_left_mbtn = "nul"
input_player2_gun_dpad_right = "nul"
input_player2_gun_dpad_right_axis = "nul"
input_player2_gun_dpad_right_btn = "nul"
input_player2_gun_dpad_right_mbtn = "nul"
input_player2_gun_dpad_up = "nul"
input_player2_gun_dpad_up_axis = "nul"
input_player2_gun_dpad_up_btn = "nul"
input_player2_gun_dpad_up_mbtn = "nul"
input_player2_gun_offscreen_shot = "nul"
input_player2_gun_offscreen_shot_axis = "nul"
input_player2_gun_offscreen_shot_btn = "nul"
input_player2_gun_offscreen_shot_mbtn = "nul"
input_player2_gun_select = "nul"
input_player2_gun_select_axis = "nul"
input_player2_gun_select_btn = "nul"
input_player2_gun_select_mbtn = "nul"
input_player2_gun_start = "nul"
input_player2_gun_start_axis = "nul"
input_player2_gun_start_btn = "nul"
input_player2_gun_start_mbtn = "nul"
input_player2_gun_trigger = "nul"
input_player2_gun_trigger_axis = "nul"
input_player2_gun_trigger_btn = "nul"
input_player2_gun_trigger_mbtn = "1"
input_player2_joypad_index = "1"
input_player2_l = "nul"
input_player2_l2 = "nul"
input_player2_l2_axis = "nul"
input_player2_l2_btn = "6"
input_player2_l2_mbtn = "nul"
input_player2_l3 = "nul"
input_player2_l3_axis = "nul"
input_player2_l3_btn = "10"
input_player2_l3_mbtn = "nul"
input_player2_l_axis = "nul"
input_player2_l_btn = "4"
input_player2_l_mbtn = "nul"
input_player2_l_x_minus = "nul"
input_player2_l_x_minus_axis = "-0"
input_player2_l_x_minus_btn = "nul"
input_player2_l_x_minus_mbtn = "nul"
input_player2_l_x_plus = "nul"
input_player2_l_x_plus_axis = "+0"
input_player2_l_x_plus_btn = "nul"
input_player2_l_x_plus_mbtn = "nul"
input_player2_l_y_minus = "nul"
input_player2_l_y_minus_axis = "-1"
input_player2_l_y_minus_btn = "nul"
input_player2_l_y_minus_mbtn = "nul"
input_player2_l_y_plus = "nul"
input_player2_l_y_plus_axis = "+1"
input_player2_l_y_plus_btn = "nul"
input_player2_l_y_plus_mbtn = "nul"
input_player2_left = "nul"
input_player2_left_axis = "nul"
input_player2_left_btn = "14"
input_player2_left_mbtn = "nul"
input_player2_mouse_index = "1"
input_player2_r = "nul"
input_player2_r2 = "nul"
input_player2_r2_axis = "nul"
input_player2_r2_btn = "7"
input_player2_r2_mbtn = "nul"
input_player2_r3 = "nul"
input_player2_r3_axis = "nul"
input_player2_r3_btn = "11"
input_player2_r3_mbtn = "nul"
input_player2_r_axis = "nul"
input_player2_r_btn = "5"
input_player2_r_mbtn = "nul"
input_player2_r_x_minus = "nul"
input_player2_r_x_minus_axis = "-2"
input_player2_r_x_minus_btn = "nul"
input_player2_r_x_minus_mbtn = "nul"
input_player2_r_x_plus = "nul"
input_player2_r_x_plus_axis = "+2"
input_player2_r_x_plus_btn = "nul"
input_player2_r_x_plus_mbtn = "nul"
input_player2_r_y_minus = "nul"
input_player2_r_y_minus_axis = "-3"
input_player2_r_y_minus_btn = "nul"
input_player2_r_y_minus_mbtn = "nul"
input_player2_r_y_plus = "nul"
input_player2_r_y_plus_axis = "+3"
input_player2_r_y_plus_btn = "nul"
input_player2_r_y_plus_mbtn = "nul"
input_player2_right = "nul"
input_player2_right_axis = "nul"
input_player2_right_btn = "15"
input_player2_right_mbtn = "nul"
input_player2_select = "nul"
input_player2_select_axis = "nul"
input_player2_select_btn = "8"
input_player2_select_mbtn = "nul"
input_player2_start = "nul"
input_player2_start_axis = "nul"
input_player2_start_btn = "9"
input_player2_start_mbtn = "nul"
input_player2_turbo = "nul"
input_player2_turbo_axis = "nul"
input_player2_turbo_btn = "nul"
input_player2_turbo_mbtn = "nul"
input_player2_up = "nul"
input_player2_up_axis = "nul"
input_player2_up_btn = "12"
input_player2_up_mbtn = "nul"
input_player2_x = "nul"
input_player2_x_axis = "nul"
input_player2_x_btn = "3"
input_player2_x_mbtn = "nul"
input_player2_y = "nul"
input_player2_y_axis = "nul"
input_player2_y_btn = "2"
input_player2_y_mbtn = "nul"
input_player3_a = "nul"
input_player3_a_axis = "nul"
input_player3_a_btn = "1"
input_player3_a_mbtn = "nul"
input_player3_analog_dpad_mode = "0"
input_player3_b = "nul"
input_player3_b_axis = "nul"
input_player3_b_btn = "0"
input_player3_b_mbtn = "nul"
input_player3_down = "nul"
input_player3_down_axis = "nul"
input_player3_down_btn = "13"
input_player3_down_mbtn = "nul"
input_player3_gun_aux_a = "nul"
input_player3_gun_aux_a_axis = "nul"
input_player3_gun_aux_a_btn = "nul"
input_player3_gun_aux_a_mbtn = "nul"
input_player3_gun_aux_b = "nul"
input_player3_gun_aux_b_axis = "nul"
input_player3_gun_aux_b_btn = "nul"
input_player3_gun_aux_b_mbtn = "nul"
input_player3_gun_aux_c = "nul"
input_player3_gun_aux_c_axis = "nul"
input_player3_gun_aux_c_btn = "nul"
input_player3_gun_aux_c_mbtn = "nul"
input_player3_gun_dpad_down = "nul"
input_player3_gun_dpad_down_axis = "nul"
input_player3_gun_dpad_down_btn = "nul"
input_player3_gun_dpad_down_mbtn = "nul"
input_player3_gun_dpad_left = "nul"
input_player3_gun_dpad_left_axis = "nul"
input_player3_gun_dpad_left_btn = "nul"
input_player3_gun_dpad_left_mbtn = "nul"
input_player3_gun_dpad_right = "nul"
input_player3_gun_dpad_right_axis = "nul"
input_player3_gun_dpad_right_btn = "nul"
input_player3_gun_dpad_right_mbtn = "nul"
input_player3_gun_dpad_up = "nul"
input_player3_gun_dpad_up_axis = "nul"
input_player3_gun_dpad_up_btn = "nul"
input_player3_gun_dpad_up_mbtn = "nul"
input_player3_gun_offscreen_shot = "nul"
input_player3_gun_offscreen_shot_axis = "nul"
input_player3_gun_offscreen_shot_btn = "nul"
input_player3_gun_offscreen_shot_mbtn = "nul"
input_player3_gun_select = "nul"
input_player3_gun_select_axis = "nul"
input_player3_gun_select_btn = "nul"
input_player3_gun_select_mbtn = "nul"
input_player3_gun_start = "nul"
input_player3_gun_start_axis = "nul"
input_player3_gun_start_btn = "nul"
input_player3_gun_start_mbtn = "nul"
input_player3_gun_trigger = "nul"
input_player3_gun_trigger_axis = "nul"
input_player3_gun_trigger_btn = "nul"
input_player3_gun_trigger_mbtn = "1"
input_player3_joypad_index = "2"
input_player3_l = "nul"
input_player3_l2 = "nul"
input_player3_l2_axis = "nul"
input_player3_l2_btn = "6"
input_player3_l2_mbtn = "nul"
input_player3_l3 = "nul"
input_player3_l3_axis = "nul"
input_player3_l3_btn = "10"
input_player3_l3_mbtn = "nul"
input_player3_l_axis = "nul"
input_player3_l_btn = "4"
input_player3_l_mbtn = "nul"
input_player3_l_x_minus = "nul"
input_player3_l_x_minus_axis = "-0"
input_player3_l_x_minus_btn = "nul"
input_player3_l_x_minus_mbtn = "nul"
input_player3_l_x_plus = "nul"
input_player3_l_x_plus_axis = "+0"
input_player3_l_x_plus_btn = "nul"
input_player3_l_x_plus_mbtn = "nul"
input_player3_l_y_minus = "nul"
input_player3_l_y_minus_axis = "-1"
input_player3_l_y_minus_btn = "nul"
input_player3_l_y_minus_mbtn = "nul"
input_player3_l_y_plus = "nul"
input_player3_l_y_plus_axis = "+1"
input_player3_l_y_plus_btn = "nul"
input_player3_l_y_plus_mbtn = "nul"
input_player3_left = "nul"
input_player3_left_axis = "nul"
input_player3_left_btn = "14"
input_player3_left_mbtn = "nul"
input_player3_mouse_index = "2"
input_player3_r = "nul"
input_player3_r2 = "nul"
input_player3_r2_axis = "nul"
input_player3_r2_btn = "7"
input_player3_r2_mbtn = "nul"
input_player3_r3 = "nul"
input_player3_r3_axis = "nul"
input_player3_r3_btn = "11"
input_player3_r3_mbtn = "nul"
input_player3_r_axis = "nul"
input_player3_r_btn = "5"
input_player3_r_mbtn = "nul"
input_player3_r_x_minus = "nul"
input_player3_r_x_minus_axis = "-2"
input_player3_r_x_minus_btn = "nul"
input_player3_r_x_minus_mbtn = "nul"
input_player3_r_x_plus = "nul"
input_player3_r_x_plus_axis = "+2"
input_player3_r_x_plus_btn = "nul"
input_player3_r_x_plus_mbtn = "nul"
input_player3_r_y_minus = "nul"
input_player3_r_y_minus_axis = "-3"
input_player3_r_y_minus_btn = "nul"
input_player3_r_y_minus_mbtn = "nul"
input_player3_r_y_plus = "nul"
input_player3_r_y_plus_axis = "+3"
input_player3_r_y_plus_btn = "nul"
input_player3_r_y_plus_mbtn = "nul"
input_player3_right = "nul"
input_player3_right_axis = "nul"
input_player3_right_btn = "15"
input_player3_right_mbtn = "nul"
input_player3_select = "nul"
input_player3_select_axis = "nul"
input_player3_select_btn = "8"
input_player3_select_mbtn = "nul"
input_player3_start = "nul"
input_player3_start_axis = "nul"
input_player3_start_btn = "9"
input_player3_start_mbtn = "nul"
input_player3_turbo = "nul"
input_player3_turbo_axis = "nul"
input_player3_turbo_btn = "nul"
input_player3_turbo_mbtn = "nul"
input_player3_up = "nul"
input_player3_up_axis = "nul"
input_player3_up_btn = "12"
input_player3_up_mbtn = "nul"
input_player3_x = "nul"
input_player3_x_axis = "nul"
input_player3_x_btn = "3"
input_player3_x_mbtn = "nul"
input_player3_y = "nul"
input_player3_y_axis = "nul"
input_player3_y_btn = "2"
input_player3_y_mbtn = "nul"
input_player4_a = "nul"
input_player4_a_axis = "nul"
input_player4_a_btn = "1"
input_player4_a_mbtn = "nul"
input_player4_analog_dpad_mode = "0"
input_player4_b = "nul"
input_player4_b_axis = "nul"
input_player4_b_btn = "0"
input_player4_b_mbtn = "nul"
input_player4_down = "nul"
input_player4_down_axis = "nul"
input_player4_down_btn = "13"
input_player4_down_mbtn = "nul"
input_player4_gun_aux_a = "nul"
input_player4_gun_aux_a_axis = "nul"
input_player4_gun_aux_a_btn = "nul"
input_player4_gun_aux_a_mbtn = "nul"
input_player4_gun_aux_b = "nul"
input_player4_gun_aux_b_axis = "nul"
input_player4_gun_aux_b_btn = "nul"
input_player4_gun_aux_b_mbtn = "nul"
input_player4_gun_aux_c = "nul"
input_player4_gun_aux_c_axis = "nul"
input_player4_gun_aux_c_btn = "nul"
input_player4_gun_aux_c_mbtn = "nul"
input_player4_gun_dpad_down = "nul"
input_player4_gun_dpad_down_axis = "nul"
input_player4_gun_dpad_down_btn = "nul"
input_player4_gun_dpad_down_mbtn = "nul"
input_player4_gun_dpad_left = "nul"
input_player4_gun_dpad_left_axis = "nul"
input_player4_gun_dpad_left_btn = "nul"
input_player4_gun_dpad_left_mbtn = "nul"
input_player4_gun_dpad_right = "nul"
input_player4_gun_dpad_right_axis = "nul"
input_player4_gun_dpad_right_btn = "nul"
input_player4_gun_dpad_right_mbtn = "nul"
input_player4_gun_dpad_up = "nul"
input_player4_gun_dpad_up_axis = "nul"
input_player4_gun_dpad_up_btn = "nul"
input_player4_gun_dpad_up_mbtn = "nul"
input_player4_gun_offscreen_shot = "nul"
input_player4_gun_offscreen_shot_axis = "nul"
input_player4_gun_offscreen_shot_btn = "nul"
input_player4_gun_offscreen_shot_mbtn = "nul"
input_player4_gun_select = "nul"
input_player4_gun_select_axis = "nul"
input_player4_gun_select_btn = "nul"
input_player4_gun_select_mbtn = "nul"
input_player4_gun_start = "nul"
input_player4_gun_start_axis = "nul"
input_player4_gun_start_btn = "nul"
input_player4_gun_start_mbtn = "nul"
input_player4_gun_trigger = "nul"
input_player4_gun_trigger_axis = "nul"
input_player4_gun_trigger_btn = "nul"
input_player4_gun_trigger_mbtn = "1"
input_player4_joypad_index = "3"
input_player4_l = "nul"
input_player4_l2 = "nul"
input_player4_l2_axis = "nul"
input_player4_l2_btn = "6"
input_player4_l2_mbtn = "nul"
input_player4_l3 = "nul"
input_player4_l3_axis = "nul"
input_player4_l3_btn = "10"
input_player4_l3_mbtn = "nul"
input_player4_l_axis = "nul"
input_player4_l_btn = "4"
input_player4_l_mbtn = "nul"
input_player4_l_x_minus = "nul"
input_player4_l_x_minus_axis = "-0"
input_player4_l_x_minus_btn = "nul"
input_player4_l_x_minus_mbtn = "nul"
input_player4_l_x_plus = "nul"
input_player4_l_x_plus_axis = "+0"
input_player4_l_x_plus_btn = "nul"
input_player4_l_x_plus_mbtn = "nul"
input_player4_l_y_minus = "nul"
input_player4_l_y_minus_axis = "-1"
input_player4_l_y_minus_btn = "nul"
input_player4_l_y_minus_mbtn = "nul"
input_player4_l_y_plus = "nul"
input_player4_l_y_plus_axis = "+1"
input_player4_l_y_plus_btn = "nul"
input_player4_l_y_plus_mbtn = "nul"
input_player4_left = "nul"
input_player4_left_axis = "nul"
input_player4_left_btn = "14"
input_player4_left_mbtn = "nul"
input_player4_mouse_index = "3"
input_player4_r = "nul"
input_player4_r2 = "nul"
input_player4_r2_axis = "nul"
input_player4_r2_btn = "7"
input_player4_r2_mbtn = "nul"
input_player4_r3 = "nul"
input_player4_r3_axis = "nul"
input_player4_r3_btn = "11"
input_player4_r3_mbtn = "nul"
input_player4_r_axis = "nul"
input_player4_r_btn = "5"
input_player4_r_mbtn = "nul"
input_player4_r_x_minus = "nul"
input_player4_r_x_minus_axis = "-2"
input_player4_r_x_minus_btn = "nul"
input_player4_r_x_minus_mbtn = "nul"
input_player4_r_x_plus = "nul"
input_player4_r_x_plus_axis = "+2"
input_player4_r_x_plus_btn = "nul"
input_player4_r_x_plus_mbtn = "nul"
input_player4_r_y_minus = "nul"
input_player4_r_y_minus_axis = "-3"
input_player4_r_y_minus_btn = "nul"
input_player4_r_y_minus_mbtn = "nul"
input_player4_r_y_plus = "nul"
input_player4_r_y_plus_axis = "+3"
input_player4_r_y_plus_btn = "nul"
input_player4_r_y_plus_mbtn = "nul"
input_player4_right = "nul"
input_player4_right_axis = "nul"
input_player4_right_btn = "15"
input_player4_right_mbtn = "nul"
input_player4_select = "nul"
input_player4_select_axis = "nul"
input_player4_select_btn = "8"
input_player4_select_mbtn = "nul"
input_player4_start = "nul"
input_player4_start_axis = "nul"
input_player4_start_btn = "9"
input_player4_start_mbtn = "nul"
input_player4_turbo = "nul"
input_player4_turbo_axis = "nul"
input_player4_turbo_btn = "nul"
input_player4_turbo_mbtn = "nul"
input_player4_up = "nul"
input_player4_up_axis = "nul"
input_player4_up_btn = "12"
input_player4_up_mbtn = "nul"
input_player4_x = "nul"
input_player4_x_axis = "nul"
input_player4_x_btn = "3"
input_player4_x_mbtn = "nul"
input_player4_y = "nul"
input_player4_y_axis = "nul"
input_player4_y_btn = "2"
input_player4_y_mbtn = "nul"

View File

@ -0,0 +1,91 @@
#!/usr/bin/env bash
set -ex
VERSION="1.3"
ARCH=$(uname -m | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
build=64bit
if [ "${ARCH}" == "arm64" ] ; then
build=arm64
fi
START_COMMAND="/opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/run_game.sh -f"
PGREP="supertuxkart"
export MAXIMIZE="false"
export MAXIMIZE_NAME="SuperTuxKart"
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
DEFAULT_ARGS="-f"
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
eval set -- "$options"
while [[ $1 != -- ]]; do
case $1 in
-g|--go) GO='true'; shift 1;;
-a|--assign) ASSIGN='true'; shift 1;;
-u|--url) OPT_URL=$2; shift 2;;
*) echo "bad option: $1" >&2; exit 1;;
esac
done
shift
# Process non-option arguments.
for arg; do
echo "arg! $arg"
done
FORCE=$2
kasm_exec() {
if [ -n "$OPT_URL" ] ; then
URL=$OPT_URL
elif [ -n "$1" ] ; then
URL=$1
fi
# Since we are execing into a container that already has the browser running from startup,
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
if [ -n "$URL" ] ; then
/usr/bin/filter_ready
/usr/bin/desktop_ready
bash ${MAXIMIZE_SCRIPT} &
$START_COMMAND $ARGS $OPT_URL
else
echo "No URL specified for exec command. Doing nothing."
fi
}
kasm_startup() {
if [ -n "$KASM_URL" ] ; then
URL=$KASM_URL
elif [ -z "$URL" ] ; then
URL=$LAUNCH_URL
fi
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
echo "Entering process startup loop"
set +x
while true
do
if ! pgrep -x $PGREP > /dev/null
then
/usr/bin/filter_ready
/usr/bin/desktop_ready
set +e
bash ${MAXIMIZE_SCRIPT} &
source $STARTUPDIR/generate_container_user
$START_COMMAND $ARGS $URL
set -e
fi
sleep 1
done
set -x
fi
}
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
kasm_exec
else
kasm_startup
fi

View File

@ -0,0 +1,51 @@
#!/usr/bin/env bash
set -ex
VERSION="1.3"
ARCH=$(uname -m | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
build=64bit
if [ "${ARCH}" == "arm64" ] ; then
build=arm64
fi
# Install binary version from github
mkdir -p /opt/super_tux_kart
cd /tmp/
wget -q https://github.com/supertuxkart/stk-code/releases/download/${VERSION}/SuperTuxKart-${VERSION}-linux-${build}.tar.xz
tar -xf SuperTuxKart* -C /opt/super_tux_kart/
sed -i "s@Exec=supertuxkart@Exec=/opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/run_game.sh@g" /opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/data/supertuxkart.desktop
sed -i "s@Icon=supertuxkart@Icon=/opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/data/supertuxkart.icns@g" /opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/data/supertuxkart.desktop
cp /opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/data/supertuxkart.desktop /usr/share/applications/
chmod +x /usr/share/applications/supertuxkart.desktop
cp /opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/data/supertuxkart.desktop $HOME/Desktop
chmod +x $HOME/Desktop/supertuxkart.desktop
chown 1000:1000 $HOME/Desktop/supertuxkart.desktop
# Modify startup script for VGL
cat >/opt/super_tux_kart/SuperTuxKart-${VERSION}-linux-${build}/run_game.sh <<EOL
#!/bin/bash
export DIRNAME="\$(dirname "\$(readlink -f "\$0")")"
export SYSTEM_LD_LIBRARY_PATH="\$LD_LIBRARY_PATH"
export SUPERTUXKART_DATADIR="\$DIRNAME"
export SUPERTUXKART_ASSETS_DIR="\$DIRNAME/data/"
cd "\$DIRNAME"
export LD_LIBRARY_PATH="\$DIRNAME/lib:\$LD_LIBRARY_PATH"
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then
echo "Starting Super Tux Kart with GPU Acceleration on EGL device \${KASM_EGL_CARD}"
vglrun -d "\${KASM_EGL_CARD}" "\$DIRNAME/bin/supertuxkart" "\$@"
else
echo "Starting Super Tux Kart"
"\$DIRNAME/bin/supertuxkart" "\$@"
fi
EOL
# Longer startup wait
cat >/usr/bin/desktop_ready <<EOL
#!/usr/bin/env bash
until pids=\$(pidof Thunar); do sleep .5; done
EOL
chmod +x /usr/bin/desktop_ready