muliple accounts on ubuntu 8.04

Discussions related to using VirtualBox on Linux hosts.
jdfilburn
Posts: 2
Joined: 17. Oct 2008, 22:59

muliple accounts on ubuntu 8.04

Post 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.
greenpossum
Volunteer
Posts: 98
Joined: 11. Jul 2008, 08:10

Re: muliple accounts on ubuntu 8.04

Post 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.
jdfilburn
Posts: 2
Joined: 17. Oct 2008, 22:59

Re: muliple accounts on ubuntu 8.04

Post 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.
greenpossum
Volunteer
Posts: 98
Joined: 11. Jul 2008, 08:10

Re: muliple accounts on ubuntu 8.04

Post 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?
PartisanEntity
Posts: 6
Joined: 18. Oct 2008, 14:36

Post 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.
vkov_tinsky
Volunteer
Posts: 218
Joined: 5. Apr 2008, 20:18

Post 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
PartisanEntity
Posts: 6
Joined: 18. Oct 2008, 14:36

Post 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 :)
elliotash
Posts: 6
Joined: 27. Oct 2008, 09:57

Post 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
elliotash
Posts: 6
Joined: 27. Oct 2008, 09:57

Post 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
vkov_tinsky
Volunteer
Posts: 218
Joined: 5. Apr 2008, 20:18

Post 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
Last edited by vkov_tinsky on 28. Oct 2008, 02:13, edited 2 times in total.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
elliotash
Posts: 6
Joined: 27. Oct 2008, 09:57

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
greenpossum
Volunteer
Posts: 98
Joined: 11. Jul 2008, 08:10

Post 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.
elliotash
Posts: 6
Joined: 27. Oct 2008, 09:57

Post 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?
Post Reply