Creating a kiosk app with JavaFX, Sun Ray, Solaris and yeah some middleware...

I set out to see how easy or doable it would be to create a kiosk system that could be used in a Minority Report type of display. Let me state this experiment is in its very very non-Minority Report stage. The first stage of this experiment was simply to create a display mechanism that could be used to broadcast images using Thin Client technology.

So I chose to create a JavaFX application that would talk to Rest based server I set up. Using JSON the JavaFX application would retrieve data to display on the thin client screen. Not to taxing but a good learning experiment.

So what did I learn. JavaFX is a great mechanism for doing this type of display. Sun Ray is a good platform for displaying the information. Note that the as the level of interactivity goes up (aka moving graphics) things can get interesting.

Additionally I learned that a JavaFX application can easily be started from the command line and integrated into a Sun Ray startup script. Hear is my sample script.

#1 /usr/openwin/bin/xset -dpms s off

#2 unclutter -root &

#3 cp /jfx/.javafx_eula_accepted $HOME/.

#4 cp /jfx/.javafx_ping_sent $HOME/.

#4 cd /jfx

#6 javafx -cp JavaFXApplication1.jar javafxapplication1.Main

Not the most complex or proper start script ever written but it got the job done. First thing you will notice is line #1. I used the xset command to disable the power management and screen saver options. This is non starter for a kiosk display. It must never be blank. Also with no mouse or keyboard attached to the Sun Ray you cannot wake it up.

Line 2 is the unclutter command. You can download and compile from http://www.filibeto.org/pipermail/sunray-users/2010-January/014592.html. Unclutter will hide the cursor if it detects no activity in a given period of time. Sucks seeing that big ole cursor sitting on the screen with no mouse to move it.

Lines 3/4 are needed because the kiosk mode of Sun Ray cleans the user directory (rightfully so) when the session is ends. Well JavaFX will ask the user to accept the usage terms every time it starts and does not find the two files in the users home directory. No keyboard or mouse equal headache.

Finally the line (#6) to start the JavaFX application. Use the properties tab in Netbeans to get the correct name for the Main entry point.

That is it not to bad overall for a simple display. Now to crank it up to see how far it will go before it breaks.

Comments:

This post was very helpful for me to look at the big picture. I often get lost in the small details and forget about the long-term plan. Thank You for sharing this very informative article. http://www.pctechoutlet.com

Posted by Cheap Computers on February 12, 2010 at 05:48 AM EST #

Sounds like what we're looking to do for a new building. Could you tell us how to get accelerated video on this setup? We'd likely use H.264 video, preferably at a larger resolution. Yes, we have Sun Rays 2FS as well as plain old 2s.

Thanks,
Charles

Posted by Charles Soto on February 19, 2010 at 12:19 AM EST #

We are on the same page. I am going to try this next. I do not know how well it will do. I understand the next gen SunRay will improve upon the current technology in this area. Have not seen this on either one to make an educated statement.

Posted by Leroy Kelley on February 23, 2010 at 02:44 AM EST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

leroyk

Search

Categories
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