Corning Community College High Computer Performance Fundamentals Course Portfolio [[http://lab46.corning-cc.edu/user/afassett/hcp_projects|High Computer Performance Portfolio]]\\ [[http://lab46.corning-cc.edu/user/afassett/hpc_ii|High Computer Performance II Portfolio]]\\ =====Projects===== [[http://lab46.corning-cc.edu/haas/spring2011/hpc0/projects|The List]] =====Linux/*BSD Desktop Install===== [[http://lab46.corning-cc.edu/user/afassett/portfolio/linuxinstall|Ubuntu-9.10]]\\ More coming Soon... =====VmServer===== [[http://lab46.corning-cc.edu/user/afassett/portfolio/vmserver|Vmserver:03]] =====Creating Virtual Machines===== [[http://lab46.corning-cc.edu/user/afassett/portfolio/creating_virtual_machines|Basic cli install of virtual machine]] =====Automated Drawing===== ==What is need in-order to run== *xpaint(version 2.74 or greater) *xautomation (xte) *xwit *xserver environment (linux machine with xwindow) Throughout and for this entire project: o Illustrate algorithm and logic decisions in the accomplish of each script o Make and have functioning backups of each script, NOT just the final product o display the scripts in-line in your wiki documentation o adequately document each script to explain what is going on #!/bin/bash #version1.0 xpaint -24 -size 1024x720 -nomenubar -popped & sleep 5 pkill xpaint + a square in the opposite direction + “draw” a square + “draw” another square, within the first, which is in a different color * Now to make things more interesting o draw me a circle approximately in the middle of the screen o “fill” the circle with some color + on a dual-head system o draw me a picture/scene on the screen o this picture/scene is subject to your creativity, but it must contain at least: + 3 mathematically significant shapes (circles, ellipses, arcs) + use some not-made-up-of-purely-90 degree angles (triangle, trapezoid, parallelogram) + utilize a minimum of 4 different colors (or shades of color) + uses 3 xpaint functions in the composition (fill, gradient, erase, etc.) o the picture must have a theme or message or depict something o test your composition drawing script on: + 2 different screen dimensions #!/bin/bash pkill xpaint #kills any xpain that was already started# xpaint -nowarn & xwininfo -root|grep 'geometry'|sed -e 's/+.*$//g'|sed -e 's/^.*-geometry //g'>filea WIDTH=`cat filea|cut -d 'x' -f1` HEIGHT=`cat filea|cut -d 'x' -f2` sleep 3 echo "entering xpaint" Version=`xwit -all -print| grep -i xpaint | sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` echo "Version is: $Version" pkill xpaint dVersion=`echo $Version | sed 's/\.//g'` Version=$dVersion if [ $Version -eq 2813 ] then Version="-canvas" else Version="-popped" fi xpaint -24 -size ${WIDTH}x${HEIGHT} -nowarn -nomenubar $Version & #"{" lets you know when the variable ends sleep 3 toolID=`xwit -all -print | grep -i xpaint | sed -e 's/:.*//g'` winID=`xwit -all -print | grep -i untitled| sed -e 's/:.*//g'` focusWin=`xwit -id $winID -focus -raise -move 0 0` focusTools=`xwit -id $toolID -focus -raise -move 0 0` echo $toolID echo $winID echo "Width is $WIDTH" echo "Height is $HEIGHT" sleep 4 xpos=`echo $[($RANDOM % $WIDTH)]` ypos=`echo $[($RANDOM % $HEIGHT)]` size=`echo $[($RANDOM % 30)]` echo $xpos echo $ypos echo "done" shape=`echo $[($RANDOM % 2)]` echo $shape if [ $shape -eq 0 ] #Draw a triangle then xte 'mousemove 500 500' xte 'mousedown 1' xte 'mousemove 600 600' xte 'mousemove 500 600' xte 'mousemove 500 500' xte 'mouseup 1' fi if [ $shape -eq 1 ] #Draw a Square then xte 'mousemove 600 500' xte 'mousedown 1' xte 'mousemove 600 600' xte 'mousemove 500 600' xte 'mousemove 500 500' xte 'mousemove 600 500' #xte 'mousermove ${xpos} ${size}' xte 'mouseup 1' fi sleep 10 pkill xpaint #same as before but this time making sure that I've finished #xwit -lower -raise## ==References== * http://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html * http://mathforum.org/dr.math/faq/formulas/ * http://en.wikipedia.org/wiki/Circle * http://hoopajoo.net/projects/xautomation.html * http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-5.html * http://lab46.corning-cc.edu/user/mgough/autodrawing * http://lab46.corning-cc.edu/journal/spring2010/mgough/start * http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html =====Cluster Construction===== http://lab46.corning-cc.edu/user/afassett/portfolio/cluster_construction =====Server installation===== Preparing the server and setting it up is most of the work. To start If you want to setup at your house, you will need [[http://www.dyndns.com/|dyndns]] and don't worry it's free for what you are setting up (unless you are trying something greater than this) Note this way is also so you can ssh into your home computer. First things first make sure you setup your router to port-forward and has the ability to use dyndns. There are other ways but this wiki is keep simple. Now that your router is setup for dnydns and you have installed an O.S. on your machine you want, make sure you have the router port-forward to it's Ip-address. Making your machine static and the router find your machine's MAC-address is more efficient however not as simple. Now the machine can be called from the internet! however no services are running right now if you want to ssh to the machine make sure ssh is installed some linux o.s don't have the server package installed just the client side. For the server setup use the sources. Now you can make a server for anything however make sure you change the services ports open on your dyndns and your router (possibly the machine as well). ===Sources== https://help.ubuntu.com/community/ApacheMySQLPHP =====Playstation Linux==== http://lab46.corning-cc.edu/user/afassett/portfolio/playlinux =====Video Construction Wall===== http://lab46.corning-cc.edu/user/afassett/portfolio/VideoWall