Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Table of Contents
outlinetrue
indent20px
stylenone
printablefalse

...

7)  it is also recommended that once a firefox profile is established that works correctly in touchscreen mode, and prints barcodes correctly, that a tar file is created of the firefox profile, and that this tar file overwrites the existing firefox profile at startup.  We have seen several instances where the barcode file that is downloaded becomes linked to the wrong application, or the firefox homepage gets reset to something other than the touchscreen interface page in OpenMRS.  By restoring the firefox profile at startup, these errors can be fixed with a simple reboot.   

to create your tar file:  

1. go to touchscreen <<user's home directory>>/.mozilla/firefox

2. read the profiles.ini file to determine the profile folder used by the user when accessing the OpenMRS registration module.  This should be the profile that has the kiosk setup.  Mine was called i2c33y1i.Registration.

3. create the tar file with the command:  tar -cvf /home/<<username>> ./<<firefox profile folder>>.  For me this was tar -cvf /home/user ./i2c33y1i.Registration

4. chmod 777 on the newly created tar file in the user's home directory

5. now sudo to root and create an init.d script, referred to in these instructions as <<firefox reset script name>>, to unpack the tar file and overwrite the firefox profile at startup.  To do this create a text file with a name like 'firefox-reset' in /etc/init.d and chmod 755 on this file.

6. here are the file contents (fill this in with your local settings):

#! /bin/sh -e

tar -xvf /home/<<username>>/<<tarfile name>> --overwrite --absolute-names --preserve-permissions --directory /home/<<username>>/.mozilla/firefox

exit 0 

7. finally, to add the init.d script you've just created to the right run levels, type:   update-rc.d <<firefox reset script name>> defaults

That's it.

If the script doesn't work, or you want to stop running this script at startup, just type update-rc.d -f <<firefox reset script name>> remove

And, note, update-rc.d doesn't expect the path to your firefox reset script.  Just type the name of the file.  update-rc.d already knows to look in /etc/init.d.  

Barcode scanner

Configure scanner for pdf417, and code128

...