2

I'm trying to start up vnc4server from my php. So far it's running from a start.sh with this in

vncserver -geometry 1000x800 -depth 24
export HOME=/home/psych
cd /home/psych/mw3/Infected/
screen -d -m bash -c "export DISPLAY=:1 ; wine iw5mp_server.exe +params...";

in my apache2 error.log i have this:

You will require a password to access your desktops.

getpassword error: Inappropriate ioctl for device

It looks as though it's asking me to set a password for it from my php but I'm not sure how to do this, or how to disable getpassword.

Note: the php command i'm using

shell_exec('HOME=home/psych && sh/home/psych/mw3/Infected/start.sh');
Jake
  • 21
  • 3

1 Answers1

1

There needs to be an encrypted passwd for that user in ~[user]/.vnc/passwd

You normally generate the password interactively with the vncpasswd command. If you want to automate everything from a script and copy a pre-encrypted .vnc/passwd file make sure the permissions are 600. If not, eg, 644, you'll get the ioctl error.

Took me a long time to find that.

Danny
  • 2,482
  • 3
  • 34
  • 48