Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
    
This script solves it. Thanks @whtyger – koogee Feb 7 '14 at 1:14
    
Why go through all that trouble? A symlink would also work. "ln ~/.local/share/recently-used.xbel ~/.recently-used.xbel" – Aaron Franke Jun 26 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 2 days ago
    
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. – Aaron Franke yesterday
    
@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 yesterday

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.

share|improve this answer
    
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). – Tom Brito Feb 23 '12 at 19:36
    
It didn't work, it's still not saving the library. – Tom Brito Feb 24 '12 at 11:31

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.

share|improve this answer
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. – Tom Brito Feb 14 '12 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. – Tom Brito Feb 14 '12 at 16:05
    
Trying to install as normal user gives a message telling that need root access. – Tom Brito Feb 15 '12 at 15:57

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
share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.