Difference between revisions of "CISN Display"

From Stadm
Jump to navigationJump to search
 
(87 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Summary of What we want in the ICSN/WaveForm Display 2008-11-19==
+
[[Category:Projects]]
This project started in the 2007-2008 school year with Mekhin desgining the program itself. He graduated that year and so I have been wokring on it this year. My part hasn't been in the programming, but instead the documentation and physical set-up. The CISN/Waveform Display is a project by NEES which is a subset of ICS. The CISN portion will show near real-time earthquake activity, while the Wavefom display will show real time seismic waves at various location around California.The set up should explain about both the displays, ICS, and possibly NEES. NOTE: It maybe wise to look into using launchd or launchctl for keeping the display running and starting on boot
+
[[Category:CISN]]
 +
==Introduction==
 +
This page will attempt to document the creation of a kiosk type display of the CISN Display.
 +
The CISN Display software displays near real-time earthquake location information available via the network.
 +
A complementary component would be a waveform viewer showing seismograms (in real time) from various locations around
 +
California (or beyond), but we have not had time to mount a concerted effort along those lines yet.
  
 +
==CISN/WaveForm Display==
 +
2008-11-19
 +
This is a revised version of the previous CISN Display installation instructions. Many of the steps were unclear and I have tried to go through and edit them to make it a little easier to understand. The CISN/Waveform Display is a project by Earthquake Engineering Group (EEG) (currently funded through NEES) which is a research group managed by ERI. The CISN portion will show near real-time earthquake locations, while the Wavefom display will show real time seismic waves at various location around California. The set up should explain about both the displays, ICS, and possibly NEES.
 +
2013-05
 +
Revised Again
 +
 +
==Historical Notes==
 +
This documentation project started in the 2007-08 school year.
  
 
This is the [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/OldIndex.html Original documentation] on all all CISN/ Waveform Disply Information<br>
 
This is the [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/OldIndex.html Original documentation] on all all CISN/ Waveform Disply Information<br>
Line 7: Line 20:
  
 
==Current Status of Production==
 
==Current Status of Production==
<b>Current Status Summary 08/11/17</b>
+
<b>Current Status Summary 2008-11-17</b>
  
 
<p><b> Display Stand: </b><font color="green">done</font></p>
 
<p><b> Display Stand: </b><font color="green">done</font></p>
*Can hold one or two screens as neccesary, built by nick webster in the Geology Machine shop. (Document the building!) To see the Documentation of the Display Stand click [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/StandDoc.html this] link.  
+
*Can hold one or two screens as necessary, built by nick webster in the Geology Machine shop. (Document the building!) To see the Documentation of the Display Stand click [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/StandDoc.html this] link.  
  
 
<p><b> CISN Kiosk Mode: </b><font color="green">done</font></p>
 
<p><b> CISN Kiosk Mode: </b><font color="green">done</font></p>
Line 16: Line 29:
  
 
<p><b> Documentation of how to create CISN in Kiosk Mode: </b><font color="green">done</font></p>
 
<p><b> Documentation of how to create CISN in Kiosk Mode: </b><font color="green">done</font></p>
*Mekhin left documentation concerning all he did, but much of it is unclear, especially to those (like me) with little computer experience. I am reading it now, putting it in accesible language, while attempting to install it on the computer, "ruby" NEW: Am working on a shell script to automate quit finder, will also kill dock, works well.
+
*Mekhin left documentation concerning all he did, but much of it is unclear, especially to those (like me) with little computer experience. I am reading it now, putting it in accessible language, while attempting to install it on the computer, "ruby" NEW: Am working on a shell script to automate quit finder, will also kill dock, works well.
 
*The only thing left to do for this is create a launchd script which:
 
*The only thing left to do for this is create a launchd script which:
 
**starts CISN Display running coninuously
 
**starts CISN Display running coninuously
Line 36: Line 49:
 
*joe built us a nice trackpad holder, I need to document it's desgin. it cost about 300 bucks
 
*joe built us a nice trackpad holder, I need to document it's desgin. it cost about 300 bucks
  
==How to Create the CISN/Waveforms Display==
+
==Setting up a CISN Display Kiosk==
You have the option of simply following the directions one at a time, or if you are in the middle of an install, jumping from section to section
+
 
with the links below.
+
 
*[[#1|How to Prepare the MAC]]
+
===Reformat the disk of the Mac and install Leopard OS, disk name: CISN-display===
*[[#2|Set up the Kiosk Account on the MAC]]
+
*Obtain the Leopard install cd's from Aaron
*[[#3|How to install CISN]]
+
*Insert Disk 1 into the desired computer
*[[#4|How to install/ configure Antelope]]
+
*Remember, this will delete any information on this computer, so make sure there is nothing you need on it.
*[[#5|How to configure CISN Display]]
+
*It will bring up a window, click the "install Leopard" icon, then click restart
*[[#6|How to Secure the Firewall]]
+
*Choose English as the main language, then click continue until the select destination page
*[[#7|How to secure the GUI]]
+
*There, click options and select "Erase and Install" and make sure you have the "Format disk as:" section selected as "Mac OS Extended" click continue
*[[#8|Links that could help you]]
+
*On the installation type page select options, select the customize button and click the "X11" icon
 +
*Continue and let it install.
 +
*After install, go to the apple icon in the top left corner and select check for updates, let all the updates install.
 +
*Open System Preferences by clicking the icon on the dock or opening the Finder and looking in the Applications Folder
 +
*Click "Sharing"
 +
*Turn on "Remote Login" and "Remote Management" under the "Service" section by checking the box to their left
 +
*Go back System Preferences main screen, and click on Energy Saver
 +
*Click "Schedule..." in the bottom right corner
 +
*Check the "Start up or Wake" option and set it at Every Day at 7:00AM
 +
*Check the option to "Sleep" on the bottom and set it at Every Day at 10:00PM
 +
 
 +
===Install "Xcode Developer Tools"===
 +
*Xcode is needed because it provides a Property List Editor that simplifies the process of installing CISN Display as a kiosk
 +
*If OS X 10.6 is used to run CISN Display, Xcode must be installed off of a OS X 10.6 installation cd because Apple does not allow the installation of Xcode 4 or higher onto any machine not running above OS X 10.7
 +
*If running above OS X 10.7 Xcode can be downloaded for free off of the Mac App Store
 +
*A default installation of Xcode will suffice to successfully install the Property List Editor
 +
 
 +
===Create three different accounts===
 +
*Open System Preferences and go to "Accounts"
 +
*Create two admin accounts, "Administrator" which you will have Aaron come and make the password, and "cisnadmin" which you should put the password at "1" for now temporarily
 +
*Then create a user account named "cisndisplay"
 +
*I think it is best to do most of the operations via the cisndisplay account, this may take longer due to repeated password typing but it will ensure that cisndisplay has access to all installed things.
 +
 
 +
=== Install the CISN display===
 +
*All of the following should be done under the "cisnadmin" account
 +
*Go online to to the CISN website: http://www.cisn.org/
 +
*Click on the "apply for CISN display" icon on the top left of the website
 +
*Under "User Accounts" you will find a link to "Maintain your account", Click "Maintain your account"
 +
*Username: *********** Password: ***********
 +
*Click "CISN Display client software"
 +
*This program requires Java 1.5 or later, if you haven't updated, click the apple icon in the top left corner of your desktop and click "software update." Install all necessary updates
 +
*Download the Mac OS X version installer by clicking on it
 +
*Once the download is complete open the zip file it downloaded or the installer if your browser unzipped the file
 +
*Start the CISN Display installer
 +
*Keep clicking next, let it install where it wants to, let it put all the files in its default settings.
 +
*Click Done when the installer completes
 +
*Download [[Media: NEES_Display_banner.gif]] as image for a NEES banner
 +
*Go to Finder and search for the folder "banners"(or go to /Applications/CISN_Display/banners), then put the NEES banner in there. (this displays an image of the NEEs banner in the CISN program)
 +
 
 +
===Configure CISN Display to its appropriate settings===
 +
*All of the following should be done under the "cisndisplay" account
 +
*Save the following file [[Media: QWClientConfig.xml]]. Save this to the desktop under the exact name by right clicking(or control clicking) and selecting "Save Linked File as...", It may try to append ".txt" to the end of the file name. Delete that part if it does append or ask you to append and keep the original name
 +
*Open the CISN Display Application by going to the CISN_Display folder inside the Applications Folder and double clicking "QWClient"
 +
*Once the program has loaded, click "File" in the upper left hand corner and select "Load Configuration File", select "QWClientConfig.xml"
 +
*Restart the program when it asks so the new configuration can be loaded
 +
*On Restart you will get an error message , "Unable to connect to server: "Login username/password not valid(on...", it is okay, Quit CISN Display(Command+Q)
 +
*Before you can type in your password you must double check that you are allowed to alter QWClientConfig.xml, it is stored in the directory /Users/cisndisplay/.cisndisplay/conf/client*/QWClientConfig.xml, first start off by moving into the "conf" directory
 +
cd /Users/cisndisplay/.cisndisplay/client*/conf
 +
*the single asterisk in "client*" represent a sequence of numbers that are different for each install, luckily there is only one folder in this directory so it will take us into the appropriate directory ('''assuming''' that this is the first install of cisn display)
 +
*Change the permissions on QWClientConfig.xml so that the user "cisndisplay" can write to the file
 +
sudo chmod 775 QWClientConfig.xml
 +
*Open up CISN display and log in, once successfully connected you may quit CISN Display
 +
*Make a backup Directory for the config file in case it gets compromised, as well as this is where cisnmaster.sh will look for the Backup Configuration
 +
mkdir -p /Users/cisndisplay/Documents/BackupConf
 +
*The following line only works if the current directory is the "conf" folder ("cd /Users/cisndisplay/.cisndisplay/client*/conf")
 +
cp QWClientConfig.xml /Users/cisndisplay/Documents/BackupConf
 +
 
 +
===Installation of the Firewall===
 +
*The following steps for the installation of the firewall should be done from "cisnadmin" account created earlier
 +
*It should be noted that to prevent yourself from be locked out of being able to ssh into the CISN Display computer you must add your machine to the "Trusted Hosts" in the Firewall.sh script
 +
*Copy [[Media: firewall.sh ]] code for the Firewall and [[Media: com.apple.firewall.plist ]] code for the Firewall's startup parameters onto the Desktop by right clicking (or control+clicking) on the links, and selecting "Save Linked File as..."
 +
**If it tries to append".txt" to the end or something. Delete that part and keep the original names
 +
*Open up the "Terminal"
 +
**Note: the following lines of code will only work if you have successfully downloaded the code  above to the desktop
 +
*Then type:
 +
sudo bash
 +
*Enter a password
 +
cp ~/Desktop/firewall.sh /etc/
 +
cp ~/Desktop/com.apple.firewall.plist /Library/LaunchDaemons/
 +
*Then:
 +
chown root:admin /Library/LaunchDaemons/com.apple.firewall.plist
 +
chown root:admin /etc/firewall.sh
 +
chmod 544 /etc/firewall.sh
 +
*Once you restart your computer the firewall should have been loaded on Start Up
 +
*You can check if loaded and see the rules by typing the following into a terminal
 +
sudo ipfw list
 +
 
 +
===Adding the Ability to Quit Finder and Restart Computer===
 +
*Open up a Terminal window, by opening a Finder window and searching Terminal or by looking in the Utilities folder inside the Applications folder
 +
*Typing this line into the terminal adds the ability to Quit the Finder, type:
 +
defaults write com.apple.Finder QuitMenuItem 1
 +
*You may need to restart your computer for the changes to take effect
 +
*Download [[Media: cisnmaster.sh]] shellscript, cisnmaster which will be used to keep the kiosk running, and [[Media: startdisplay.command]] startdisplay shell script.
 +
#!/bin/sh
 +
#temp addition of "startdisplay.command", copy and paste following to text editor and save with .command extension
 +
# Created by Aaron Martin and Nick Webster 2009-03-17
 +
blockfile='/Users/cisndisplay/Desktop/blockfile'
 +
if [ -f $blockfile ]
 +
then
 +
  rm $blockfile
 +
fi
 +
open -a QWClient
 +
sleep 5
 +
osascript -e 'tell application "Finder" to quit'
 +
killall Terminal
 +
*Navigate to your home folder using the Finder and create a Folder named "bin" (should be located at /Users/cisndisplay/bin)
 +
*Copy the files "cisnmaster.sh" and "startDisplay.command" to Users/cisndisplay/bin/
 +
*Open "cisnmaster.sh" in any text editor(textEdit on a Mac will do)
 +
*We are going to change the third line from the top which says "clientID=client*********"
 +
*Without closing the text editor, open up a terminal window and type
 +
cd /Users/cisndisplay/.cisndisplay/; ls
 +
*There should be an output "client*********" where "*********", are random numbers
 +
*Copy the output and replace what clientID equals (no quotations should be added to cisnmaster.sh)
 +
**example. clientID=client111111111
 +
*Now we will need to make cron jobs to continuously run the scripts, first log out and log in as cisnadmin
 +
*Open a terminal (we are about to allow non super users to use the reboot command) type
 +
sudo bash
 +
*It will prompt for a password, enter the "cisnadmin" password
 +
*Then type:
 +
chmod +s /sbin/shutdown
 +
*Followed by:
 +
/sbin/shutdown -r now
 +
*It should simply reboot so you can now sign in as "cisndisplay"
 +
*Once in as "cisndisplay", check you can use the command by opening up a terminal window and typing:
 +
/sbin/shutdown -r now
 +
*Now, make sure that earlier you completed the steps to create the "BackupConf" folder in the "Documents" folder with a copy of QWClientConfig.xml above
 +
 
 +
===Automated Restart of CISN Display using cron===
 +
*Open up the Terminal again (we are going to edit the users cisndisplay cron table to begin cisndisplay every 5 minutes and to restart the computer at night)
 +
*Type:
 +
crontab -e
 +
*Click "a" to be able to write on the first line
 +
*Type the following
 +
*/5 * * * * ~/bin/cisnmaster.sh begin 
 +
*Then press Enter
 +
*On this second line type:
 +
59 23 * * * /sbin/shutdown -r now
 +
*Press enter
 +
*Then click "esc", followed by "Shift+Z" twice
 +
*Now we will edit roots cron table to move the configuration("cisnmaster.sh mvconf") file once every morning and once every night
 +
*in the terminal type
 +
sudo bash
 +
crontab -e
 +
*Click "a" to be able to write the following:
 +
59 7 * * * /Users/cisndisplay/bin/cisnmaster.sh mvconf
 +
57 23 * * * /Users/cisndisplay/bin/cisnmaster.sh mvconf
 +
*Then click "esc", followed by "Shift+Z" twice
 +
cd /Users/cisndisplay/bin
 +
*Then:
 +
./cisnmaster.sh stop
 +
*This will casue the temporary stoppage of cisn trying to consistently boot itself. Know the [[#Usable Controls from CISNMaster to Manipulate Program| cisnmaster commands]]!
 +
*Open "System Preferences", click on the "Accounts" icon
 +
*select login items under cisn-display and select the plus button
 +
*search for bin and select startdisplay.command, this will make the ./cisnmaster rmblock run on start up of the machine
 +
 
 +
===Setting CISN Display to Presentation Mode===
 +
*All of the following should be done under the "cisnadmin" account
 +
*Xcode must be installed for the following instructions to work as they use the Property List Editor
 +
*Go to where CISN is installed(Applications/CISN_Display)
 +
*Right click on the executable icon "QWClient" (the icon which when pressed makes CISN run) and select "Show Package Contents"
 +
*Click on contents, then click on info.plist. (if it does not open in the Property List Editor open the Property List Editor, located /Developer/Applications/Utilities, and open info.plist from that application)
 +
*Click once on the root key called "Information Property List", then click on the arrow to its left and select "Add Child" in the top left corner
 +
*The variables are as follows:
 +
**Key: Application UI Presentation Mode    (Note: Was previously LSUIPresentationMode however it has changed)
 +
**Value: All hidden (if it does not allow you to select "All hidden" type in the Value "3" into the field and it will select "All hidden")
 +
*Save and exit out of the Property List Editor
 +
*I am unclear how to do this via the conf file so for now it can be done manually, but you need to launch cisndisplay
 +
*go to settings, then display, then at the reset view option enter 60 seconds
 +
*simply exit out of the program without saving.
 +
 
 +
==Configuring a system as a waveform display==
 +
===Install Antelope===
 +
The setup of the waveform viewer we envision will require installing Antelope software (http://www.brtt.com/software.html) to access
 +
potential data streams.
  
<ol>
 
<div id="1"></div>
 
<li>Reformat the disk of the Mac and install Tiger OS, disk name: CISN-display</li>
 
<ol>
 
<li>Obtain the tiger instal cd's from Aaron</li>
 
<li>Insert Disk 1 into the desired computer</li>
 
<li>Remember, this will delete any information on this computer, so make sure there is nothing you need on it.</li>
 
<li>It will bring up a window, click the "install Tiger" icon, then click restart</li>
 
<li>Choose english as the main language, then click continue until the select destination page</li>
 
<li>there, click options and select "Erase and Install" and make sure you have the "Format disk as:" section selected as "Mac OS Exteneded" click continue</li>
 
<li>On the installation type page select options, select the customize button and click the "X11" icon</li>
 
<li>Continue and let it install.</li>
 
<li>After install, go to the apple icon in the top left corner and select check for updates, let all the updates install.</li>
 
<li>Go to the finder, search and find system preferences</li>
 
<li>Click "sharing"</li>
 
<li>turn on "remote login" and turn on "remote Managment" under the "services" section</li>
 
<li>go back to the system preferences main screen, click on energy saver</li>
 
<li>Click schedule in the bottom right corner</li>
 
<li>Check the start and wake up time and set it at every day at 7:00AM</li>
 
<li>Set the option to sleep on bottom set and check it. Set at everyday at 10:00PM</li>
 
</ol>
 
<li>Install "X-code Developer Tools"</li>
 
<ol><li>Ask Aaron to bring in X Code-Developer tools from off the server, its not on the install disk, at least the one he gave me (4/3/2009)</li></ol>
 
<div id="2"></div>
 
<li>Here we must set up three different accounts</li>
 
<ol>
 
<li>create two admin accounts, "Administrator" which you will have Aaron come and make the password, and "cisnadmin" which you should put the password at "1" for now</li>
 
<li>then create a user account named "cisndisplay"</li>
 
<li>I think it is best to do all operations via the cisndisplay account, this may take longer due to repeated password typing but it will ensure that cisndisplay has access to all installed things.</li>
 
</ol>
 
<div id="3"></div>
 
<li>Go online to the [http://www.cisn.org/ CISN website] and install the CISN display</li>
 
<ol>
 
<li>click on the Cisn display icon on the top left area</li>
 
<li>Click "Mantain your Account"</li>
 
<li>Username: *********** Password: ***********</li>
 
<li>Click "Cisn display client software"</li>
 
<li>under installation options click, "interactive cross-platform installer programs"</li>
 
<li>the program requires java 1.4 or later, therefore click the apple icon in the top left corner of your desktop and click "software update." Insall all neccesary updates</li>
 
<li>download the MAC version by clicking on it, dragging from the download menu to the desktop, then double click on it. (if it requests applet approval click "trust")</li>
 
<li>Keep clicking next, let it install where it wants to, let it put all the files on its default settings.</li>
 
<li>exit the program</li>
 
<li>download [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/NEES_Display_banner.gif this] image for a NEES banner</li>
 
<li>go to finder and search for the folder "banners", then put the nees banner in there. (this displays an image of the nees banner in the cisn program)</li>
 
</ol>
 
<div id="4"></div>
 
<li>Next go Install Antelope. It isn't essential to do this now, but the system will start to get configured with the Fruitmenu, etc., so its best to Install Antelope now</li>
 
 
<ol>
 
<ol>
 
<li>Put in the Antelope Disc and click its image when it appears on the Desktop</li>
 
<li>Put in the Antelope Disc and click its image when it appears on the Desktop</li>
Line 101: Line 230:
 
<li>Continue through, select "full distribution" when the option arises</li>
 
<li>Continue through, select "full distribution" when the option arises</li>
 
<li>Install all unapplied patches</li>
 
<li>Install all unapplied patches</li>
<li>Set up defualt values for the network
+
<li>Set up default values for the network
 
*Seed Net: SB  
 
*Seed Net: SB  
 
*Int: UCSB  
 
*Int: UCSB  
Line 109: Line 238:
 
<li>Stick license in ..WHERE? ASK AARON</li>
 
<li>Stick license in ..WHERE? ASK AARON</li>
 
</ol>
 
</ol>
<li>Setting up launchd so it runs the CISN display (NOTE: This is now unneccesary as we restart it with a cron job. The code is commented out for this but still in the file accesible via jedit)</li>
+
 
<div id="5"></div>
+
==References/Related==
<li>Configure CISN Display to its appropriate settings</li>
+
Here are some potentially useful links Mehkin suggested if you get stuck...
<ol>
+
*https://developer.apple.com/library/mac/#technotes/tn2062/_index.html - Apple's Kiosk Setup Info Page
<li>Here is the [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/QWClientConfig.xml config file]. Save this to the desktop under the exact name (make sure it doesnt have ".xml.txt" or something)</li>
+
*https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html - MacOSX man page launchd commands
<li>then use the finder to open the folder "conf" and delete the old conf file, then put in the new one from the desktop.</li>
+
*https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/launchd.8.html - MacOSX man page for launchd
<li>Next click on the finder and selcet from the top options "new window"</li>
+
*https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/ipfw.8.html - ipfw man page
<li>click on documents in the side panel and create a new folder called insdie it called "BackupConf"</li>
+
*http://oreilly.com/pub/a/mac/2005/03/15/firewall.html?page=1 - ipfw guide
<li>copy and paste a copy of the new conf file into this folder</li>
+
*http://www.ibiblio.org/macsupport/ipfw/ - really good ipfw guide
<li>Go to where CISN is installed</li>
+
*http://www.macworld.com/article/55321/2007/02/hidemenubar.html - How to hide the top menu and dock] Use the property editor list method and set LSUIP to 3  
<li>right click on the executable icon (the icon which when pressed makes CISN run) and select "show package contents"</li>
+
*https://developer.apple.com/library/mac/#technotes/tn2062/_index.html - more awesome kiosk ui stuff Really good stuff.  
<li>click on contents, then click on info.plist. (it should be opened with the property list editor)</li>
+
*http://macdevcenter.com/pub/a/mac/2003/11/07/scripting_osx.html?page=1 - mac shell scripting
<li>click once on the "root" art, then click on the arrow to its left and select new child in the top right corner</li>
+
*http://www.google.com      -everything else!
<li> here are its variables
 
*name: LSUIPresentationMode
 
*class: number
 
*value: 3</li>
 
<li>exit out of that and save the changes</li>
 
<li>I am unclear how to do this via the conf file so for now it can be done manually, but you need to launch cisndisplay</li>
 
<li>go to settings, then diplay, then at the reset view option enter 60 seconds</li>
 
<li>simply exit out of the program without saving.</li>
 
</ol>
 
<div id="6"></div>
 
<li>Begin Install of the Firewall by copying [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/Firewall this] code for the Firewall and [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/StartupParameters.plist this] code for the Firewall's startup parameters onto the Desktop by right clicking (or control+clicking) on the links, and selecting "Save Linked File as..." It will try to end".txt" to the end or something of that nature, delete that part and keep the orignal names</li>
 
<ol>
 
<li>You need to create a folder, "Firewall", inside the StartupItems folder. To do this...</li>
 
<li>Open up the "Terminal" Icon on the bottom menu</li>
 
<li>Type " sudo bash ", then enter the admin password</li>
 
<li>Type " sudo mkdir /Library/StartupItems/Firewall "</li>
 
<li>Go to /Library/StartupItems/Firewall and put the two files you downloaded ("Firewall" and "StartupParameters.plist") earlier into this</li>
 
<li>Type " sudo chown -R root:wheel /Library/StartupItems/Firewall"</li>
 
<li>Type " chown 0:0 $fwdir/* "</li>
 
<li>Type " chmod ug+x $fwdir/Firewall "</li>
 
<li>Type " $fwdir/Firewall " this should start the firewall and show a whole bunch on new info</li>
 
</ol>
 
<div id="7"></div>
 
<li>Here we will secure the GUI by installing the Fruitmenu and having it run forever.</li>
 
<ol>
 
<li>go to the [http://unsanity.com/haxies/fruitmenu fruitmenu website] and download it.</li>
 
<li>we already have a license so you dont need to buy, just download. it didnt even ask me for the info, but just in case.....</li>
 
<li>go through and let it install where it wants, only install what they say is neccesary (not that crash thing).</li>
 
<li>once installed go to "system preferences" (You can find this with finder) and click on the fruitmenu icon which should be in the lower left</li>
 
<li>once in go to the applemenu section and drag everything, except for shutdown, from the left side over to the right. keep the program open!</li>
 
<li>open finder and search for "airport admin utility", drag this from the finder menu to the left box in the applmenu table you were just at, hit apply.</li>
 
<li>now you can exit out of both of those and click on the apple icon in the very top left to make sure what we did worked</li>
 
<li>**we are killing the finder here** write," defaults write com.apple.Finder QuitMenuItem 1 "</li>
 
<li>downlad [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/cisnmaster this] shellscript, cisnmaster which will be used to keep the kisok running, and [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/startdisplay.command this] startdisplay shell script. use the finder to put them in the "bin" file.</li>
 
<li>If you wish to know more about the contents of the file, click here to learn the Specifics of how it works</li>
 
<li>Now we will need to make cron jobs to continuely run the scripts, first log out and log in as cisnadmin</li>
 
<li>open a terminal (we are about to allow non super users to use the reboot command) type "sudo bash" it will prompt for password probably</li>
 
<li>then type "chmod +s /sbin/shutdown" then type "/sbin/shutdown", and it should simply reboot so u can now sign in as cisndisplay</li>
 
<li>once in as cisn display and use the finder and open up the terminal window, try the "sbuin/shutdown" command again ( to make sure it works)</li>
 
<li>now , download the [http://support.crustal.ucsb.edu/stadm/projects/CISN-Display/QWClientConfig.xml cisn config file] to your desktop again so we can make a back which copies itself in the config file every night, create a folder under documents entitled called "BackupConf" and put it in here Back</li>
 
<li>then go open the terminal again</li>
 
<li>type "crontab -e"
 
hit "a" to be able to write one the first line type "*/5 * * * * ~/bin/cisnmsater begin" then press enter
 
on this second line type "58 23 * * * ~/bin/cisnnaster mvconf" then press enter
 
on this third line type "59 23 * * * /sbin/shutdown -r now" then press enter</li>
 
<li>then click esc, followed by "shift+z" twice</li>
 
<li>in the terminal type "cd bin" enter, "./cisnmaster stop" enter. This will casue the temporary stoppage of cisn trying to consistently boot itself. Know the [[#Usable Controls from CISNMaster to Manipulate Program| cisnmaster commands]]!</li>
 
<li>exit out of the terminal and click on the CISN-Disply icon which contols the computer and is located on the desktop</li>
 
<li>right click on the applications icon and selcet get info</li>
 
<li>scroll down to the "owners and permission section" and change the owner to cisnadmin, you will need to use the password which is now "1"</li>
 
<li>now open up the applications folder and try to delete the chess game or something unimportant, it should ask permission. Now we know it works!</li>
 
<li>use the finder to open system preferences, click on the accounts icon</li>
 
<li>select login items under cisn-display and select the plus button</li>
 
<li>search for bin and select startdisplay.command, this will make the ./cisnmaster rmblock run on start up of the machine</li>
 
<li>sign in as cisnadmin and change the password to....... you and Aaron decide, dont post it here! write it down in office somewhere</li>
 
<li>I think you're all set now! lets learn how to run this computer from another computer via remote connection</li>
 
</ol>
 
<div id="8"></div>
 
<li>Here are some potentially useful links Mehkin suggested if you get stuck...</li>
 
*This is the Original documentation on all all CISN/ Waveform Disply Information
 
*This is Mehkin's Original hand written notebook about his work on the project
 
*[https://developer.apple.com/library/mac/#technotes/tn2062/_index.html Apple's Kiosk Setup Info Page]
 
*[https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html MacOSX man page launchd commands]
 
*[https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/launchd.8.html MacOSX man page for launchd]
 
*[https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/ipfw.8.html ipfw man page]
 
*[http://oreilly.com/pub/a/mac/2005/03/15/firewall.html?page=1 ipfw guide]
 
*[http://www.ibiblio.org/macsupport/ipfw/ really good ipfw guide]
 
*[http://www.macworld.com/article/55321/2007/02/hidemenubar.html How to hide the top menu and dock] Use the property editor list method and set LSUIP to 3  
 
*[https://developer.apple.com/library/mac/#technotes/tn2062/_index.html more awesome kiosk ui stuff] Really good stuff.  
 
*[http://macdevcenter.com/pub/a/mac/2003/11/07/scripting_osx.html?page=1 mac shell scripting]
 
</ol>
 
  
 
==Ideas on Setting up the Trackpad==
 
==Ideas on Setting up the Trackpad==
Line 199: Line 257:
 
==Usable Controls from CISNMaster to Manipulate Program==
 
==Usable Controls from CISNMaster to Manipulate Program==
 
*remember you must have downloaded the commands first and they may not work unless all the directions above have been followed.
 
*remember you must have downloaded the commands first and they may not work unless all the directions above have been followed.
<ol>
+
*Find out the name of your machine from aaron, the current one is "ruby" so I will use ruby here in the examples.
<li>Find out the name of your machine from aaron, the current one is "ruby" so I will use ruby here in the examples.</li>
+
*open the terminal on your own computer and type "ssh cisndisplay@ruby.crustal.ucsb.edu" it will ask for the cisndisplay password, type 'er in!
<li>open the terminal on your own computer and type "ssh cisndisplay@ruby.crustal.ucsb.edu" it will ask for the cisndispaly password, type 'er in!</li>
+
cd bin
<li>type "cd bin"</li>
+
./cisnmaster   # follwed by a space and then any of these sub-commands
<li>type "./cisnmaster" follwed by a space and then any of these commands
+
begin # kills finder and starts cisn display in kiosk mode
*begin = kills finder and starts cisn dispaly in kiosk mode
+
mvconf # deletes the current file in the conf folder and replaces it with our back up one in which is located in Documents/BackupConf, just in case its been compromised
*mvconf = deletes the current file in the conf folder and replaces it with our back up one in which is located in Documents/BackupConf, just in case its been compromised
+
sdwn # shuts down the computer and restarts it
*sdwn = shuts down the computer and restarts it
+
stop # stops cronjob from restarting cisn every five minutes via file called "blockfile" which is placed on the desktop, will automatically undo itself in one hour. to manually restart the dispaly use "rmblock" disscussed below
*stop = stops cronjob from restarting cisn every five minutes via file called "blockfile" which is placed on the desktop, will automatically undo itself in one hour. to manually restart the dispaly use "rmblock" disscussed below
+
rmblock # manually gets ride of the blockfile and allows the "begin" command to restart cisn every minute. Also starts up
*rmblock = manually gets ride of the blockfile and allows the "begin" command to restart cisn every minute. Also starts up
 
</ol>
 

Latest revision as of 12:52, 9 July 2013

Introduction

This page will attempt to document the creation of a kiosk type display of the CISN Display. The CISN Display software displays near real-time earthquake location information available via the network. A complementary component would be a waveform viewer showing seismograms (in real time) from various locations around California (or beyond), but we have not had time to mount a concerted effort along those lines yet.

CISN/WaveForm Display

2008-11-19 This is a revised version of the previous CISN Display installation instructions. Many of the steps were unclear and I have tried to go through and edit them to make it a little easier to understand. The CISN/Waveform Display is a project by Earthquake Engineering Group (EEG) (currently funded through NEES) which is a research group managed by ERI. The CISN portion will show near real-time earthquake locations, while the Wavefom display will show real time seismic waves at various location around California. The set up should explain about both the displays, ICS, and possibly NEES. 2013-05 Revised Again

Historical Notes

This documentation project started in the 2007-08 school year.

This is the Original documentation on all all CISN/ Waveform Disply Information
This is Mehkin's Original hand written notebook about his work on the project

Current Status of Production

Current Status Summary 2008-11-17

Display Stand: done

  • Can hold one or two screens as necessary, built by nick webster in the Geology Machine shop. (Document the building!) To see the Documentation of the Display Stand click this link.

CISN Kiosk Mode: done

  • Mekhin did this (mostly) but I had to do some refining

Documentation of how to create CISN in Kiosk Mode: done

  • Mekhin left documentation concerning all he did, but much of it is unclear, especially to those (like me) with little computer experience. I am reading it now, putting it in accessible language, while attempting to install it on the computer, "ruby" NEW: Am working on a shell script to automate quit finder, will also kill dock, works well.
  • The only thing left to do for this is create a launchd script which:
    • starts CISN Display running coninuously
    • Kills finder while! CISN is loading (otherwise it doesnt stay dead)
    • restarts the dispaly every night to make sure windows aren't screwed up

Waveform Display Program: undone

  • We need to meet with Jamie and see how antelope works
  • Some questions/concerns
    • How do we lock users out of messing with the controls
    • We need to document its install process
    • Ask Aaron where to put in the

CISN/WAVEFORM Display (Physically): undone BUT the Temps is up

  • I have designed a layout to go around the screen which contains information about the Kiosk. However, this must be approved by Jamie, and he must provide me with the information to insert. I have completed many of the info sections, I emailed Jamie and I need to get info on the UCSB Eq site, the Northridge EQ site and the program antelope so I can write thier blurbs.

Touchpad for the Kiosk: done

  • indent we have a nice touchpad mouse, but we have to...
  • joe built us a nice trackpad holder, I need to document it's desgin. it cost about 300 bucks

Setting up a CISN Display Kiosk

Reformat the disk of the Mac and install Leopard OS, disk name: CISN-display

  • Obtain the Leopard install cd's from Aaron
  • Insert Disk 1 into the desired computer
  • Remember, this will delete any information on this computer, so make sure there is nothing you need on it.
  • It will bring up a window, click the "install Leopard" icon, then click restart
  • Choose English as the main language, then click continue until the select destination page
  • There, click options and select "Erase and Install" and make sure you have the "Format disk as:" section selected as "Mac OS Extended" click continue
  • On the installation type page select options, select the customize button and click the "X11" icon
  • Continue and let it install.
  • After install, go to the apple icon in the top left corner and select check for updates, let all the updates install.
  • Open System Preferences by clicking the icon on the dock or opening the Finder and looking in the Applications Folder
  • Click "Sharing"
  • Turn on "Remote Login" and "Remote Management" under the "Service" section by checking the box to their left
  • Go back System Preferences main screen, and click on Energy Saver
  • Click "Schedule..." in the bottom right corner
  • Check the "Start up or Wake" option and set it at Every Day at 7:00AM
  • Check the option to "Sleep" on the bottom and set it at Every Day at 10:00PM

Install "Xcode Developer Tools"

  • Xcode is needed because it provides a Property List Editor that simplifies the process of installing CISN Display as a kiosk
  • If OS X 10.6 is used to run CISN Display, Xcode must be installed off of a OS X 10.6 installation cd because Apple does not allow the installation of Xcode 4 or higher onto any machine not running above OS X 10.7
  • If running above OS X 10.7 Xcode can be downloaded for free off of the Mac App Store
  • A default installation of Xcode will suffice to successfully install the Property List Editor

Create three different accounts

  • Open System Preferences and go to "Accounts"
  • Create two admin accounts, "Administrator" which you will have Aaron come and make the password, and "cisnadmin" which you should put the password at "1" for now temporarily
  • Then create a user account named "cisndisplay"
  • I think it is best to do most of the operations via the cisndisplay account, this may take longer due to repeated password typing but it will ensure that cisndisplay has access to all installed things.

Install the CISN display

  • All of the following should be done under the "cisnadmin" account
  • Go online to to the CISN website: http://www.cisn.org/
  • Click on the "apply for CISN display" icon on the top left of the website
  • Under "User Accounts" you will find a link to "Maintain your account", Click "Maintain your account"
  • Username: *********** Password: ***********
  • Click "CISN Display client software"
  • This program requires Java 1.5 or later, if you haven't updated, click the apple icon in the top left corner of your desktop and click "software update." Install all necessary updates
  • Download the Mac OS X version installer by clicking on it
  • Once the download is complete open the zip file it downloaded or the installer if your browser unzipped the file
  • Start the CISN Display installer
  • Keep clicking next, let it install where it wants to, let it put all the files in its default settings.
  • Click Done when the installer completes
  • Download Media: NEES_Display_banner.gif as image for a NEES banner
  • Go to Finder and search for the folder "banners"(or go to /Applications/CISN_Display/banners), then put the NEES banner in there. (this displays an image of the NEEs banner in the CISN program)

Configure CISN Display to its appropriate settings

  • All of the following should be done under the "cisndisplay" account
  • Save the following file Media: QWClientConfig.xml. Save this to the desktop under the exact name by right clicking(or control clicking) and selecting "Save Linked File as...", It may try to append ".txt" to the end of the file name. Delete that part if it does append or ask you to append and keep the original name
  • Open the CISN Display Application by going to the CISN_Display folder inside the Applications Folder and double clicking "QWClient"
  • Once the program has loaded, click "File" in the upper left hand corner and select "Load Configuration File", select "QWClientConfig.xml"
  • Restart the program when it asks so the new configuration can be loaded
  • On Restart you will get an error message , "Unable to connect to server: "Login username/password not valid(on...", it is okay, Quit CISN Display(Command+Q)
  • Before you can type in your password you must double check that you are allowed to alter QWClientConfig.xml, it is stored in the directory /Users/cisndisplay/.cisndisplay/conf/client*/QWClientConfig.xml, first start off by moving into the "conf" directory
cd /Users/cisndisplay/.cisndisplay/client*/conf
  • the single asterisk in "client*" represent a sequence of numbers that are different for each install, luckily there is only one folder in this directory so it will take us into the appropriate directory (assuming that this is the first install of cisn display)
  • Change the permissions on QWClientConfig.xml so that the user "cisndisplay" can write to the file
sudo chmod 775 QWClientConfig.xml
  • Open up CISN display and log in, once successfully connected you may quit CISN Display
  • Make a backup Directory for the config file in case it gets compromised, as well as this is where cisnmaster.sh will look for the Backup Configuration
mkdir -p /Users/cisndisplay/Documents/BackupConf
  • The following line only works if the current directory is the "conf" folder ("cd /Users/cisndisplay/.cisndisplay/client*/conf")
cp QWClientConfig.xml /Users/cisndisplay/Documents/BackupConf

Installation of the Firewall

  • The following steps for the installation of the firewall should be done from "cisnadmin" account created earlier
  • It should be noted that to prevent yourself from be locked out of being able to ssh into the CISN Display computer you must add your machine to the "Trusted Hosts" in the Firewall.sh script
  • Copy Media: firewall.sh code for the Firewall and Media: com.apple.firewall.plist code for the Firewall's startup parameters onto the Desktop by right clicking (or control+clicking) on the links, and selecting "Save Linked File as..."
    • If it tries to append".txt" to the end or something. Delete that part and keep the original names
  • Open up the "Terminal"
    • Note: the following lines of code will only work if you have successfully downloaded the code above to the desktop
  • Then type:
sudo bash
  • Enter a password
cp ~/Desktop/firewall.sh /etc/
cp ~/Desktop/com.apple.firewall.plist /Library/LaunchDaemons/ 
  • Then:
chown root:admin /Library/LaunchDaemons/com.apple.firewall.plist
chown root:admin /etc/firewall.sh
chmod 544 /etc/firewall.sh
  • Once you restart your computer the firewall should have been loaded on Start Up
  • You can check if loaded and see the rules by typing the following into a terminal
sudo ipfw list

Adding the Ability to Quit Finder and Restart Computer

  • Open up a Terminal window, by opening a Finder window and searching Terminal or by looking in the Utilities folder inside the Applications folder
  • Typing this line into the terminal adds the ability to Quit the Finder, type:
defaults write com.apple.Finder QuitMenuItem 1
#!/bin/sh
#temp addition of "startdisplay.command", copy and paste following to text editor and save with .command extension
# Created by Aaron Martin and Nick Webster 2009-03-17
blockfile='/Users/cisndisplay/Desktop/blockfile' 
if [ -f $blockfile ]
then
 rm $blockfile
fi
open -a QWClient
sleep 5
osascript -e 'tell application "Finder" to quit'
killall Terminal 
  • Navigate to your home folder using the Finder and create a Folder named "bin" (should be located at /Users/cisndisplay/bin)
  • Copy the files "cisnmaster.sh" and "startDisplay.command" to Users/cisndisplay/bin/
  • Open "cisnmaster.sh" in any text editor(textEdit on a Mac will do)
  • We are going to change the third line from the top which says "clientID=client*********"
  • Without closing the text editor, open up a terminal window and type
cd /Users/cisndisplay/.cisndisplay/; ls
  • There should be an output "client*********" where "*********", are random numbers
  • Copy the output and replace what clientID equals (no quotations should be added to cisnmaster.sh)
    • example. clientID=client111111111
  • Now we will need to make cron jobs to continuously run the scripts, first log out and log in as cisnadmin
  • Open a terminal (we are about to allow non super users to use the reboot command) type
sudo bash
  • It will prompt for a password, enter the "cisnadmin" password
  • Then type:
chmod +s /sbin/shutdown
  • Followed by:
/sbin/shutdown -r now
  • It should simply reboot so you can now sign in as "cisndisplay"
  • Once in as "cisndisplay", check you can use the command by opening up a terminal window and typing:
/sbin/shutdown -r now
  • Now, make sure that earlier you completed the steps to create the "BackupConf" folder in the "Documents" folder with a copy of QWClientConfig.xml above

Automated Restart of CISN Display using cron

  • Open up the Terminal again (we are going to edit the users cisndisplay cron table to begin cisndisplay every 5 minutes and to restart the computer at night)
  • Type:
crontab -e
  • Click "a" to be able to write on the first line
  • Type the following
*/5 * * * * ~/bin/cisnmaster.sh begin  
  • Then press Enter
  • On this second line type:
59 23 * * * /sbin/shutdown -r now
  • Press enter
  • Then click "esc", followed by "Shift+Z" twice
  • Now we will edit roots cron table to move the configuration("cisnmaster.sh mvconf") file once every morning and once every night
  • in the terminal type
sudo bash
crontab -e
  • Click "a" to be able to write the following:
59 7 * * * /Users/cisndisplay/bin/cisnmaster.sh mvconf
57 23 * * * /Users/cisndisplay/bin/cisnmaster.sh mvconf
  • Then click "esc", followed by "Shift+Z" twice
cd /Users/cisndisplay/bin
  • Then:
./cisnmaster.sh stop
  • This will casue the temporary stoppage of cisn trying to consistently boot itself. Know the cisnmaster commands!
  • Open "System Preferences", click on the "Accounts" icon
  • select login items under cisn-display and select the plus button
  • search for bin and select startdisplay.command, this will make the ./cisnmaster rmblock run on start up of the machine

Setting CISN Display to Presentation Mode

  • All of the following should be done under the "cisnadmin" account
  • Xcode must be installed for the following instructions to work as they use the Property List Editor
  • Go to where CISN is installed(Applications/CISN_Display)
  • Right click on the executable icon "QWClient" (the icon which when pressed makes CISN run) and select "Show Package Contents"
  • Click on contents, then click on info.plist. (if it does not open in the Property List Editor open the Property List Editor, located /Developer/Applications/Utilities, and open info.plist from that application)
  • Click once on the root key called "Information Property List", then click on the arrow to its left and select "Add Child" in the top left corner
  • The variables are as follows:
    • Key: Application UI Presentation Mode (Note: Was previously LSUIPresentationMode however it has changed)
    • Value: All hidden (if it does not allow you to select "All hidden" type in the Value "3" into the field and it will select "All hidden")
  • Save and exit out of the Property List Editor
  • I am unclear how to do this via the conf file so for now it can be done manually, but you need to launch cisndisplay
  • go to settings, then display, then at the reset view option enter 60 seconds
  • simply exit out of the program without saving.

Configuring a system as a waveform display

Install Antelope

The setup of the waveform viewer we envision will require installing Antelope software (http://www.brtt.com/software.html) to access potential data streams.

  1. Put in the Antelope Disc and click its image when it appears on the Desktop
  2. Click on the Install.
  3. It will request an information form which can be ignored
  4. Continue through, select "full distribution" when the option arises
  5. Install all unapplied patches
  6. Set up default values for the network
    • Seed Net: SB
    • Int: UCSB
    • Orig Net:Institute of Crustal Studies
    • Mail Dom: crustal.ucsb.edu
    • Mail host: mail.crustal.ucsb.edu
  7. Stick license in ..WHERE? ASK AARON

References/Related

Here are some potentially useful links Mehkin suggested if you get stuck...

Ideas on Setting up the Trackpad

  • This is all done, all I need to do is document it. did I document it....?

Usable Controls from CISNMaster to Manipulate Program

  • remember you must have downloaded the commands first and they may not work unless all the directions above have been followed.
  • Find out the name of your machine from aaron, the current one is "ruby" so I will use ruby here in the examples.
  • open the terminal on your own computer and type "ssh cisndisplay@ruby.crustal.ucsb.edu" it will ask for the cisndisplay password, type 'er in!
cd bin
./cisnmaster   # follwed by a space and then any of these sub-commands
begin # kills finder and starts cisn display in kiosk mode
mvconf # deletes the current file in the conf folder and replaces it with our back up one in which is located in Documents/BackupConf, just in case its been compromised
sdwn # shuts down the computer and restarts it
stop # stops cronjob from restarting cisn every five minutes via file called "blockfile" which is placed on the desktop, will automatically undo itself in one hour. to manually restart the dispaly use "rmblock" disscussed below
rmblock # manually gets ride of the blockfile and allows the "begin" command to restart cisn every minute. Also starts up