I'm trying to start vncviewer on raspberry pi using php, where RPi is the client and for my server i'm using Windows OS In php i'm using this script to start the vncviewer PHP: $cmd= "echo password | vncviewer -autopass " .$ip; shell_exec($cmd); It works when I only run the shell script from RPi, but when try it from php i get this error: Code: Error: Can't open display: Is there any workaround for this error ?