Friday, November 11, 2016

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 "" 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.

Sunday, November 6, 2016

Mounting Shared Directory at the Host using Open VM Tools

Open VM Tools is a user space tools for Linux virtual machines. To mount a directory shared by the host to a VMware Linux guest, we can use vmhgfs-fuse.

First, we can figure out what has been shared at the host to the guest Linux system using vmware-hgfsclient, which is simply to enter the command in the Linux guest.


Assume that the output is shared_foo and we want to mount it at /mnt/hgfs/foo at the guest Linux system, we can run the following command at the Linux guest,

     vmhgfs-fuse .host:/shared_foo /mnt/hgfs/foo

To mount the directory at the boot time, we can add a line similar to the following to the /etc/fstab at the Linux guest,

     .host:/shared_foo /mnt/hgfs/foo fuse.vmhgfs-fuse allow_other 0 0

You can also add different mounting options. For instance, in the following, the shared directory will be shown as owned by user foo_user and group foo_group, and with umask=022 applied.

     .host:/shared_foo /mnt/hgfs/foo fuse.vmhgfs-fuse allow_other,uid=foo_user,gid=foo_group,umask=022 0 0

Saturday, November 5, 2016

Setting up Jekyll on Ubuntu 16.04

I recently set up Jekyll 3 on Ubuntu 16.04. The procedure is simple, works on Ubuntu 14.04, and perhaps also works on other versions of Ubuntu and other Linux distributions.

  1. Create a directory for your Jekyll site. For instance, let us call it "mysite".
           mkdir mysite
  2. Go to the site directory, and create a file called "Gemfile". The file defines Ruby applications dependencies. Since Jekyll is a Ruby application. This file defines the dependencies for Jekyll. It is quite simple, and the following shell command will create the file with sufficient content.
           cd mysite
           echo "source ''" > Gemfile
           echo "gem 'execjs'" >> Gemfile
           echo "gem 'therubyracer'" >> Gemfile
           echo "gem 'github-pages', group: :jekyll_plugins" >> Gemfile
  3. Now install Ruby and other necessary packages.
           sudo apt-get install ruby ruby-dev ruby-bundler zlib1g-dev build-essential

  4. Finally, install Jekyll and its dependencies. On the site directory where Gemfile is, do the following,
           bundle install
  5. To build the Jekyll site, do the following on the site directory,
           bundle exec jekyll build
  6. You can serve the site by the following command,
           bundle exec jekyll serve --host= --port=4000

Friday, November 4, 2016

Installing Ruby 2.3 on Ubuntu 14.04 or Older

Ubuntu 14.04 comes with the version 1.9 of Ruby. I need a new version of Ruby. To install any version of 2.0 - 2.3, we can use the brightbox repository as follows,

$ sudo apt-add-repository ppa:brightbox/ruby-ng
$ sudo apt-get update
$ sudo apt-get install ruby2.3  # or ruby2.2
$ sudo apt-get install ruby2.3-dev 

Data Sets (for Research and for Fun)

Below are a few places you can find data sets,  perhaps, for your own research and for fun.