Configuring a CAM application without using the Web GUI
I've spent some time playing with configuring CAM applications without the GUI and wanted to share what I've found.
Here is what appears to work for me. This example creates CAM application called CAMstart. This must be performed on the primary FOG server.
NOTE:This does not install the CAM script nor any supporting applications on any of the FOG servers. This merely tells SRSS to launch a particular script when CAM starts. You must install your application launch script and application binaries on each member of the Fail Over Group
$ vi /var/opt/SUNWut/kiosk/config/CAMstart
name="CAMstart"
label="CAMstart"
pathapp="/opt/SUNWwbt/CAMstart.sh"
enable="1"
attribute="0"
$ chmod 777 /var/opt/SUNWut/kiosk/config/CAMstart
$ chown root:utadmin /var/opt/SUNWut/kiosk/config/CAMstart
$ echo CAMstart >> /var/opt/SUNWut/kiosk/useapps
$ /opt/SUNWut/sbin/utkiosk -i kiosk
$ /opt/SUNWut/sbin/utrestart -c
More information follows to help explain why this works......
CAM settings are stored in the Sun Ray Data Store so that they may be retrieved by all members of the FOG.
When SRSS is started after boot or utrestart, /etc/init.d/utsvc exports that information from the DS to flat files in /var/opt/SUNWut/kiosk
The files created from the directory export are:
- availapps - contains a line for each application which has been created but not enabled
- useapps - contains a line for each application which is enabled to launch at session start up
- kiosk.conf - contains all CAM configuration rolled up from availapps, useapps, config dir, and preferences
- config - This is a directory containing one file for each CAM application. These files contain name, mode, binary to start, etc.
- preferences - contains CAM mode settings (Session Action, CPU time, max sizes, etc)
The main point of interest is the config directory.
To add a new application you must create a new file in the config directory named the same as the CAM application name. This file will contain the following lines.
name=""name - is the internal SRSS name of the application. This must be the same name as the file in the config directory
label=""
pathapp=""
enable=""
attribute=""
label - is the label that the application will get in the CAM mouse menu
pathapp - is the executable to launch when this app is started
enable - specifies if the application will be included in a new CAM session
attribute - specifies weather the application is Critical (0), Menu (1), Default (2)
You must then add the application to the useapps file so that the Web GUI will show it
echo CAMstart >> /var/opt/SUNWut/kiosk/useapps
After creating the file in the config directory and adding the application to use apps, the CAM configuration must be imported into the DS.
/opt/SUNWut/sbin/utkiosk -i kiosk
Then restart SRSS
/opt/SUNWut/sbin/utrestart -c

