From 0a0afb159e851bf62d603df3e1158decd58fdfb9 Mon Sep 17 00:00:00 2001 From: "Brett T. Warden" Date: Tue, 19 Mar 2019 13:23:24 -0700 Subject: [PATCH] Fix shared clipboard support Installer tries to create /usr/bin/VBoxClient-all as a symlink to ${INSTALL_DIR}/other/98vboxadd-xclient, and has vboxclient.desktop use that symlink for its Exec. Creation of the symlink fails, and we don't want it in /usr/bin anyway, so just edit the .desktop file to point directly to the script. This script launches the various VBoxClient daemons to handle shared clipboard, drag and drop, display management, and seamless window services. We have to modify both copies because a startup script copies the version from ${INSTALL_DIR} into the appropriate desktop manager paths each boot. --- install-vbox-lga | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install-vbox-lga b/install-vbox-lga index 7e7875c..297525c 100755 --- a/install-vbox-lga +++ b/install-vbox-lga @@ -156,6 +156,15 @@ setup_install () # Do not add new group sed -i -- 's/groupadd/true/g' ${f} done + + # Ensure that support daemons for clipboard sharing, etc. will load + xclient=$(find ${INSTALL_DIR} -type f -name '[0-9][0-9]vboxadd-xclient' \ + | head -1) + if [[ -f ${xclient} ]]; then + find /etc/xdg/autostart ${INSTALL_DIR} -type f -name vboxclient.desktop -exec \ + sed -i \ "s|^Exec=.*|Exec=${xclient}|" {} \; + fi + mkdir -p /etc/udev/rules.d mkdir -p /etc/ld.so.conf.d mkdir -p /etc/xdg/autostart