Monday Feb 08, 2010

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.

Sunday May 13, 2007

What a week...

Well made it back home from JavaOne and the Java Ambassedors meeting. I have been on the road for two weeks. Nice to see the tumble weeds er dust bunnys did not get lonely. JavaOne was great as was the preceeding CommunityOne. Also got to add the I returned on my most favorite plane. The 767. I know, you are saying dates back to the 80's. Well there is something to say about a 2-3-2 configuration in coach. The odds of getting a prisoner seat are worse than winning the lottery. That alone makes it my favorite for comfort.
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