diff --git a/misc/dispvm-dotfiles.tbz b/misc/dispvm-dotfiles.tbz new file mode 100644 index 0000000..42f0e27 Binary files /dev/null and b/misc/dispvm-dotfiles.tbz differ diff --git a/misc/dispvm-prerun.sh b/misc/dispvm-prerun.sh new file mode 100755 index 0000000..c0453f2 --- /dev/null +++ b/misc/dispvm-prerun.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +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 + +for app in $apps ; do + echo "Launching: $app..." + $app >>/tmp/dispvm_prerun_errors.log 2>&1 & +done + +echo "Sleeping..." +PREV_IO=0 +while true; do + IO=`vmstat -D | awk '/read|write/ {IOs+=$1} END {print IOs}'` + if [ $IO -lt $[ $PREV_IO + 50 ] ]; then + break; + fi + PREV_IO=$IO + sleep 1 +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 + +echo done. diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 8896b38..829a6ec 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -119,6 +119,13 @@ install misc/qubes_trigger_sync_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes/ install -D -m 0644 misc/qubes_trigger_sync_appmenus.action $RPM_BUILD_ROOT/etc/yum/post-actions/qubes_trigger_sync_appmenus.action mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes +if [ -r misc/dispvm-dotfiles.%{dist}.tbz ]; then + install misc/dispvm-dotfiles.%{dist}.tbz $RPM_BUILD_ROOT/etc/dispvm-dotfiles.tbz +else + install misc/dispvm-dotfiles.tbz $RPM_BUILD_ROOT/etc/dispvm-dotfiles.tbz +fi +install misc/dispvm-prerun.sh $RPM_BUILD_ROOT/usr/lib/qubes/dispvm-prerun.sh + install -D misc/qubes_core.modules $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes_core.modules install -m 0644 network/qubes_network.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_network.rules @@ -355,6 +362,7 @@ rm -rf $RPM_BUILD_ROOT /etc/NetworkManager/dispatcher.d/30-qubes_external_ip /etc/NetworkManager/dispatcher.d/qubes_nmhook /etc/X11/xorg-preload-apps.conf +/etc/dispvm-dotfiles.tbz /etc/dhclient.d/qubes_setup_dnat_to_ns.sh /etc/fstab /etc/pki/rpm-gpg/RPM-GPG-KEY-qubes* @@ -386,6 +394,7 @@ rm -rf $RPM_BUILD_ROOT /usr/lib/qubes/block_add_change /usr/lib/qubes/block_cleanup /usr/lib/qubes/block_remove +/usr/lib/qubes/dispvm-prerun.sh /usr/lib/qubes/sync-ntp-clock /usr/lib/qubes/meminfo-writer /usr/lib/qubes/network-manager-prepare-conf-dir