Thursday Mar 01, 2007

Sun Ray Remote Control Cookbook version .01

UPDATE:  This cookbook has been renamed to the Sun Ray Remote Control Toolkit is now being maintained on the Sun Ray Wiki.

 

The following is a very simple example of using x11vnc to remote control or "shadow" a Sun Ray Session.  A few important caveats:

1) This is not supported by Sun.  Use at your own risk.

2) It is not secure and only relies on a plain text passwords.  I will work on enhancing this as well as bringing in new features of the newest version of x11vnc

3) You cannot remote control a disconnected session if you are using xscreensaver.  You can change your default screensaver to be xlock via SUN_SUNRAY_UTXLOCK_PREF, but that is quite ugly.  With the newer version of x11vnc, I will add the workaround for killing xscreensaver once an authenticated vnc connection is made.

4) For convenience I'm using packages from SunFreeware.com.  Most of these libraries are available on S10, but this version of x11vnc was compiled against the libraries from SunFreeware.  When I build the next version, I'll use what's in S10 and Nevada. 

5) This is only for Solaris, but should work just fine with Linux assuming you have x11vnc running correctly and the startup file is located in /etc/X11/xinit/xinitrc.d

6) Read the x11vnc Sun Ray page, especially the shared memory issues.  I've included the shm_clear script in the sbin directory of my sample scripts. 

With those caveats understood and out of the way, let's proceed. 

Install Required Packages 

First we have some installing to do.  We need to install x11vnc, and some libraries.

Solaris/SPARC
x11vnc
zlib
jpeg
libgcc

Solaris/x86-64
x11vnc
zlib
jpeg
libgcc

After you've downloaded the above and unzipped them, you'll run pkgadd -d ./pkgname  for each one.  Accept all the default locations.

Get the Sample Scripts

Grab, unzip, and extract the SUNWutRC sample scripts

This will create a directory called /opt/SUNWutRC

Non-CAM Use
1) Create a Startup file (Make sure that you make the perms 755)

Solaris

Create /usr/dt/config/Xsession.d/0101.SUNWut

Contents should look like this:

#!/bin/sh
/opt/SUNWutRC/RemoteControl &

Linux

Create /etc/X11/xinit/xinitrc.d/0101.SUNWut

Contents should look like this:

#!/bin/sh
/opt/SUNWutRC/RemoteControl &

CAM Use

1) Don't create the start up file, rather have your CAM script call "/opt/SUNWutRC/RemoteControl &"

Both CAM and Non-CAM

2) Edit /opt/SUNWutRC/shared/passwd.  The first line is the full control password, the second line is the view only password.

3) Start a new session from a Sun Ray.

Remote Controlling the Session

You can now remote control the session via two methods, a vncviewer or a web browser.

Do NOT remote control your session from the same Sun Ray.  You've been warned....

Connection information for each user (VNC Port or HTTP Port) lives in /tmp/SUNWutRC/$USER.settings.vnc

Note that if you "more" the file with Gnome Terminal, you can actually right click on the URL link and connect.
 

To Do:

Serve up /tmp/SUNWutRC contents in a protected web page so that files can be clicked on to launch the remote control

More security

Integrate x11vnc version .8.x or greater to allow more features (specifically the xscreensaver kill and relaunch scripts)

Detect large screen sizes (i.e. Xinernama enabled MH groups) and scale them automatically

Integrate tightvnc file sharing

Reduce the color depth

Experiment with shm saving tips

On demand launcher with user supplied password.

Donate some $$$ to Karl Runge
 

About

Think Thin is a collection of bloggers that work with Oracle's Virtual Desktop portfolio of products.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today