dispvm: start gui agent early, do not kill Xorg
Now gui agent support reconnecting to guid.
This commit is contained in:
parent
8118037820
commit
06a0d30d50
@ -6,19 +6,21 @@ possibly_run_save_script()
|
|||||||
if [ -z "$ENCODED_SCRIPT" ] ; then return ; fi
|
if [ -z "$ENCODED_SCRIPT" ] ; then return ; fi
|
||||||
echo $ENCODED_SCRIPT|perl -e 'use MIME::Base64 qw(decode_base64); local($/) = undef;print decode_base64(<STDIN>)' >/tmp/qubes-save-script
|
echo $ENCODED_SCRIPT|perl -e 'use MIME::Base64 qw(decode_base64); local($/) = undef;print decode_base64(<STDIN>)' >/tmp/qubes-save-script
|
||||||
chmod 755 /tmp/qubes-save-script
|
chmod 755 /tmp/qubes-save-script
|
||||||
Xorg -config /etc/X11/xorg-preload-apps.conf :0 &
|
|
||||||
while ! [ -S /tmp/.X11-unix/X0 ]; do sleep 0.5; done
|
while ! [ -S /tmp/.X11-unix/X0 ]; do sleep 0.5; done
|
||||||
DISPLAY=:0 su - user -c /tmp/qubes-save-script
|
DISPLAY=:0 su - user -c /tmp/qubes-save-script
|
||||||
killall Xorg Xorg.bin
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if qubesdb-read /qubes-save-request 2>/dev/null ; then
|
if true; then
|
||||||
if [ -L /home ]; then
|
if [ -L /home ]; then
|
||||||
rm /home
|
rm /home
|
||||||
mkdir /home
|
mkdir /home
|
||||||
fi
|
fi
|
||||||
mount --bind /home_volatile /home
|
mount --bind /home_volatile /home
|
||||||
touch /etc/this-is-dvm
|
touch /etc/this-is-dvm
|
||||||
|
systemctl --ignore-dependencies start qubes-gui-agent.service
|
||||||
|
while ! xenstore-read qubes-save-request 2>/dev/null ; do
|
||||||
|
usleep 10
|
||||||
|
done
|
||||||
mount /rw
|
mount /rw
|
||||||
possibly_run_save_script
|
possibly_run_save_script
|
||||||
umount /rw
|
umount /rw
|
||||||
|
Loading…
Reference in New Issue
Block a user