merge upstream and other changes

added sparky linux
added bazzite
This commit is contained in:
zenobit 2023-11-17 14:35:57 +01:00
parent 52182514ec
commit c3bd9eb195
10 changed files with 4293 additions and 309 deletions

View file

@ -687,7 +687,7 @@ function vm_boot() {
if [ "${guest_os}" == "linux" ]; then
local X_RES=1152
local Y_RES=648
if [ "${XDG_SESSION_TYPE}" == "x11" ]; then
if [ "${XDG_SESSION_TYPE}" == "x11" ] || [ "${XDG_SESSION_TYPE}" == "wayland" ]; then
if [ -z "${SCREEN}" ]; then
X_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1)
Y_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | sort | head -n1)
@ -848,6 +848,19 @@ function vm_boot() {
SPICE_PORT=$(get_port 5930 9)
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
echo " - SPICE: All SPICE ports have been exhausted."
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
@ -864,7 +877,7 @@ function vm_boot() {
echo -n " --spice-shared-dir ${PUBLIC}"
fi
echo "${FULLSPICY}"
SPICE="${SPICE},port=${SPICE_PORT},addr=127.0.0.1"
SPICE="${SPICE},port=${SPICE_PORT},addr=${SPICE_ADDR}"
fi
fi
fi
@ -899,7 +912,7 @@ function vm_boot() {
fi
# If smbd is available and ~/Public is present export it to the guest via samba
if [[ -e "/usr/sbin/smbd" && -n ${PUBLIC} ]]; then
if [[ -x "$(command -v smbd)" && -n ${PUBLIC} ]]; then
NET="${NET},smb=${PUBLIC}"
echo " - smbd: On guest: smb://10.0.2.4/qemu"
fi
@ -1326,6 +1339,7 @@ function usage() {
echo " ${LAUNCHER} --vm ubuntu.conf"
echo
echo "You can also pass optional parameters"
echo " --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress'"
echo " --braille : Enable braille support. Requires SDL."
echo " --delete-disk : Delete the disk image and EFI variables"
echo " --delete-vm : Delete the entire VM and it's configuration"
@ -1498,6 +1512,7 @@ mouse="tablet"
# options: intel-hda, ac97, es1370, sb16, none
sound_card="intel-hda"
ACCESS=""
BRAILLE=""
DELETE_DISK=0
DELETE_VM=0
@ -1540,7 +1555,7 @@ SOUND_CARD=""
# shellcheck disable=SC2155
readonly LAUNCHER=$(basename "${0}")
readonly DISK_MIN_SIZE=$((197632 * 8))
readonly VERSION="4.8"
readonly VERSION="4.9.1"
# TODO: Make this run the native architecture binary
QEMU=$(command -v qemu-system-x86_64)
@ -1564,6 +1579,10 @@ if [ $# -lt 1 ]; then
else
while [ $# -gt 0 ]; do
case "${1}" in
-access|--access)
ACCESS="${2}"
shift
shift;;
-braille|--braille)
BRAILLE="on"
shift;;