VNC suggestions wanted: key mappings, copy/paste?

As mentioned elsewhere, I’m running OSXvnc on OSX10.2.8 and connecting from a windows client running XP on a ThinkPad.

One thing that never seems to work for me is the clipboard functionality between client and server. Is there anything I might examine or set to try and get that working?

Also, should I be using any special keyboard settings when I start the server? Occasionally I don’t get key behavior that I’d like (for example, the mac “option” key doesn’t seem to translate from the Windows side).



First, on the clipboard issue, this is actually an Apple security restriction when you connect via SSH to Mac OS X it creates a new “login session”. It essentially treats that as a seperate user (even if you login with the same account). If you set your SECURITYSESSIONID environment variable to be the same as that from the console(logged in) user before launching OSXvnc then you will have pasteboard access.

For More Information Please Read The Following Apple Documentation:

Second, regarding the “Option” key, it is currently mapped to the META key (in X-Windows terminology) unfortunately I don’t know of any windows clients that will send the META key. The most appropriate keys (the WIN key or APP key) don’t appear to be trappable by the Windows clients, so lacking another modifier key we don’t have a particularly appropriate place to put it, we are looking at ways to allow user configured alternatives (eg F12) in the future.

Thanks for the detailed response.

Is there a straightforward way to obtain the OSX session id, so that I can set it as a windows env variable? I’m not finding anything outside of the Securiyt API. :slight_smile:

Another key mapping question: is there a mapping possible for the mac Control key? It would of course be helpful to have a control key when I’m running OSX Terminal over VNC. It seems that VNC protocol should support the Control key, but neither of my windows clients transmits a control as far as I can determine.


The control key should be mapped directly by default, Ctrl on Windows or X-Windows should produce a Control on Mac OS X .

The one caveat is that the mapping that most VNC clients use provides for only a single Ctrl key; in our case we mapped this to the LEFT control key. So if an application is expecting a RIGHT control key it won’t get one.

how about mapping caps lock. sometimes my son hits the caps lock key on the keyboard and i cant login remotely unless my wife comes in and hits cap lock.

Actually, we have mapped CapsLock (it holds down Key#57 when it receives a XK_Caps_Lock character code). Unfortunate, there are two issues:

First, when you hit CapsLock on your local machine it is interercepted by the local computer and we aren’t aware of any VNC clients that will even pass the keystroke.

Second, the “locking” behavior is actually an OS function that is tied into the hardware and (at least on OS X) does not appear to be something that can be controlled by simulating the keystrokes.

If anyone finds any interesting notes or technology that would enable OSXvnc to “release” the caps lock we would be happy to encorporated it but for now we don’t see anything more that we can do.