mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-09-23 00:00:50 +02:00
Add "--access" variable to toggle on remote Spice access
Add "--access" variable to toggle on remote Spice access
This commit is contained in:
parent
2a5067f277
commit
ca7faf6fad
22
quickemu
22
quickemu
|
@ -848,6 +848,19 @@ function vm_boot() {
|
||||||
SPICE_PORT=$(get_port 5930 9)
|
SPICE_PORT=$(get_port 5930 9)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ALLOW REMOTE ACCESS TO SPICE OVER LAN RATHER THAN JUST LOCALHOST
|
||||||
|
if [ -z "${ACCESS}" ]; then
|
||||||
|
SPICE_ADDR="127.0.0.1"
|
||||||
|
else
|
||||||
|
if [ "${ACCESS}" == "remote" ]; then
|
||||||
|
SPICE_ADDR=""
|
||||||
|
elif [ "${ACCESS}" == "local" ]; then
|
||||||
|
SPICE_ADDR="127.0.0.1"
|
||||||
|
else
|
||||||
|
SPICE_ADDR="${ACCESS}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "${SPICE_PORT}" ]; then
|
if [ -z "${SPICE_PORT}" ]; then
|
||||||
echo " - SPICE: All SPICE ports have been exhausted."
|
echo " - SPICE: All SPICE ports have been exhausted."
|
||||||
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
|
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
|
||||||
|
@ -864,7 +877,7 @@ function vm_boot() {
|
||||||
echo -n " --spice-shared-dir ${PUBLIC}"
|
echo -n " --spice-shared-dir ${PUBLIC}"
|
||||||
fi
|
fi
|
||||||
echo "${FULLSPICY}"
|
echo "${FULLSPICY}"
|
||||||
SPICE="${SPICE},port=${SPICE_PORT},addr=127.0.0.1"
|
SPICE="${SPICE},port=${SPICE_PORT},addr=${SPICE_ADDR}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1231,7 +1244,6 @@ function vm_boot() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -z "${EXTRA_ARGS}" ]; then
|
if [ -z "${EXTRA_ARGS}" ]; then
|
||||||
EXTRA_ARGS="${extra_args}"
|
EXTRA_ARGS="${extra_args}"
|
||||||
fi
|
fi
|
||||||
|
@ -1326,6 +1338,7 @@ function usage() {
|
||||||
echo " ${LAUNCHER} --vm ubuntu.conf"
|
echo " ${LAUNCHER} --vm ubuntu.conf"
|
||||||
echo
|
echo
|
||||||
echo "You can also pass optional parameters"
|
echo "You can also pass optional parameters"
|
||||||
|
echo " --access : Select whether to enable remote spice access. 'local' (default), 'remote' 'clientipaddress'"
|
||||||
echo " --braille : Enable braille support. Requires SDL."
|
echo " --braille : Enable braille support. Requires SDL."
|
||||||
echo " --delete-disk : Delete the disk image and EFI variables"
|
echo " --delete-disk : Delete the disk image and EFI variables"
|
||||||
echo " --delete-vm : Delete the entire VM and it's configuration"
|
echo " --delete-vm : Delete the entire VM and it's configuration"
|
||||||
|
@ -1498,6 +1511,7 @@ mouse="tablet"
|
||||||
# options: intel-hda, ac97, es1370, sb16, none
|
# options: intel-hda, ac97, es1370, sb16, none
|
||||||
sound_card="intel-hda"
|
sound_card="intel-hda"
|
||||||
|
|
||||||
|
ACCESS=""
|
||||||
BRAILLE=""
|
BRAILLE=""
|
||||||
DELETE_DISK=0
|
DELETE_DISK=0
|
||||||
DELETE_VM=0
|
DELETE_VM=0
|
||||||
|
@ -1564,6 +1578,10 @@ if [ $# -lt 1 ]; then
|
||||||
else
|
else
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
|
-access|--access)
|
||||||
|
ACCESS="${2}"
|
||||||
|
shift
|
||||||
|
shift;;
|
||||||
-braille|--braille)
|
-braille|--braille)
|
||||||
BRAILLE="on"
|
BRAILLE="on"
|
||||||
shift;;
|
shift;;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user