![]() |
![]() |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
![]() |
MacVNC - VNC server for MacintoshBeta 2 - 7/ 6/99Alpha 1 .1- 25/1/99 Alpha 1 -16/7/98 . Use of the Mac server should be straightforward if you are familiar with the concepts behind VNC, and have a suitable VNC viewer running on another machine. Read 'What is VNC?' and 'Getting Started' if you haven't already done so - they'll give you a good overview, despite being Unix and Windows-orientated. Note. This is a beta release. As with all VNC software, you use at your own risk! We welcome bug fixes/ comments. Requirements:To use the Macintosh VNC server, you will need:
Quick Start
IntroductionThe PatchesThe installation is in three parts, the patches, the server and the control panel. The patches (in a system extension called vncPatches, stored in the ->Extensions folder of the distribution) catch draws to the screen and pass them on to the server. To install these patches you need to put them in the Extensions folder inside your System folder (you can drag the vncPatches extension onto a closed System folder if you want, the Finder will work out where it needs to go). After that you need to restart for the patches to come into effect.The ServerThe actual work horse of the installation is the VNCServer program. Note: even though you've installed the patches, no one will be able to access your machine unless the server is running as well. To automatically have the server run at start up you can put it (or one of its aliases) into the Startup Items sub folder of your system folder. Otherwise, just double click it like any other application.The Control PanelOnce the server is running, you'll need to set the password (the default is none, which means the server will refuse all connections). The server currently supports 3 ways of setting options, via a web browser, the control panel or Apple Script. The easiest and most reliable way is to use the control panel (called VNC Controls). Note: The server needs to be running (or at least have been run) the first time you use the control panel (why?). Also, the control panel may pause for a few seconds (more on over loaded machines) whilst it communicates with the server. If the control panel is put into the Control Panels folder (inside the System Folder), then it will be accessible by selecting the Options menu option from the server.The first two options determine how your screen will be described to clients, the desktop name is what external viewers will see in their title bars, while the display number is what they'll have to add to your host name for them to connect properly (i.e. if you set the server running on machine 123.456.789.789 to have a display number of 0, then viewers can connect by specifying 123.456.789.789:0 or computer.room.place.com:0 as the host name). The display number is NOT normally the TCP/IP port number (see web site for further details). The password box is (surprise, surprise) where you should enter your desired password. Only the first 8 characters will be used in authentication but it is case sensitive (i.e. thispassword is the same as thispassXXX but not the same as THISPASS). Macintoshes have a key (the command key) that most other computers lack, which means that for an external client to send command key events, some sort of key press equivalent needs to be set. The four drop down menus specify which key combination will be used as command. For example, if you wanted your external clients to get command-c by pressing left control + right alt + F3 + c you'd select "L Control", "R Alt", "F3" and "None" from the four menus. Other key presses can be set via the Apple Script interface. The advanced button on the control panel takes you though to a slightly different set of options, which are described more fully on the panel itself. If the VNC server preferences file is locked for any reason, no option settings will be allowed through any of the 3 interfaces. Also the web interface and the Apple Script interface can be disabled by setting the appropriate flags on the Advanced settings page. Once the initial settings have been set, that's it. The server can be stopped by selecting Quit from the file menu or by pressing command- Q. The Web InterfaceAll VNC servers include a web interface, and this one is no different, although does go slightly further. While the server is running, any Java capable web browser can connect to http://<host name>:58xx (where xx is the display number) and will be sent a Java viewer that will then act as the VNC client. The Mac server can also accept option changes through local browsers accessing http://<host name>:58xx/settings.html. There is also way to look at the server's internal logs by looking at http://<host name>:58xx/log.htmlAll the html sent out by the server needs is kept in a directory called Html which should be in the same directory as the VNCServer binary. You can change the look of your server's settings page by changing the contents of this directory. Files ending .tmpl will be put through a template parser before being sent out, so in your customised html you can include things like $HOSTNAME if you want to display your current desktop name. See the included .tmpl files for examples of other variables. You can change where the server looks for its html by changing the HtmlDirectory line in VNC Server preferences (found in the <startup disk>:System Folder:Preferences) or you can include the html/ tmpl files as TEXT resources inside the VNCServer binary. The names of the resources should be the same as the names of the files. Resources are searched before the Html directory. The web interface can be disabled by removing the Html directory or clearing the "Use Http Options" flag on the Advanced screen of the VNC control panel. The Apple Script interfaceThe server can be controlled by Apple Scripts which can be easily written with the Script Editor which comes with every installation of the Mac OS. A sample program is shown below.-- example for communicating with a VNC server tell application "VNCServer" -- set the options to sensible things set password to "password" set display number to 34 set desktop name to "Bob's Computer" set cmd equivalent to "ffe3 ffe9 0000 0000" -- The following is a very esoteric option described more fully below set mouse id to "03045ef2" -- get a table of function use (very uninteresting) get stats -- Clear the previous statistics set stats to 0 end tell cmd equivalentThe command key equivalent press can consist of up to 4 keys and is defined by 4 X key sym values which are passed to the server as a string consisting of four space deliminated, un prefixed, four digit hexadecimal numbers (got that?). Seeing as most users are not going to know (or care) what an X key sym is, the control panel includes a way of easily setting this combination via four drop down menus. People who are quite happy with a ctrl/ alt/ shift etc. style key press can use the control panel while others can set what ever key press they like via this Apple Script command.mouse idThe mouse id option is for people with more than one mouse on their bus who don't want to use the first one as the captured pointing device (for whatever reason). By default, the first pointing device encountered by the CursorDevice manager is the one that is controlled by clients. However, if you want the clients to control the second one, then you're going to have to find out the device ID of the second mouse and pass it to the the server via the mouse id command. The parameter is a string containing the device ID in hexadecimal with no leading characters. Very very few people are going to need this.Question IndexHow Do I ... ... stop other users changing
the settings once I have set them?
Why ... ... does my machine keep
crashing?
How Do I....Q. ... stop other users changing the settings once I have set them?A. Make the preferences file (which is called VNC Server preferences nd should be in the Preferences file inside the System Folder) read only.Q. ... use my command key from other machines?A. The modifiers that correspond to command can be set via the settings page or via Apple Script. The default is Left Alt and Left Control. So L Alt+ L Control + c is the same as command + c. Note: The command key is the one next to the space bar with a propeller symbol or an Apple symbol on it. Up to four modifiers can be chosen and are described
by thier X keysym values. See keysyms.h in the source distribution for
more details of X keysyms. The default settings page has drop down menus
to choose from a number of common modifiers. To add more modiifers to these
menus put more <option value="0xNNNN">Key name</option> lines in
the settings.tmpl file in the Html directory.
tell application "VNCserver"
The string is four 4 digit hexadecimal numbers describing the modifiers requested. (ffe3 ffe9 correspond to the default L Alt + L Control). Note: Setting the modifiers to anything strange will produce
"Current Modifiers: unknown" on the settings page. Do not panic. This just
means that the server doesn't know how to describe the keysyms you've given
it. They will still work, it's just the server doesn't have name for them.
Q. ... customise my settings/ logs / initial page?A. The HTTP server look at the following places for HTTP files:
Also, the server will transform certain filenames under cetain conditions:
The <X> in the last two files is an ascii character from 0 onwards
that describes which log number you want.
Most of the html files served are passed through a template parser before
being sent to the client. The template parser translates some tokens into
useful information:
Settings can be changed by sending a POST event to the server, via a
an HTML form.
In response to a POST event (usually sent from the settings page) the server returns changed.tmpl unless the password was incorrectly set in which case passwrong.tmpl is sent. Q. ... paste into my Mac from another machine?A. The short answer is "You can't". The longer answer is "You can't because of the slightly odd way the Mac handles clipboards". This problem is being currently being investigated. Pasting from the Mac to other machine should work.Q. ... communicate with the developers?A. We run a VNC mailing list run that has a pretty large membership list and is read by all the VNC developers (not just the Mac one), so any questions you have can probably be answered by posting to this list. To join the list go here. Note that asking questions which are answered in this document or in the FAQ is a Bad Idea.Why?..Q. ... does my machine keep crashing?A. VNCServer, in its fastest mode, breaks a general guideline in that it patches ShowCursor (which has to be interrupt time safe) with some code that isn't interrupt safe. This may sometimes cause bad things to happen. If this is happening to you, you can switch to an interrupt-safe version of ShowCursor by changing the "Use Error prone updates" flag in the security resource. See above for details. The downside is that updates that happen when the mouse button is down (like drags and menu operation) may not work so well.As mentioned above, there are also some known problems with the hextile encoding. You should find that the server is more reliable if you switch this off. Q. ... doesn't the File/Options(HTTP).. menu item work?A. The server options are set using a web browser via an HTTP connection. If your machine isn't set up for this already, you need Internet Config to make this work. From the IC faq:Each new release of Internet Config is posted to MacGifts and is therefore available Info-Mac and UMich (and their mirror sites). It is also available from any site that holds Peter Lewis' software, namely AOL, AMUG, PopCo, Australia, Japan, and Switzerland. Q: ... won't the control panel run unless the server has been run at least once before?
Any comments regarding this program should be directed to the VNC
mailing list.
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For comments, feedback, etc, please see the 'Keeping
in touch' page.
|