VirtualBox changes user privileges - other users can't open

Discussions related to using VirtualBox on Mac OS X hosts.
theDaniel
Posts: 39
Joined: 12. Oct 2011, 16:44
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Wind-does-blow XP (Xtra Porous), ReactOS
Location: Eastern Most County in USA

Re: VirtualBox changes user privileges - other users can't o

Post by theDaniel »

An applescript would work like this:
1.) Double-click the applescript instead of VirtualBox, it in turn opens VirtualBox
2.) The applescript stays open and running watching for VirtualBox to *not* be running
3.) When it sees VirtualBox is no longer running, it runs your shell script code
4.) The applescript delays an appropriate time to allow the shell script to execute, then quits itself

Code: Select all

--open VirtualBox
tell application id "org.virtualbox.app.VirtualBox" to activate
--Check VirtualBox, is it running?
on idle
	if application id "org.virtualbox.app.VirtualBox" is not running then
		do shell script --shell code goes here
		return 20
	end if
end idle
(* Below v v change the delay 10 (seconds) to what you think is the longest time required
for your shell code to execute before this applescript quits itself *)
delay 10
if application id "org.virtualbox.app.VirtualBox" is not running then
end if
quit
1.) Copy this code into Script Editor (Apple changed it to Applescript Editor in 10.7), It's either in "Applications" or "Utilities".
2.) Save it anywhere you like as a "Stay Open" application -- I suggest your home folder, but anywhere should work fine.
3.) Name it something you can easily relate to.
4.) Double-click it to open it and VirtualBox
5.) When you quit VirtualBox it should execute your shell script, delay a ten seconds and quit ready for the next launch.

Since I don't have this permissions problem I can't test this applescript myself. But it otherwise functions well on my machine.

Hope this helps.

-Daniel
bruce.desertrat
Posts: 18
Joined: 9. Nov 2011, 01:26
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: windows linux

Re: VirtualBox changes user privileges - other users can't o

Post by bruce.desertrat »

I had the same issue, multiple users on the same system needing to share the same VM, and solved it by appending an ACL to the folder enclosing the VM files.

The folder is in the /Users/Shared directory called 'VirtualBoxVMS' and the command is this:

sudo chmod -R +a "everyone allow read,write,file_inherit,directory_inherit" VirtualBoxVMS

This grants an ACL to the group 'Everyone' allowing everyone read and write (with inheritance...any new file or directory created gets these acls as well) to that directory. The -R applies it to all enclosed existing files.

I know this is an old thread, but it came up when I googled the issue...
philwebster
Posts: 1
Joined: 4. Jun 2013, 19:24

Re: VirtualBox changes user privileges - other users can't o

Post by philwebster »

Thank you Bruce, that is exactly what I needed!
Post Reply