From cee259330fbc74adcdf068173167acee2b238b50 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 29 Jan 2019 23:44:08 +0100 Subject: [PATCH] add basic systemd unit for starting VMSVGA dynamic resizing in guest --- VirtualBox.spec | 8 ++++++-- vboxclient-vmsvga.service | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 vboxclient-vmsvga.service diff --git a/VirtualBox.spec b/VirtualBox.spec index 8e90996..f9a9565 100644 --- a/VirtualBox.spec +++ b/VirtualBox.spec @@ -64,6 +64,7 @@ Source7: %{pname}-virtualbox-host-modules-load.conf Source8: %{pname}-virtualbox-guest-modules-load.conf Source9: vboxautostart.init Source10: autostart.cfg +Source11: vboxclient-vmsvga.service Patch0: %{pname}-version-error.patch Patch1: %{pname}-VBoxSysInfo.patch Patch2: %{pname}-warning_workaround.patch @@ -691,6 +692,8 @@ install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxservice cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/vboxservice.service cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/vboxservice +cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/vboxclient-vmsvga.service + install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxautostart %{__sed} -i -e 's#@INSTALL_DIR@#%{_libdir}/%{pname}#' $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxautostart cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/vbox @@ -868,14 +871,14 @@ fi %post guest /sbin/chkconfig --add vboxservice %service vboxservice restart -%systemd_post vboxservice.service +%systemd_post vboxservice.service vboxclient-vmsvga.service %preun guest if [ "$1" = "0" ]; then /sbin/chkconfig --del vboxservice %service vboxservice -q stop fi -%systemd_preun vboxservice.service +%systemd_preun vboxservice.service vboxclient-vmsvga.service %postun guest if [ "$1" = "0" ]; then @@ -1103,6 +1106,7 @@ dkms remove -m vboxhost -v %{version}-%{rel} --rpm_safe_upgrade --all || : %attr(754,root,root) /etc/rc.d/init.d/vboxservice %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vboxservice %{systemdunitdir}/vboxservice.service +%{systemdunitdir}/vboxclient-vmsvga.service %attr(755,root,root) %{_bindir}/VBoxControl %attr(755,root,root) %{_bindir}/VBoxService diff --git a/vboxclient-vmsvga.service b/vboxclient-vmsvga.service new file mode 100644 index 0000000..9b3645a --- /dev/null +++ b/vboxclient-vmsvga.service @@ -0,0 +1,10 @@ +[Unit] +Description=Start VMSVGA dynamic resizing for DRM + +[Service] +Type=oneshot +ExecStart=VBoxClient --vmsvga +RemainAfterExit=yes + +[Install] +WantedBy=graphical.target -- 2.43.0