Fixing Printscreen for Sun Ray and Windows
Solaris and Windows use different key codes for the print screen function. This can cause problems when connecting to a Windows Terminal Server from a Sun Ray and expecting the Printscreen and Alt+Printscreen functions to work properly.
For those who aren't aware, in Windows when you do a PrintScreen, you copy a graphic image of the entire desktop into the clipboard where it can then be pasted into a graphic program, word processor, etc. Alt+Printscreen does the same thing, but instead of capturing the whole desktop it only captures the active window. Just don't expect anything to come out your printer (names witheld of those who thought that it would actually print to protect the guilty).
Now if you try these keystrokes from a Sun Ray (or Solaris PC) when connected to a windows desktop via Citrix, those keystrokes will appear to do nothing. RDesktop 1.4.1 and the Sun Ray Connector work fine. The actual real fix if you use a Sun Keyboard with a Sun Ray is to configure Citrix to use a Sun Type 6 USB Keyboard.
Since not all users use a Sun Keyboard, the easy fix is to remap the key code prior to making the connection to windows via Citrix (or older versions of Rdesktop). I've also used the xset function to turn on the numlock key, something many windows users are used to since that is the default on almost all personal computers.
Here is an example using rdesktop:
#!/bin/sh
# Fix alt+printscreen
/usr/openwin/bin/xmodmap -e 'keycode 77 = 0xff61'
# Turn numlock on
/usr/openwin/bin/xset led 1
# Launch rdesktop
/opt/SUNWrdp/bin/rdesktop -a 24 -r sound -f 192.168.8.56


I tried to do this in the vda script located in /opt/SUNwkio/sessions/vda. This didn't work for me. Is there somewhere else that I might have to make a change to get print screen and the num lock key to work on an XP session running over a Sun Ray?
Posted by Jim Maloney on July 25, 2008 at 05:44 AM PDT #
Same problem here with Sun Ray 2's and Sun Type7 keyboards.
Nothing alters the mapping of the PRINTSCREEN key. It's sends WAKE rather than PRINT.
We escalated this with Sun support with no result. Anyone that sees this post, TAKE HEED! Sun Ray 2's don't send the correct sequence and cannot be configured to do so.
Posted by Simon on August 26, 2008 at 04:46 PM PDT #
We had this same issue and none of the above helped. We had some assistance from a contact within Sun and we have now fixed this issue.
1. Ensure that you are running firmware version 4.1_50,REV=2008.09.25.12.37
2. Ensure that you are running uttsc version 2.1_25
3. Run command /opt/SUNWut/bin/utxconfig -k off -a
Hope this works for you too.
Posted by Brendan Newell on February 06, 2009 at 01:38 AM PST #