- 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:
|
Features:
|
||||||
- Curtently based on rx3-docker/x11-pulse:1.2.3-mga9 image,
|
- Curtently based on rx3-docker/x11-pulse:1.2.3-mga9 image,
|
||||||
- NVidia libs installed,
|
- 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:
|
Usage:
|
||||||
./bin/run.sh [-h] [-i] <Application Dir> <Application Exec> [Args...]
|
./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,
|
- 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.
|
||||||
|
37
bin/run.sh
37
bin/run.sh
@ -8,21 +8,32 @@ APPL_HOME_DIR="$(dirname "$(dirname "$0")")"
|
|||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
if [[ "$1" == "-h" ]]
|
export APPL_NETWORK="no-internet"
|
||||||
then
|
export PULSE_DISABLE_FLAG=""
|
||||||
echo "usage: run.sh [-h] [-i] <Application_Dir> <Application_Exec> [Args...]"
|
|
||||||
echo "with -i enabling internet access."
|
|
||||||
|
|
||||||
exit 0
|
while [[ "$1" == "-h" || "$1" == "-d" || "$1" == "-i" ]]
|
||||||
fi
|
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."
|
||||||
|
|
||||||
if [[ "$1" == "-i" ]]
|
exit 0
|
||||||
then
|
fi
|
||||||
shift;
|
|
||||||
export APPL_NETWORK="internet"
|
if [[ "$1" == "-d" ]]
|
||||||
else
|
then
|
||||||
export APPL_NETWORK="no-internet"
|
shift;
|
||||||
fi
|
export PULSE_DISABLE_FLAG="-disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$1" == "-i" ]]
|
||||||
|
then
|
||||||
|
shift;
|
||||||
|
export APPL_NETWORK="internet"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
export APPL_DIR="$1"
|
export APPL_DIR="$1"
|
||||||
shift
|
shift
|
||||||
|
@ -36,7 +36,7 @@ services:
|
|||||||
target: /tmp/.X11-unix/X0
|
target: /tmp/.X11-unix/X0
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /run/user/${USER_ID}/pulse
|
source: /run/user/${USER_ID}/pulse
|
||||||
target: /run/user/${USER_ID}/pulse
|
target: /run/user/${USER_ID}/pulse${PULSE_DISABLE_FLAG}
|
||||||
- type: bind
|
- type: bind
|
||||||
source: "${APPL_DIR}"
|
source: "${APPL_DIR}"
|
||||||
target: "${APPL_DIR}"
|
target: "${APPL_DIR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user