Arch Linux: Installing XFCE (VMware)

This runbook covers installing XFCE as a graphical desktop environment for Arch Linux running as a guest in a VMware hypervisor, including support of fit to window and copy and paste functionality between host/client and guest.

Update system packages

First off, let's update package lists and upgrade system packages to bring our system up to current:

pacman -Syu

Install XFCE and its dependencies

The following packages are required to use XFCE as a graphical desktop environment:

Install the above packages with:

pacman -S xorg xfce4 lightdm lightdm-gtk-greeter

Note that there are two group packages present in the above command - xorg, and xfce4. While all packages in these groups may not be required to achieve a functional installation of XFCE, I've elected to install these full groups as part of this runbook. Feel free to specify only the packages you need from each group when prompted, but be wary that omitting some packages may result in a non-functional installation.

After installation, enable the lightdm service to start at boot time:

systemctl enable lightdm

Install dependencies for VMware features

The following dependencies are required for VMware's fit to window and copy and paste functionality to work:

  • gtk2: Fit to window
  • gtkmm: Fit to window
  • gtkmm3: Copy and paste
  • xf86-input-vmmouse: Dependency of Xorg, mouse input tracking
  • xf86-video-vmware: Dependency of Xorg, fit to window
  • open-vm-tools: Drivers/kernel modules and a service that enables communication between the host and guest systems; this package is required for both fit to window and copy and paste functions

Install the above packages with:

pacman -S gtk2 gtkmm gtkmm3 xf86-input-vmmouse xf86-video-vmware open-vm-tools

The VMware Tools service, vmtoolsd, needs to be configured to run at boot time. You can do this with the command:

systemctl enable vmtoolsd

Update initramfs to include VMware modules

The /etc/mkinitcpio.conf file needs an update to the MODULES array so required modules are loaded at boot time. Edit this file and update MODULES=() to:

MODULES=(vsock vmw_vsock_vmci_transport vmw_balloon vmw_vmci vmwgfx)

If you already have modules specified in this array that are required for your system to function, don't remove them! Just add the modules listed above to the array.

After this edit, generate a new initramfs image with:

mkinitcpio -P

Keep an eye out for any ERROR present in output - it's easy to typo these module names, which will cause errors during image generation.

Reboot and verify

With all above steps complete, reboot the system with:

shutdown -r now

When the system boots back up, you should be greeted with a login screen:

LightDM Display Manager

Logging in should result in the XFCE desktop environment launching successfully:

XFCE Desktop Environment

Verify that fit to window functions correctly when you resize the screen, and that you can copy and paste text between the host (or remote client) and the guest. If you run into issues with fit to window, make sure that you haven't enabled any guest display stretching options, or disabled fit to window in your hypervisor's settings, as these settings prevent fit to window from functioning.

References

I used the following resources when building this runbook: