Ticket #1890 (new defect)
Opened 8 years ago
VBoxHeadless does not set the user correctly when run from SysV init script
|Reported by:||greenpossum||Owned by:|
|Version:||VirtualBox 1.6.2||Keywords:||vboxheadless ipc username|
I'm starting a VM from a Ubuntu init script which uses the helper program start-stop-daemon. Although I used the --chuid user option, the resulting instance of VBoxHeadless does not appear to know the username. In particular this affects the VBoxXPCOMIPCD service which created a directory called /tmp/.vbox--ipc (notice the empty string between the hyphens, normally when VBoxHeadless is started from a terminal, the directory is /tmp/.vbox-user-ipc). This means that VBoxManage cannot find the instance of the VM to send IPC to, for example, to send Ctrl-Alt-Del scancodes. Setting LOGNAME to the intended username seems to fix this, as in:
LOGNAME=user start-stop-daemon ...
The correct fix would be for the service to check its uid and map it back to the username.