- Add '-d' option to disable sound.
This commit is contained in:
parent
300ef6e6a0
commit
39eb3c2d8a
@ -7,7 +7,8 @@ This is project aims to build a X11 + Pulse + NVidia docker image able to run an
|
||||
Features:
|
||||
- Curtently based on rx3-docker/x11-pulse:1.2.3-mga9 image,
|
||||
- NVidia libs installed,
|
||||
- Require nvidia-container-toolkit installed on the host.
|
||||
- Require nvidia-container-toolkit installed on the host,
|
||||
- Add '-d' option to disable sound.
|
||||
|
||||
Usage:
|
||||
./bin/run.sh [-h] [-i] <Application Dir> <Application Exec> [Args...]
|
||||
|
@ -3,4 +3,5 @@ Rx3-Docker/X11-Pulse-NVidia V 1.0.0 - A. GIBERT - 2025/04/14
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Initial release,
|
||||
- Based on rx3/x11-pulse-mga9:1.2.3 image.
|
||||
- Based on rx3/x11-pulse-mga9:1.2.3 image,
|
||||
- Add '-d' option to disable sound.
|
||||
|
39
bin/run.sh
39
bin/run.sh
@ -8,21 +8,32 @@ APPL_HOME_DIR="$(dirname "$(dirname "$0")")"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
if [[ "$1" == "-h" ]]
|
||||
then
|
||||
echo "usage: run.sh [-h] [-i] <Application_Dir> <Application_Exec> [Args...]"
|
||||
echo "with -i enabling internet access."
|
||||
|
||||
exit 0
|
||||
fi
|
||||
export APPL_NETWORK="no-internet"
|
||||
export PULSE_DISABLE_FLAG=""
|
||||
|
||||
if [[ "$1" == "-i" ]]
|
||||
then
|
||||
shift;
|
||||
export APPL_NETWORK="internet"
|
||||
else
|
||||
export APPL_NETWORK="no-internet"
|
||||
fi
|
||||
while [[ "$1" == "-h" || "$1" == "-d" || "$1" == "-i" ]]
|
||||
do
|
||||
if [[ "$1" == "-h" ]]
|
||||
then
|
||||
echo "usage: run.sh [-h] [-d] [-i] <Application_Dir> <Application_Exec> [Args...]"
|
||||
echo "with -d disabling sound,"
|
||||
echo "with -i enabling internet access."
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$1" == "-d" ]]
|
||||
then
|
||||
shift;
|
||||
export PULSE_DISABLE_FLAG="-disabled"
|
||||
fi
|
||||
|
||||
if [[ "$1" == "-i" ]]
|
||||
then
|
||||
shift;
|
||||
export APPL_NETWORK="internet"
|
||||
fi
|
||||
done
|
||||
|
||||
export APPL_DIR="$1"
|
||||
shift
|
||||
|
@ -36,7 +36,7 @@ services:
|
||||
target: /tmp/.X11-unix/X0
|
||||
- type: bind
|
||||
source: /run/user/${USER_ID}/pulse
|
||||
target: /run/user/${USER_ID}/pulse
|
||||
target: /run/user/${USER_ID}/pulse${PULSE_DISABLE_FLAG}
|
||||
- type: bind
|
||||
source: "${APPL_DIR}"
|
||||
target: "${APPL_DIR}"
|
||||
|
Loading…
Reference in New Issue
Block a user