diff --git a/README.md b/README.md index 787e507..09c6918 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ See this (old) video where I explain some of my motivations for creating Quickem * [spicy](https://gitlab.freedesktop.org/spice/spice-gtk) * [swtpm](https://github.com/stefanberger/swtpm) * [Wget](https://www.gnu.org/software/wget/) - * [xdg-user-dirs](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/) * [xrandr](https://gitlab.freedesktop.org/xorg/app/xrandr) * [zsync](http://zsync.moria.org.uk/) diff --git a/quickemu b/quickemu index eae521c..9840ba7 100755 --- a/quickemu +++ b/quickemu @@ -825,15 +825,18 @@ readonly VERSION="2.2.2" # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P and spice-webdavd. This path is not configurable. -PUBLIC=$(xdg-user-dir PUBLICSHARE) -if [ "${PUBLIC}" != ${HOME} ]; then - if [ ! -d "${PUBLIC}" ]; then - mkdir -p "${PUBLIC}" +PUBLIC="" +if command -v xdg-user-dir &>/dev/null; then + PUBLIC=$(xdg-user-dir PUBLICSHARE) + if [ "${PUBLIC%/}" != ${HOME} ]; then + if [ ! -d "${PUBLIC}" ]; then + mkdir -p "${PUBLIC}" + fi + PUBLIC_TAG=$(basename ${PUBLIC})-${USER,,} + PUBLIC_PERMS=$(ls -ld ${PUBLIC} | cut -d' ' -f1) + else + PUBLIC="" fi - PUBLIC_TAG=$(basename ${PUBLIC})-${USER,,} - PUBLIC_PERMS=$(ls -ld ${PUBLIC} | cut -d' ' -f1) -else - PUBLIC="" fi # TODO: Make this run the native architecture binary