Monday, November 7, 2016

VMWare Unity Mode on Ubuntu 16.04 LTS

Some users want to run Linux desktop guests  "seamlessly" within host operating systems, for which, VMWare Hypervisors  provides a functionality called VMware "Unity" mode.

This post is about how we can enable the Unity mode on Linux desktop guests running Ubuntu 16.04,  well, if you are willing to settle on an older version of WMware Workstation or Player.

In fact,  it becomes difficult to enable the "Unity" mode for Linux guests. If you visit my older post on enabling VMware Unity mode on Ubuntu 14.04, you can see many have encountered difficulties, myself included.  In particular, it is getting more difficult to enable the Unity mode on recent releases of desktop editions of Linux distributions. In my opinion, the difficulties come form the following three sources,

  • Apparently, VMWare has recently dropped the support of Unity mode for Linux guests. You can infer this by comparing the documentation of VMware Workstation Player 12 with that of the previous version of the player, the VMware Player 7. VMware's Workstation Player 12 documentation now states,
    "
    Use Unity Mode
    You can switch virtual machines that have Windows XP or later guest operating systems to Unity mode to display applications directly on the host system desktop.
    "
    On the contrary, VMware Player 7 documentation states,
    "
    Use Unity Mode
    You can switch virtual machines that have Linux or Windows 2000 or later guest operating systems to Unity mode to display applications directly on the host system desktop.
    "
    It is clearly that Linux support has been dropped.

  • Unity mode requires MetaCity or KDE,  which does not appear to be the default and optimization objective for major Linux distributions.

  • VMWare Unity mode's installation software does not know how to interact with systemd that has gradually becomes the default choice of the init service on most Linux distributions.

However, having observed the above, we actually have a solution.
  • Hypervisor. We need to stick to the version of VMware Workstation or Player that supports the Unity mode. The newest version of Player that supports the Unity mode is actually VMWare Player 7.1.4. You can download it from VMware

  • Linux Guest Dekstop  Environment. We need to stick to Gnome 2 MetaCity or KDE. 

For Ubuntu 16.04, we can enable Unity mode using VMware Player  by following the steps below,
  • Download and install VMware Player 7.1.4. Note that neither any version older than 7.1.4 nor any version newer than VMware Player, such as VMware Workstation 12 will work.

  • In Ubuntu 16.04, install Gnome Flashback as follows,
    
    sudo apt-get install gnome-flashback gnome-session-flashback
    

  • From the menu of VMware Player, choose "Player", "Manage", and "Install VMware Tools" (or Reinstall VMware Tools"). Make sure that you are installing VMwareTools 9.9.5. Earlier version would crash the vmtools library at the Ubuntu guest when you attempt to switch to Unity mode.

  • In the Ubuntu Linux guest, extract the mounted VMwareTools image, and run "vmware-install.pl" to install the VMware Tools.

  • Upon successfully installation of the VMware Tools, log out.
  • When you log in, on the screen of the Display Manager, make sure that you select "GNOME Flashback (Metacity)" as shown below.


  • Upon log in, you should be able to switch to the VMware Unity mode.


1 comment:

  1. I was running xubuntu 14.04 with vmware workstation, which was working like a charm with unity mode, vmware auto-installing all, including the vmware tools, having unity support right after a fresh install without having to do anything at all.
    However, 14.04 LTS support just ran out recently.


    So i tried 16.04.1 xubuntu but couldn't get unity to work with the auto-install vmware does. Included in the auto-install were the open-vm-tools packages it seemed.
    I removed them and tried to install the original vmware tools with no success of getting unity to work still.

    So i tried a manual install, by choosing "I will install the operating system later." when creating a new virtual machine.

    When i finally finished the fresh xubuntu 16.04.1 installation, i checked if open-vm-tools were installed. They were not.
    So i went on to install the vmware tools and voila, after a reboot, unity worked flawlessly.

    Drag and dropping files onto the desktop also works (most of the times). Dragging and dropping into my home folder which worked in 14.04, does not seem to work with my current solution.
    Copy and paste of test works fine too.

    I used the latest workstation version(pre 12.x) 11.1.4.

    Note that i have no clue of why it works and if it will or not break later when automatic software updates are used.
    No clue why even when removing open-vm-tool packages and installing vmware-tools afterwards does not work, but it works if open-vm-tools were not installed.

    Also, i did not have to use metacity to get this to work. It works just fine with xubuntu's default.

    Hope that helps some.

    ReplyDelete