MATLAB Web Server | ![]() ![]() |
Starting and Stopping VNC
Before starting VNC be sure the vncserver
Perl script has the correct path to the Perl executable at the top of the script. Fix the path if it is incorrect. The default script makes reasonable assumptions about the geometry and color requirements of your virtual X display. If you need to change the assumptions, you can specify different geometry and color requirements on the command line or edit the vncserver
script. See the README
file with the VNC distribution for additional details or the online documentation at the Web site. Type
for information about arguments to the script.
The first time you run the vncserver
, you will be prompted for a password. This password controls access to the VNC viewer, which is not used with the Web Server.
You do not have to specify a display number when starting the VNC server, but it is best to specify one to prevent any potential conflict with the main X display, which is normally 0.
Starting VNC
To start the VNC server, enter
where number
is something other than 0. 1 is a good value. Set the DISPLAY
variable to :<number>
in your configuration file or use '-display :<number>'
when starting the Web Server via the webstart
or webboot
script.
If your Web Server application requires MATLAB to render better color than the default, set the depth
argument when you start the VNC server
where <depth
> is either 16 or 24.
Stopping VNC
where number
is the same as that used to start the server.
After stopping the VNC server, it takes about 30 seconds for the socket to time out and clear, so wait a while after stopping the server before restarting it.
![]() | Downloading and Installing Perl | Using VNC with the MATLAB Web Server | ![]() |