Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtualbox-ose-4.2.6
- phpvirtualbox-4.2.4
- ##install from ports
- # cd /usr/ports/emulators/virtualbox-ose-additions/
- # cd /usr/ports/emulators/virtualbox-ose-kmod/
- # cd /usr/ports/emulators/virtualbox-ose/
- # cd /usr/local/www/phpvirtualbox/
- # make install
- ##configure
- # kldload vboxdrv
- # echo 'vboxdrv_load="YES"' >> /boot/loader.conf
- # echo 'vboxnet_enable="YES"' >> /etc/rc.conf
- # echo 'vboxguest_enable="YES"' >> /etc/rc.conf
- # echo 'vboxservice_enable="YES"' >> /etc/rc.conf
- # echo 'vboxservice_flags="--disable-timesync"' >> /etc/rc.conf
- # echo 'vboxheadless_enable="YES"' >> /etc/rc.conf
- # echo 'vboxwebsrv_enable="YES"' >> /etc/rc.conf
- # adduser pvbuser
- # pw groupadd vboxusers
- # pw groupmod vboxusers -m pvbuser
- # mkdir /home/pvbuser
- # chown -R pvbuser:vboxusers /home/pvbuser
- #+++ conf Apache22...
- #------------------{Patch phpvirtbox to enable VNC pass configuration}---------------
- #VBoxManage modifyvm c326c1d2-6c32-4291-a869-365f89d3cfd6 --vrdemulticon on --vrdeport 9000 --vrdeaddress 10.0.2.55 --vrdeauthtype external --vrdeproperty VNCPassword=1234
- diff -rwubN phpvirtualbox.bak/phpvirtualbox/lib/vboxconnector.php phpvirtualbox/lib/vboxconnector.php
- --- phpvirtualbox.bak/phpvirtualbox/lib/vboxconnector.php 2012-03-16 15:20:17.000000000 -0400
- +++ phpvirtualbox/lib/vboxconnector.php 2012-04-04 18:06:23.417216274 -0400
- @@ -865,6 +865,7 @@
- if($m->VRDEServer && $this->vbox->systemProperties->defaultVRDEExtPack) {
- $m->VRDEServer->enabled = intval($args['VRDEServer']['enabled']);
- $m->VRDEServer->setVRDEProperty('TCP/Ports',$args['VRDEServer']['ports']);
- + $m->VRDEServer->setVRDEProperty('VNCPassword',$args['VRDEServer']['vncPassword'] ? $args['VRDEServer']['vncPassword'] : null);
- $m->VRDEServer->authType = ($args['VRDEServer']['authType'] ? $args['VRDEServer']['authType'] : null);
- $m->VRDEServer->authTimeout = intval($args['VRDEServer']['authTimeout']);
- }
- @@ -1169,6 +1170,7 @@
- $m->VRDEServer->setVRDEProperty('TCP/Ports',$args['VRDEServer']['ports']);
- if(@$this->settings->enableAdvancedConfig)
- $m->VRDEServer->setVRDEProperty('TCP/Address',$args['VRDEServer']['netAddress']);
- + $m->VRDEServer->setVRDEProperty('VNCPassword',$args['VRDEServer']['vncPassword'] ? $args['VRDEServer']['vncPassword'] : null);
- $m->VRDEServer->authType = ($args['VRDEServer']['authType'] ? $args['VRDEServer']['authType'] : null);
- $m->VRDEServer->authTimeout = intval($args['VRDEServer']['authTimeout']);
- $m->VRDEServer->allowMultiConnection = intval($args['VRDEServer']['allowMultiConnection']);
- @@ -3441,6 +3443,7 @@
- 'enabled' => $m->VRDEServer->enabled,
- 'ports' => $m->VRDEServer->getVRDEProperty('TCP/Ports'),
- 'netAddress' => $m->VRDEServer->getVRDEProperty('TCP/Address'),
- + 'vncPassword' => $m->VRDEServer->getVRDEProperty('VNCPassword'),
- 'authType' => $m->VRDEServer->authType->__toString(),
- 'authTimeout' => $m->VRDEServer->authTimeout,
- 'allowMultiConnection' => intval($m->VRDEServer->allowMultiConnection),
- diff -rwubN phpvirtualbox.bak/phpvirtualbox/panes/settingsDisplay.html phpvirtualbox/panes/settingsDisplay.html
- --- phpvirtualbox.bak/phpvirtualbox/panes/settingsDisplay.html 2012-03-16 15:20:17.000000000 -0400
- +++ phpvirtualbox/panes/settingsDisplay.html 2012-04-04 18:04:29.358798403 -0400
- @@ -91,7 +91,11 @@
- <th><span class='translate'>Net Address:</span></th>
- <td><input type='text' class='vboxText' style='width: 100%' name='vboxSettingsDisplayRDPAddr' /></td>
- </tr>
- - <tr class='vboxRunningEnabled'>
- + <tr class="vboxVNCEnabled">
- + <th><span class='translate'>VNC Password:</span></th>
- + <td colspan='2'><input type='text' class='vboxText' name='vboxSettingsDisplayVNCPassword' /></td>
- + </tr>
- + <tr class='vboxRunningEnabled vboxRDPEnabled'>
- <th><span class='translate'>Authentication Method:</span></th>
- <td>
- <select name='vboxSettingsDisplayRDPAuth' id='vboxSettingsDisplayRDPAuthID' style='width: 100%'>
- @@ -101,11 +105,11 @@
- </select>
- </td>
- </tr>
- - <tr class='vboxRunningEnabled'>
- + <tr class='vboxRunningEnabled vboxRDPEnabled'>
- <th><span class='translate'>Authentication Timeout:</span></th>
- <td><input type='text' class='vboxText' style='width: 100%' name='vboxSettingsDisplayRDPAuthTimeout' /></td>
- </tr>
- - <tr>
- + <tr class='vboxRDPEnabled'>
- <th><span class='translate'>Extended Features:</span></th>
- <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsDisplayRDPMulti' /> <span class='translate vboxEnablerListen'>Allow Multiple Connections</span></label></td>
- </tr>
- @@ -143,22 +147,29 @@
- } else {
- + if ($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack == "VBoxVRDP") {
- + $('.vboxVNCEnabled').remove();
- + document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAuth.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authType;
- + document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAuthTimeout.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authTimeout;
- +
- + if(($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.allowMultiConnection)) {
- + document.forms['frmVboxSettings'].vboxSettingsDisplayRDPMulti.checked = true;
- + }
- + } else {
- + document.forms['frmVboxSettings'].vboxSettingsDisplayVNCPassword.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.vncPassword;
- + $('.vboxRDPEnabled').remove();
- + }
- document.forms['frmVboxSettings'].vboxSettingsDisplayRDPPort.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.ports;
- if(!document.forms['frmVboxSettings'].vboxSettingsDisplayRDPPort.value)
- document.forms['frmVboxSettings'].vboxSettingsDisplayRDPPort.value = '3389-4000';
- - document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAuth.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authType;
- - document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAuthTimeout.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authTimeout;
- +
- document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAddr.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.netAddress;
- if(($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.enabled)) {
- document.forms['frmVboxSettings'].vboxSettingsDisplayRDPEnabled.checked = true;
- }
- - if(($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.allowMultiConnection)) {
- - document.forms['frmVboxSettings'].vboxSettingsDisplayRDPMulti.checked = true;
- - }
- -
- if(!$('#vboxIndex').data('vboxConfig').enableAdvancedConfig)
- $('#vboxSettingsDisplayRDPAddrRow').css('display','none');
- }
- @@ -191,10 +202,15 @@
- if($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer && $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack) {
- $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.ports = document.forms['frmVboxSettings'].vboxSettingsDisplayRDPPort.value;
- $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.netAddress = document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAddr.value;
- + $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.enabled = (document.forms['frmVboxSettings'].vboxSettingsDisplayRDPEnabled.checked ? 1 : 0);
- +
- + if ($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack == "VBoxVRDP") {
- $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authType = document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAuth.value;
- $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authTimeout = document.forms['frmVboxSettings'].vboxSettingsDisplayRDPAuthTimeout.value;
- - $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.enabled = (document.forms['frmVboxSettings'].vboxSettingsDisplayRDPEnabled.checked ? 1 : 0);
- $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.allowMultiConnection = (document.forms['frmVboxSettings'].vboxSettingsDisplayRDPMulti.checked ? 1 : 0);
- + } else {
- + $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.vncPassword = document.forms['frmVboxSettings'].vboxSettingsDisplayVNCPassword.value;
- + }
- }
- });
Add Comment
Please, Sign In to add comment