Shared folder to current user's home directory

This is for discussing general topics about how to use VirtualBox.
Post Reply
celandir
Posts: 1
Joined: 11. Sep 2009, 22:44
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Shared folder to current user's home directory

Post by celandir »

Hi everyone,

I am currently creating a WinXP machine that will be used by multiple users on a Ubuntu host. To let the users access there host OS home directory, I wanted to add a shared folder for ~ (tilde), but Virtualbox complains, that the path "is not absolute". Does anyone know how to get this work or do I have to write a wrapper script that creates a link to the user's home directory in a fixed path?

Any help is much appreciated. I am new to Virtualbox and previously used VMware.

Michael
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

Re: Shared folder to current user's home directory

Post by Sasquatch »

As you guessed, the short notation for your home folder isn't an absolute path. It's also not advised to share your complete home folder, it might not even work. It's best to share a subfolder, like ~/share, of course in full notation, not this short one.
The only last solution to get this to work, is have each user their own settings, which is an exact copy of the original except for the SF path. There is one problem with it though, and that's if a user changed a setting that could cause problems for other users. So you have to use some kind of script, symlinking a common location to the users home folder. You can use /tmp for that.

Code: Select all

ln -sf ~/shared /tmp/vbshare
Let this run as user and all will be well. With one exception: if the link already exists from a different user, it might not be accessible/changeable for the new 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.
Post Reply