How to make VBoxClient load with the --clipboard option when launched?

Solution 1:

A simple solution would be to give your user the right to run the command without entering a password and then adding it to the list of startup programs. First, run sudo visudo and add this line to the file (change geomint to your actual user name):

geomint ALL=NOPASSWD:/usr/bin/VBoxClient --clipboard

Then, use the tools provided by your desktop environment to add the command to your startup applications. Instructions for Unity can be found here.

Alternatively, do it manually. Create a file called ~/.config/autostart/VboxClipbvoard.desktop with the following contents:

[Desktop Entry]
Type=Application
Exec=sudo VBoxClient --clipboard
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=VBox clipboard
Name=VBox clipboard
Comment[en_US]=
Comment=

Now reboot, and it should work as expected.