diff --git a/misc/dispvm-prerun.sh b/misc/dispvm-prerun.sh index c0453f2..fc071e7 100755 --- a/misc/dispvm-prerun.sh +++ b/misc/dispvm-prerun.sh @@ -2,7 +2,12 @@ apps="evince /usr/libexec/evinced soffice firefox" -cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >/tmp/dispvm-dotfiles-errors.log +#If user have customized DispVM settings, use its home instead of default dotfiles +if [ -e /rw/home/user/.qubes-dispvm-customized ]; then + cp -af /rw/home/user /home/ +else + cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >/tmp/dispvm-dotfiles-errors.log +fi for app in $apps ; do echo "Launching: $app..." @@ -22,6 +27,10 @@ done ps ax > /tmp/dispvm-prerun-proclist.log -cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >>/tmp/dispvm-dotfiles-errors.log +if [ -e /rw/home/user/.qubes-dispvm-customized ]; then + cp -af /rw/home/user /home/ +else + cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >>/tmp/dispvm-dotfiles-errors.log +fi echo done. diff --git a/vm-init.d/qubes_core_appvm b/vm-init.d/qubes_core_appvm index ebd3e01..a0cfe06 100755 --- a/vm-init.d/qubes_core_appvm +++ b/vm-init.d/qubes_core_appvm @@ -46,8 +46,10 @@ start() if xenstore-read qubes_save_request 2>/dev/null ; then ln -sf /home_volatile /home - possibly_run_save_script touch /etc/this_is_dvm + mount /rw + possibly_run_save_script + umount /rw dmesg -c >/dev/null free | grep Mem: | (read a b c d ; xenstore-write device/qubes_used_mem $c) diff --git a/vm-systemd/misc-post.sh b/vm-systemd/misc-post.sh index 7db58d2..df4c8a4 100755 --- a/vm-systemd/misc-post.sh +++ b/vm-systemd/misc-post.sh @@ -12,7 +12,7 @@ fi # xenstore-read fails INTERFACE=eth0 /usr/lib/qubes/setup_ip -if [ -e /dev/xvdb ] ; then +if [ -e /dev/xvdb -a ! -e /etc/this_is_dvm ] ; then mount /rw if ! [ -d /rw/home ] ; then diff --git a/vm-systemd/prepare-dvm.sh b/vm-systemd/prepare-dvm.sh index d0f4570..2229afc 100755 --- a/vm-systemd/prepare-dvm.sh +++ b/vm-systemd/prepare-dvm.sh @@ -14,8 +14,10 @@ possibly_run_save_script() if xenstore-read qubes_save_request 2>/dev/null ; then ln -sf /home_volatile /home - possibly_run_save_script touch /etc/this_is_dvm + mount /rw + possibly_run_save_script + umount /rw dmesg -c >/dev/null free | grep Mem: | (read a b c d ; xenstore-write device/qubes_used_mem $c)