Opened 16 years ago
Last modified 8 years ago
#1890 closed defect
VBoxHeadless does not set the user correctly when run from SysV init script — at Initial Version
Reported by: | Ken Yap | Owned by: | |
---|---|---|---|
Component: | VM control | Version: | VirtualBox 1.6.2 |
Keywords: | vboxheadless ipc username | Cc: | |
Guest type: | other | Host type: | other |
Description
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.