Page 1 of 2
muliple accounts on ubuntu 8.04
Posted: 17. Oct 2008, 23:35
by jdfilburn
I just installed Windows XP within the virtual box, and it seems to work fine. I need to produce sound, control my printer, read disks, and hopefully use it with my Logitech QuickCam 9000 for Skype, but at my level of expertise, I'm on top of the world right now.
More important than those issues, is the fact that while I can launch it fine on my own account, when I switch users by logging myself off and logging in under my wife's account, it acts like a brand new installation. None of my excellent work is there.
What did I do wrong during installation and configuration, and what is the (hopefully easy) fix so that both of us use the same application?
Thanks for your assistance.
Re: muliple accounts on ubuntu 8.04
Posted: 18. Oct 2008, 00:57
by greenpossum
Nothing wrong, just that the VDI and config files are owned by your account and under your home directory. You'd have to find some way to share them. I imagine there is a way in Linux to do this, (put them somewhere common, make them group writable, and create symlinks to them, perhaps) but I haven't had to arrange this.
Re: muliple accounts on ubuntu 8.04
Posted: 18. Oct 2008, 05:00
by jdfilburn
Right. That's exactly what I need: some guidance as to how and where to place virtualbox so that both users can use the same program and configuration.
Re: muliple accounts on ubuntu 8.04
Posted: 18. Oct 2008, 09:57
by greenpossum
jdfilburn wrote:Right. That's exactly what I need: some guidance as to how and where to place virtualbox so that both users can use the same program and configuration.
Ok, try this:
Code: Select all
mkdir /opt/vbox
chgrp users /opt/vbox
chmod g+ws /opt/vbox
mv ~/.Virtualbox /opt/vbox
chgrp -R users /opt/vbox
chmod -R g+w /opt/vbox
ln -s /opt/vbox/.Virtualbox ~/.Virtualbox
You'll probably need to do the mkdir as root.
For your wife, only the ln -s is required. And to be in group vboxusers of course. Hopefully both of you can then use VirtualBox, naturally not at the same time, but then there's only desktop, right?
Posted: 18. Oct 2008, 14:39
by PartisanEntity
jdfilburn: please post back if this works, I am hoping to do the exact same thing
For your wife, only the ln -s is required.
What exactly do you mean with this? Does this command have to be run from the wifes account? Or something else?
Thank you.
Posted: 18. Oct 2008, 16:01
by vkov_tinsky
PartisanEntity wrote:What exactly do you mean with this? Does this command have to be run from the wifes account?
The last command (
ln -s) creates a symbolic link so that when VirtualBox starts and tries to look inside /home/USER/.VirtualBox it's redirected to /opt/vbox/.Virtualbox. This last command you will have to run once for each new user (as that user) who you want to be able to access the "shared" virtualbox files. (The other commands simply move the VirtualBox settings & files to /opt/vbox and set permissions such that other users can access them correctly.)
Regards,
VT
Posted: 18. Oct 2008, 19:40
by PartisanEntity
Thanks very much.
I followed the instructions in this thread and both my wife and I can access the same guest OS through our accounts. Very nice

Posted: 28. Oct 2008, 00:11
by elliotash
Hello greenpossum I tried the command using sudo and all that was created was the directory /opt/vbox. i tried it using sudo and i have not been able to get it to work. yes i am a newbie to using the command line
Posted: 28. Oct 2008, 00:19
by elliotash
further to my earlier message the only part of the command that is executed is the make directory see out from command line terminal
elliot@OmniStation1:~$ sudo mkdir /opt/vbox
[sudo] password for elliot:
mkdir: cannot create directory `/opt/vbox': File exists
elliot@OmniStation1:~$ sudo chgrp users /opt/vbox
elliot@OmniStation1:~$ chmod g+ws /opt/vbox
chmod: changing permissions of `/opt/vbox': Operation not permitted
elliot@OmniStation1:~$ mv ~/.Virtualbox /opt/vbox
elliot@OmniStation1:~$ chgrp -R users /opt/vbox
chgrp: changing group of `/opt/vbox/.Virtualbox': Operation not permitted
chgrp: changing group of `/opt/vbox': Operation not permitted
elliot@OmniStation1:~$ chmod -R g+w /opt/vbox
chmod: changing permissions of `/opt/vbox': Operation not permitted
elliot@OmniStation1:~$ ln -s /opt/vbox/.Virtualbox ~/.Virtualbox
elliot@OmniStation1:~$ sudo -i
root@OmniStation1:~# chgrp users /opt/vbox
root@OmniStation1:~# chmod g+ws /opt/vbox
root@OmniStation1:~# mv ~/.Virtualbox /opt/vbox
root@OmniStation1:~# chgrp -R users /opt/vbox
root@OmniStation1:~# chmod -R g+w /opt/vbox
root@OmniStation1:~# ln -s /opt/vbox/.Virtualbox ~/.Virtualbox
Posted: 28. Oct 2008, 01:00
by vkov_tinsky
elliotash wrote:elliot@OmniStation1:~$ sudo chgrp users /opt/vbox
elliot@OmniStation1:~$ chmod g+ws /opt/vbox
chmod: changing permissions of `/opt/vbox': Operation not permitted
That most likely means you're not a member of "users". (To make this work properly all users that are to use the "shared" VirtualBox files will need to be a member of the same group.) This should work for you without errors I think:
Code: Select all
sudo usermod -a -G users elliot
sudo mkdir /opt/vbox
sudo chgrp users /opt/vbox
chmod g+ws /opt/vbox
mv ~/.VirtualBox /opt/vbox
chgrp -R users /opt/vbox
chmod -R g+w /opt/vbox
And then as each user planning to access the files:
Code: Select all
sudo usermod -a -G users $USER
ln -s /opt/vbox/.VirtualBox ~/.VirtualBox
**
Edit: Apologies for the previously wrong capitalisation of "VirtualBox".
Regards,
VT
Posted: 28. Oct 2008, 01:05
by Sasquatch
Why are you all trying to move the VMs to /opt? Why not just a folder directly in /, or /media, or a different folder for that matter. Using /media, it will look something like this:
Code: Select all
sudo mkdir /media/vbox
sudo chown :vboxusers /media/vbox
sudo chmod 660 /media/vbox
mv ~/.virtualbox/* /media/vbox
ln -s /media/vbox/VirtualBox.xml ~/.virtualbox/
Now all you need to do, is create a folder in the home folder of the other user called '.virtualbox' and create the same symlink as the first user.
Posted: 28. Oct 2008, 01:56
by elliotash
the responses to the two postings are as follows
Code: Select all
root@OmniStation1:~# sudo mkdir /opt/vbox
mkdir: cannot create directory `/opt/vbox': File exists
root@OmniStation1:~# sudo chgrp users /opt/vbox
root@OmniStation1:~# chmod g+ws /opt/vbox
root@OmniStation1:~# mv ~/.Virtualbox /opt/vbox
mv: cannot stat `/root/.Virtualbox': No such file or directory
root@OmniStation1:~# chgrp -R users /opt/vbox
root@OmniStation1:~# chmod -R g+w /opt/vbox
root@OmniStation1:~# sudo mkdir /media/vbox
root@OmniStation1:~# sudo chown :vboxusers /media/vbox
root@OmniStation1:~# sudo chmod 660 /media/vbox
root@OmniStation1:~# mv ~/.virtualbox/* /media/vbox
mv: cannot stat `/root/.virtualbox/*': No such file or directory
root@OmniStation1:~# ln -s /media/vbox/VirtualBox.xml ~/.virtualbox/
what is missing
Posted: 28. Oct 2008, 02:05
by Sasquatch
It could be because of uppercase foldername. It's .VirtualBox. My bad, had to check that first.
However, as you stated with the other commands, you miss a vital folder. It seems that you forgot the whole idea of separate users with their own home folder. So using the Root is a nice way out of some things, it won't work nice if you don't run VB as Root.
Posted: 28. Oct 2008, 03:00
by greenpossum
Sasquatch wrote:Why are you all trying to move the VMs to /opt? Why not just a folder directly in /, or /media, or a different folder for that matter.
Why not? /opt is as good as any. Or /usr/local. Using / pollutes the top level and /media is meant for automounting optical media and USB sticks. One day someone will plug in a USB stick labelled VirtualBox and then you will get /media/VirtualBox and /media/VirtualBox-1 and a smidgen of confusion.
Actually on reflection I would probably put it in /var/VirtualBox now.
Posted: 28. Oct 2008, 10:37
by elliotash
Actaully I am still having the same problem and i am stuck. I am getting the same messages regardless of which code I try. What is also happening is I cannot delete the folder created. So something is wrong could you offer some clarification?