6

Using Ubuntu 11.10 and Vmware Player 4.0.

Every time when I open the vmware player, the last library was not there (it was just blank). I can manually add it and it is working then.

Anyone experienced this?

0

6 Answers 6

7

The real source of the problem: VMware Player stores its Library of the used machines in ~/.recently-used.xbel. But GTK3 changed the location of this file to ~/.local/share/. And ~/.recently-used.xbel is cleared on the regular basis, so the list of machines becomes empty. (Some insight can be found here: http://communities.vmware.com/message/1714765 and here: https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1007336).

As we cannot change the behavior of VMware, we can use the workaround. Use the wrapper script to run VMware Player:

#!/bin/bash

cp ~/.vmware/.recently-used.xbel ~
/usr/bin/vmplayer
sleep 5
mv ~/.recently-used.xbel ~/.vmware/

Save it somewhere in your home folder, make it executable and change the launcher which starts your VMware Player to run this script instead. It will store the list of your machines till the next launch of VMware. It was tested with Ubuntu 12.04.1 and VMware Player 5.0.0.

BTW: The answer which got the bounty is wrong. Running VMware Player with superuser privilege won't help you to save the Library. Moreover, it's definitely bad advice to use sudo in this case.

4
  • Why go through all that trouble? A symlink would also work. "ln ~/.local/share/recently-used.xbel ~/.recently-used.xbel" Jun 26, 2016 at 4:54
  • @AaronFranke Did you check it? This workaround script was created when I noticed that this ~/.recently-used.xbel is cleared from the home folder. I have a suspicion that this link won't last long.
    – whtyger
    Jun 26, 2016 at 9:32
  • What program clears the symlink? I suppose you could also re-create the symlink automatically or prevent the program from modifying the symlink through file permissions. Anyway, running the rm and ln commands again worked, but this doesn't seem to persist across reboots. Jun 27, 2016 at 21:49
  • @AaronFranke Possibly Gnome cleans this file in its old location on every start. That's why I used the described way of preserving it. So the symlink isn't a persistent solution also. Immutable bit would help, I suppose.
    – whtyger
    Jun 28, 2016 at 7:08
2
+25

It looks like vmware player has no permissions to write to the file (or directory) where it tries to save the library.

This can happen if, e.g. you use sudo to run it once -- it'll then create files as root inside your home directory.

The fix would be to find all the files that belong to root in your home -- in a terminal do

sudo find $HOME -uid 0 -exec chown $USER:$USER {} +

In the future never use sudo with graphical application to prevent this kind of issue -- use gksudo instead.

2
  • Got a find: `/home/tombrito/.gvfs': Permission denied, I'll check if it worked anyway after I restart the computer, and I came back here to tell (sorry, I lost the bounty time, I was out a few days). Feb 23, 2012 at 19:36
  • It didn't work, it's still not saving the library. Feb 24, 2012 at 11:31
1

I have encountered the same problem on ubuntu 11.10. Try to run the vmplayer with root privilege, typing sudo vmplayer in the terminal. And the virtual machine you have run won't be missing.

However, I have no idea about how to solve this problem with the normal user's privilege.

3
  • 2
    If this is the solution, maybe the problem probably is that you (and I) installed as root something we shouldn't install as root. Just maybe. Feb 14, 2012 at 16:00
  • By the way, run as sudo will not keep the library when, later, you run as normal user again. I could always run as sudo, as a workaround, but I still would like a real solution. Feb 14, 2012 at 16:05
  • Trying to install as normal user gives a message telling that need root access. Feb 15, 2012 at 15:57
1

In order to save your vmplayer library across reboots, do following:

  1. download .bundle executable from vmware website
  2. sudo apt-get install build-essential linux-headers-'uname -r'
  3. navigate to directory containing downloaded .bundle
  4. gksudo bash ./VMware-Player-*.bundle
1

Run these commands:

rm ~/.recently-used.xbel
ln ~/.local/share/recently-used.xbel ~/.recently-used.xbel

This will fix the problem. The reason as to why this is required can be found in whtyger's answer.

The fix will not persist over reboots, so you'll need to have this script automatically run each time your computer starts.

0

Another option is that your preferences file in $HOME/.vmware is corrupted or can't be read from the current vmplayer installation. Delete it and run vmplayer again so it can create it again. Add you VMs into the library and check again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .