Difference between revisions of "Kiosk mode"

From Jmol
Jump to navigation Jump to search
(version needed)
(Scripting the kiosk)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
''Note: you need Jmol 12.2.RC8 or later to use this feature (that means 12.2.0 or later when it is released)''.
+
''Note: you need Jmol 12.2.0 or later to use this feature''.
  
The Jmol application can be run in "kiosk mode", useful for dedicated displays (e.g. in public places) where hiding the remaining of the computer screen, menus, windows etc. is desirable. The display will normally be driven by a prepared script, but the pop-up menu is still available by default.
+
The Jmol application can be run in "kiosk mode", useful for dedicated displays (e.g. in public places) where hiding the remaining of the computer screen, menus, windows etc. is desirable. Display of the models will normally be driven by a prepared script, but the pop-up menu is still available by default.
  
 
[[File:KioskJmol.png]]
 
[[File:KioskJmol.png]]
  
While the focus is on the Jmol panel, typing <code>exitjmol</code> (which is not echoed to screen) and pressing the Enter key will exit the application.
+
While the focus is on the Jmol panel, typing <code>exitJmol</code> (which is not echoed to screen) and pressing the Enter key will exit the application.
 +
 
 +
[[Jmol_Application#Interface|How to run Jmol in kiosk mode]]
 +
 
 +
 
 +
=== Scripting the kiosk ===
 +
''(The following are preliminary notes that need further ellaboration)''
 +
 
 +
You can include a script that loads a model and acts on it in the command line that opens the kiosk app.
 +
Examples:
 +
Jmol.jar "example.pdb" -k
 +
Jmol.jar "example.pdb" -j "spacefill off" -k
 +
Jmol.jar "example.pdb" -s "example.spt" -k
 +
 
 +
There are also mechanisms implemented to have some other program driving Jmol and the banner area by means of JSON commands.
 +
 
 +
To customize the banner, this script may be used:
 +
sync -3456 '{"type":"banner","text":"mytext"}'
 +
which would set up the kiosk as a server over port 3456 and send a JSON message to itself.
 +
sync -3456 STOP
 +
would turn off that service.
 +
 
 +
Other possible actions:
 +
sync -3456 '{"type":"banner","mode":"OFF"}'
 +
sets a kiosk with no banner.
 +
sync -3456 '{"type":"banner","mode":"ON"}'
 +
displays the banner (default).

Latest revision as of 15:54, 1 October 2011

Note: you need Jmol 12.2.0 or later to use this feature.

The Jmol application can be run in "kiosk mode", useful for dedicated displays (e.g. in public places) where hiding the remaining of the computer screen, menus, windows etc. is desirable. Display of the models will normally be driven by a prepared script, but the pop-up menu is still available by default.

KioskJmol.png

While the focus is on the Jmol panel, typing exitJmol (which is not echoed to screen) and pressing the Enter key will exit the application.

How to run Jmol in kiosk mode


Scripting the kiosk

(The following are preliminary notes that need further ellaboration)

You can include a script that loads a model and acts on it in the command line that opens the kiosk app. Examples:

Jmol.jar "example.pdb" -k
Jmol.jar "example.pdb" -j "spacefill off" -k
Jmol.jar "example.pdb" -s "example.spt" -k

There are also mechanisms implemented to have some other program driving Jmol and the banner area by means of JSON commands.

To customize the banner, this script may be used:

sync -3456 '{"type":"banner","text":"mytext"}'

which would set up the kiosk as a server over port 3456 and send a JSON message to itself.

sync -3456 STOP

would turn off that service.

Other possible actions:

sync -3456 '{"type":"banner","mode":"OFF"}'

sets a kiosk with no banner.

sync -3456 '{"type":"banner","mode":"ON"}'

displays the banner (default).

Contributors

AngelHerraez