Skip to content

January 4, 2012

9

Extracting the VMware View Client for Use on Alternate Distros

Continuing on the thread of how to utilize the recently released VMware View Client technical preview for Linux I wanted to cover a method for extracting the “raw” client bits out of the Ubuntu package which will set the stage for moving the client to other distros in an easy and portable fashion. But first…

DISCLAIMER: This process is in no way supported by VMware. Use the extracted VMware View Client at your own risk. Neither I, nor VMware Inc. make any warranties that the extracted files will work on any Linux distro outside of those listed as supported by VMware Inc. itself. Do not contact myself or VMware Inc. for support when utilizing the extracted files. Stay safe out there people.

Ok, with that out of the way, this is actually a relatively simple process.

Step 1: Acquire the .DEB file

The first step is to acquire the .DEB file for the VMware View Client directly. The file we are looking for (currently) is ‘vmware-view-client_1.3.0-0ubuntu1+oneiric2_i386.deb’. I am certain there are countless ways to do this but I just went to pkgs.org and searched for ‘vmware-view-client’ which turned up exactly the results we are looking for.

Finding the View Client .DEB

Finding the View Client .DEB

Go ahead and click the Ubuntu 11.10 link (it really doesn’t matter which one you choose) and follow through to the download section, select a mirror, and download the .DEB file. Be careful to dance around the many and varied advertisements mixed in among the actual links.

You can choose to download the file anywhere, just make sure you can access it from a Linux distribution (I’ll be using Ubuntu here) as that’s where we will be extracting the contents of the file out. For ease of use I just downloaded the file directly to my Ubuntu instance via Firefox.

Step 2: Extract the files from the .DEB

Now that we have the installation file we need to extract the parts we care about out of it, namely the VMware View Client binaries  and support files.

We do this by changing into the directory where you downloaded the .DEB file and using the following command:

ar xv vmware-view-client_1.3.0-0ubuntu1+oneric2_i386.deb

This will leave you with 3 new files:

  • debian-binary
  • control.tar.gz
  • data.tar.gz
Extract the .DEB file

Extract the .DEB file

data.tar.gz is the file we care about. This file has the “guts” of the VMware View Client. The other files contain code or information used for package management which we’re not going to worry about for the moment.

Step 3 – Fix the broken stuff

Now that we have the file we need, you would think we could simply rename ‘data.tar.gz’ to something like ‘vmware-view-client.tar.gz’ and be good to go. But first, we need to fix a few things in the package to make it more suitable for use in a live CD situation. Namely the fact that Ubuntu uses Zenity to display the initial EULA and we’re trying to reduce requirements, not increase them. There’s also an issue where no arguments will get passed through to the actual VMware View Client executable (/usr/bin/vmware-view.bin). This is a legitimate (but trivial to fix) bug. Let’s take a brief diversion to look at why this occurs and how it can be fixed as this is probably something you want to do on any installation of the VMware View Client so that you can utilize command line arguments to control its behavior.

First we need to extract data.tar.gz so we can get to the bits in question. From the folder where I extracted the .DEB, I created a folder called ‘client’ and then dumped the contents into there:

mkdir client
tar -xzf data.tar.gz -C client

Then, within that folder we need to move into the usr/bin directory:

cd client/usr/bin
Extract the VMware View Client

Extract the VMware View Client

Within that folder you will see ‘vmware-view’ and ‘vmware-view.bin’. The first file is actually just a launcher script used to display a EULA and then launch the second. Lets take a look at ‘vmware-view’:

vi vmware-view
Contents of vmware-view

Contents of vmware-view

Here we can see that Zenity is used to pop up a message box with the tech preview EULA and then create (touch) a file denoting it’s acceptance. Since we’re already off the rails as far as support goes here there is no good reason to accept the EULA anyway :) but the real reason to get rid of this bit of code is to eliminate the requirement for Zenity on a live CD. Next, we see that the “real” client is launched – but something is missing here. No arguments get passed in! So if you were to type:

vmware-view --help

All that would happen is that the VMware View Client would launch as if you had passed nothing in. Same for any other option. Why? Because this wrapper script is gobbling up the arguments and not passing them into the “real” view-client.bin executable so it will never know that you specified full screen operation (–fullscreen), or anything else. So, how do we edit this file? It’s easy. Now, this assumes you actually WANT to keep the wrapper in place because when we are done editing it, there’s almost no reason to have it there at all… almost.

Here is what the edited file should look like:

vmware-view edited

vmware-view edited

Pretty pathetic right? It’s also pretty pointless, but once again, in IT we deal with pointless on a daily basis so why stop for this article. Let’s talk a bit about what’s been changed here. First and most obvious, the entire EULA/Zenity code block has been removed. Second, on the launch line for ‘vmware-view.bin’ we have added ‘$*’. If you are unfamiliar with this notation it represents all of the arguments that were passed into the shell script, specific arguments can be referenced as ‘$1’ or ‘$2’ but since we don’t want or even care about specific arguments here we just take them all and pass them as the arguments to the VMware View Client binary itself. Now when you type ‘vmware-view –help’ you will actually get the help output.

So why is this pointless? Because all it is doing is calling the binary file. We could just call that directly ourselves. By removing the EULA we remove the whole point of wrapping the launch of the VMware View Client in the first place. So, a better solution might be to delete the current ‘vmware-view’ shell script, and replace it by renaming ‘vmware-view.bin’ to ‘vmware-view’. I say it MIGHT be better because there may be some very good reasons to leave the (pointless) wrapper script in place for right now:

  • In a truly stateless PXE boot environment, you may want to have code that goes out and pulls a list of viable VMware View Connection Servers and then decides which host is best for that client (based on IP or some other property), and passes it in automatically to the VMware View Client upon launch.
  • You may want to lock the user into the VMware View Client via an infinite loop
  • You may want to provide a custom dialog to the user to allow them to select screen resolution, or possibly (with proper USB support) what kind of workstation configuration they have and then build the proper command line to attach devices unique to each configuration.
  • You might want to perform some kind of file share or other mapping prior to launching the VMware View Client.
  • You might want to gather stats on the client device – CPU, RAM, NIC/MAC, etc. and report them to a central database for hardware refresh/repair assistance
  • Any of a million other things you MIGHT want to do before dropping a user into their VMware View desktop

So, if you think you will NEVER need to do those things, delete the script, and replace it with the binary. But if you believe you might want to be able to take some actions before launching, this might be a good place to do it, and by leaving the file in place now you have an easy way to make it happen as well as a file that’s easy for an end user to remember and execute. Yes, yes, I know you could do all those things I listed via rc init scripts at boot, but those only run once. What if you need to check the environment and apply settings or changes to the arguments every time the VMware View Client is launched? Then you’d end up wrapping it anyway and be right back where we are now. Being a PERL hacker I understand TMTOWTDI so I don’t claim this to be the only or best way, but it makes sense to me to leave the wrapper in place for now vs. renaming the binary. Ok, horse, dead, beaten.

Step 4 – Re-seal the package

We’ve extracted what we need from the .DEB, and now we’ve removed a dependency and fixed a minor bug in the contents. Now we need to seal everything back up into a nice neat bundle. No real surprises here – as it has risen from a tar.gz, so it shall be reborn!

One note, since all the permissions have been flipped to our user during extraction, and they started out as root, let’s flip them back to root when creating the archive. Change directory to the ‘client’ directory that we extracted ‘data.tar.gz’ into, and from there run:

tar -czf ../vmware-view-client_1_3_0-0.tar.gz --owner=root --group=root ./*

This command will create a new archive called ‘vmware-view-client_1_3_0-0.tar.gz’ in the initial folder where ‘data.tar.gz’ was extracted. All files in the archive will be owned by root, and all paths will be relative – which is as things were in the original archive.

Recreating the VMware View Client archive

Recreating the VMware View Client archive

Step 5 – Go forth and multiply!

So now you can take your newly created tar file and test it out on other distros. Sure, I could have converted the .DEB into an .RPM or whatever, but a tar.gz is pretty much universal and in many cases package managers are removed to create truly tiny distros anyway making this an ideal method of installation. Besides if you really want to create an RPM or other package you can easily find the steps to do it – go fish my friends! Go fish!

Installing the VMware View Client this way is fairly trivial:

sudo tar -xvzf vmware-view-client_1_3_0-0.tar.gz -C /

And that’s it. Run ‘vmware-view’ and the client should launch assuming all required deps are in place. If they are not you’ll get an error telling you so and you can then start chasing them down. If you want a list of required deps, extract the control.tar.gz file and then view the contents of ‘control’. Under the ‘Depends:’ section you will see the list of pre-reqs required:

VMware View Client Dependencies

VMware View Client Dependencies

Closing Thoughts

Now that we have a portable (kinda) installation of the VMware View Client, what can we do with it? I’ll have a follow-up post fairly soon showing what can be done with SuSE Studio. Keep an eye out for it. I’ll probably follow that up with something RedHat focused as that seems to come up quite often in comments and emails. Beyond that I’d like to start working on a really small footprint distro (50MB or less if it’s possible) and the required PXE infrastructure for booting it. My schedule is going to be busy through late February so it’s hard to know when I’ll make serious progress on these efforts but just keep checking back for updates – they’ll get here eventually.

Lastly, I know in my previous post for creating an Ubuntu live CD I was asked, and then posted, the ISO I created for the tutorial. I am certain people – busy people, of course :) – will ask for me to post the tar.gz file I created for this tutorial as well. Unfortunately in this case, I am not 100% certain I have the rights to redistribute the VMware View Client in a way inconsistent with it’s released packaging. Being a VMware employee means I need to be really sure before doing something like that. So for now, I will not be posting a direct link to the extracted client bits – I’ll sell you the bullets, but I won’t hold the gun and pull the trigger for you, if you will. Honestly this is a pretty straightforward process, and my belief is that it’s always better to teach people to fish – so get fishing people!

Read more from Linux, PCoIP, VDI, View, VMware
9 Comments Post a comment
  1. Hi,

    Good Post! Very informative, glad that you are going to continue writing things like this!

    Reply
  2. forbsy
    Mar 29 2012

    Hi. I’m not a Linux person at all, but I need to get the View client for Linux working :-). How would I go about pre-populating the client with the View Connection Manager IP/DNS name and have the client launch a full screen desktop for the user?
    Basically we need to launch the client inside a separate X session (with a particular geometry) so that we can share it, but when we do this, the VMWare-View client is not reading the proper resolution geometry – and we can’t figure out where it is getting the geometry from. When running inside this separate X session, and I tell it to go fullscreen, it doesn’t fill the whole screen.

    Thanks!

    Reply
  3. Mar 31 2012

    Hey Chuck, just letting you know I am waiting to see your pxe image build process. In the meantime I am working on one myself. I am going to try using Thinstation to make it first. If I fail at that, I’ll grab and modify one of the many small linux distros like LNX-BBC, DSL or Puppy etc.

    P.S. I am getting a lot of invites for PCoIP Tuning and Performance sessions. Are you running those? I may end up at the NYC session this month. Probably the same thing as the Vegas-PEX one you were giving, but it gives me a break from installing View all over the place.

    Reply
    • RexRemus
      Mar 31 2012

      Oddly enough it’s not me giving those, though depending on who is giving the preso it’s likely based off of something I have produced. I just got back from doing stuff similar to PEX in Bangkok and Singapore and a trip out to Teradici HQ so there will be plenty of new stuff coming down the pipe to talk about. Are the invites for VMUGs? or vmLive? or a bootcamp? Just curious.

      Reply
  4. Chris
    Apr 13 2012

    Last one was for a Tech Express. From Noelle Brooks. Someone named Sueko Diedrick was cc’d. Both are vmware people.

    Reply
  5. Ken.C
    Oct 1 2012

    Unfortunately, the latest version from Canonical (1.5.0-0) doesn’t work on Fedora 16. I get a segfault right after I enter the VCS name and hit Continue.

    Reply
  6. Nov 7 2013

    Precisely how long did it acquire u to write “Extracting the VMware
    View Client for Use on Alternate Distros | MindFlux
    Inc.”? It features a great deal of decent information.
    Thanks ,Curtis

    Reply
    • RexRemus
      Nov 7 2013

      It took a good bit :) Thanks!

      Reply

Trackbacks & Pingbacks

  1. Creating a VMware View Live CD with SUSE Studio | MindFlux

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments