Running VMWare Tools on boot in Arch Linux

Lately I’ve been playing around with Arch Linux in VMWare Player and after having a lot of issues with the VMWare Tools, with getting them to work and then having to manually start them at each reboot, I came up with this solution to have them run at boot:

Create a systemd service which handles the autostart of VMWare tools with nano, using the following code in terminal:

$ nano /etc/systemd/system/vmwaretools.service

Add the following text to the service when nano is started.

[Unit]
Description=VMWare Tools Service
After=network.target

[Service]
Type=simple
Group=wheels
ExecStart=/etc/init.d/rc6.d/KM99vmware-tools start

[Install]
WantedBy=multi-user.target

Press CTRL+X to exit nano and Y when asked to save the file.

Now we have created a script that can handle start the VMWare Tools service and be started by systemd. As of yet it’s not going to start at boot, but can be started manually by using systemctl.

To have it start at boot write the following in the terminal:
# systemctl enable vmwaretools.service

Now we have enabled the service on boot and next time you reboot your virtual machine, you will have the VMWare Tools running.

I’m in no way saying this is the best way to do it, but it’s the method that worked for me and I now have full use of the VMWare Tools. If anyone have a better solution to this, please feel free to add it in the comments.

Next up, a full guide to installing Arch Linux with a working Gnome Desktop Environment in VMWare Player.

Update:

So after looking around I actually found the wiki page that covered this a lot better than my hack solution and thus the script is changed to:

$ nano /etc/systemd/system/vmwaretools.service

Add the following text to the service when nano is started.

[Unit]
Description=VMWare Tools daemon

[Service]
ExecStart=/etc/init.d/vmware start
ExecStop=/etc/init.d/vmware stop
PIDFile=/var/lock/subsys/vmware
TimeoutSec=0
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

This works perfectly and is a lot nicer looking than mine. I can also recommend using this part on the Wiki to manage the modules after kernel changes.