Monday, February 10, 2014

Monthly Board Reports

Our School Board has gone Google and paperless with Google Drive.  Starting a year ago we purchased Chromebooks for the board members to use.

These instructions are for how the drive is organized and what to do each month for the board members.

The Google Drive was formed and shared using the tech user account.  This way any staff member with access can go in with full rights.  It is not tied to a specific staff member.

PSD School Board ->
     Agenda
     Archive
     Consent Agenda
     Meeting
     Minutes
     Policy
     SB Reports ->
          Athletics
          Clerk
          Elem Principal
          Food Services
          HS Principal
          Maintenance
          SPED
          Superintendent
          Technology
          Transportation

Inside each is a folder for the past school years, for organizational purposes.  Add a new folder each year and move the files into those folders to keep it clean.

The Archive folder is where all past meeting files are organized.  These are links to the files also stored elsewhere in the drive.

The meeting folder is used by the board for easy access to all files stored throughout the drive.  Each month I create a link to the files in this folder.  To create a link find the original click the Move To folder button and press and hold the Ctrl key when clicking the Meeting folder.  The Ctrl key allows for multiple locations.  Then click OK to create the link.  Keep all files in the original locations, but add a link to the meeting folder.

At the end of the meeting from the meeting folder, select all files and folders except the policy folder and move these to the Archive folder for that month.  To move, but keep the other links you press the Ctrl key and uncheck the meeting folder check and while still holding the Ctrl key click the archive month folder.

All files are named as such:
     2014 02C Technology Report
     Year | Month | Section of the agenda | Title
Agenda header items are A, Administrative reports are B, Supervisor reports are C

The board group is given view access.  Each supervisor has been granted edit rights to the SB Reports folder that corresponds to their position.

Friday, February 7, 2014

Update Linux Servers

I like to do these steps on each server listed once a month.  You can do it as often or as little as you like.

These steps are specific to my servers, but only in terms of Debian and Ubuntu.  Some things are specific for the setup here at Potlatch SD.

I have blanked out any passwords and usernames, those can be retrieved from documentation.

Web Server/Piler Server
Use Putty, it is the easiest SSH software out there.

At the initial prompt you need to su to do the update process.

$ su

apt-get update
apt-get upgrade
apt-get autoclean
apt-get autoremove

When that is complete then you can type exit twice to close out.

Koha Server
This is similar to above, but since it is Ubuntu you can use sudo instead of su at the beginning.

$ sudo apt-get update
$ sudo apt-get upgrade

If Koha was upgraded then you have to go and adjust the Circulation file to allow the scanners to work properly.  instead of programming the scanners or changing the barcodes on every book now, I have modified the programming to adjust the barcode after scan at the elementary.  The instructions are found on this blog under PSD Koha Circulation Barcode Modification.

$ sudo apt-get autoclean
$ sudo apt-get autoremove

When that is complete then you can type exit to close out.

PFSense Firwall/Gateway Server
This server checks for updates and will display if an update is needed on the dashboard.  To upgrade you can click on the link and follow the instructions, the server will upgrade in place without much major interruption.  I have done the update during the school day and only had the network disconnect for a few seconds while the service restarts.  Some major updates require a restart so those should be done at the end of the day.
The Packages can be updated at anytime as well.  These are add-ons that have been used to increase the effectiveness of the server.  When you click on System -> Packages the next screen shows you what is installed.  Anything that is highlighted in the version column has an update.  To load that update click on the PKG button next to the row.  That will install the update automatically.

Friday, January 3, 2014

Factory Reset Chromebook

I have recently purchased a few Chromebooks.  We have both Acer and Samsung.  These instructions worked on both.

When joining a Chromebook to our local email domain for management the process is fairly straightforward.  You wait for the sign in screen, but instead of signing in you press Ctrl-E.  This then brings up another sign in screen, and I have entered the admin email and password, then the system says enrolled and the sign in screen actually comes up, but now says that this device is managed by my email domain.

Sometimes during this process the device doesn't enroll properly.  The only way to fix that is to factory reset the device and try again.

I had to call support to get this information, but since it worked on both types of devices I am blogging it for my future reference!

With the device turned off completely follow these instructions:

Esc - Refresh - Power button  The refresh button is F3 on both of the devices, but is usually represented by a circular arrow.
Once the device comes up to the developer mode press:
Ctrl - D and the  Enter key.

This will send the device into develop reset mode.  It will probably take a few minutes to wipe the device.  It will restart a few times.  When it is done it will go right back to the initial process as if you just turned it on for the first time.

The device can now be enrolled in the domain for management.

The Acer device needed the developer mode turned off, which is just the above process again.  The Samsung didn't need that step.

Hopefully this helps others, or at least is for my reference.

Thursday, January 2, 2014

PSD Koha Circulation Barcode Modification

So I spent a few summers ago upgrading the library system to Koha.  It was actually fairly painless to do with the help of linux.  But I ran into an issue of barcodes matching at both schools.  So to eliminate that I added an e to the barcodes for the elementary.  Now to get the scanner to put the e on at the end so the librarian wouldn't have to add it manually.

Instead of making the scanner do that work I found that you can modify the Circulation file in Koha to do that work for you.  In our situation that was good since the books at the high school have added number data in the barcode as well.

So here is the location of the file:
/usr/share/koha/lib/C4/Circulation.pm

This is what I modified to get it to work:
Original:
elsif ($filter eq 'T-prefix') {
  if ($barcode =~ /^[Tt](\d)/} {
    (defined($1) and $1 eq '0') and return $barcode;
  $barcode = substr($barcode, 2) + 0;
}
return sprintf("T%07d", $barcode);

New:
if($branch eq '0762' and substr($barcode, -1) eq 'e'){
  return $barcode;}
elsif($branch eq '0135' and length($barcode) >= 6){
  $barcode = substr($barcode, 2, 5);
}
if(substr($barcode, 0, 1) eq 'T'){
  if(substr($barcode, 1, 1) eq ' '){
    $barcode = substr($barcode, 2);}
  else{$barcode = substr($barcode, 1);}
}
$barcode = substr($barcode, -5);
if($branch eq '0762'){
  return sprintf("%05de", $barcode);
} else {
  return sprintf("%05d", $barcode);
}

Thursday, December 12, 2013

Piler on Debian Wheezy

MailPiler 0.1.24 on Debian Wheezy

I was interested in setting up an email archive server.  We need to be doing this but with budgets as they are these days we need to do it on the cheap.  MailPiler looked promising.  The directions are a little shotty for a non-linux user like me.  So the instructions below are word for word what I did with my final production server.  It took me 5 reimages of the virtual machine before I got to this point!  Like I said, non-linux user.  Hopefully these instructions will help someone else.  I used the official tar.gz, but the latest source is of interest as it includes a few of the things I had to do to get things to work right, so I would suggest you load from the source.


Install Debian Wheezy - no need to install any special packages, those will be included in the install later.

su
apt-get update
apt-get upgrade
apt-get autoclean
apt-get autoremove

apt-get install openssl  libssl-dev apache2 php5 php5-gd mysql-server phpmyadmin libmysqlclient-dev php5-ldap memcached php5-memcache sphinxsearch libtre-dev libzip2 libzip-dev sysstat gcc libwrap0 libwrap0-dev latex2rtf latex2html catdoc libpoppler19 poppler-utils unrtf make

nano /etc/default/sphinxsearch
Edit the section to make sure it says START="no"

a2enmod rewrite
nano /etc/apache2/sites-enabled/ooo-default
Modify all lines that are AllowOverride to All at the end.
Modify DocumentRoot to location of piler web directory. (/var/www/piler)
service apache2 restart

groupadd piler
useradd -g piler -s /bin/sh -d /var/piler piler
usermod -L piler

Then download piler from the piler download location.

tar zxvf piler-x.y.z.tar.gz
cd piler-x.y.z
./configure --localstatedir=/var --with-database=mysql --enable-starttls --enable-tcpwrappers

make
make install

make postinstall
/var/www/piler
www-data
[enter]
[enter]
root (could use default if willing to adjust more mysql permissions)
[password]
[password]
/etc/sphinxsearch/sphinx.conf
[enter]
[enter]
y
y

nano /usr/local/etc/piler.conf
Update the mysql section at the end with settings specific to your setup.

nano /var/www/piler/config-site.php
edit site specific information
SITE_NAME
SITE_URL
DIR_BASE
PILER_HOST (Set to IP address of server)
SMTP_DOMAIN
SMTP_FROMADDR
ADMIN_EMAIL
(My DB info was already accurate.)

sh init.d/rc.piler start
sh init.d/rc.searchd start

If you want to add these scripts to run at boot follow the below instructions.

Copy the scripts to the init.d folder and add the scripts to boot time.
cp init.d/rc.piler /etc/init.d/
cp init.d/rc.searchd /etc/init.d
insserv rc.piler
insserv rc.searchd

Visit http://piler.potlatchschools.org
admin@local:pilerrocks
Add your domain to the Administration/Domain menu.
potlatchschools.org -> psd285.org
Adjust the default passwords to make it secure.

Now start sending mail to the server from your email server.  I use Google Apps, so I had to add my server as a forwarder.

LDAP Authentication
nano config-site.php
$config['ENABLE_LDAP_AUTH'] = 1;
$config['LDAP_HOST'] = '***';
// set this if you want to limit the scope of the ldap query
$config['LDAP_BASE_DN'] = '';
// the helper account, see the details below
$config['LDAP_HELPER_DN'] = 'CN=...';
$config['LDAP_HELPER_PASSWORD'] = '******';
$config['LDAP_MAIL_ATTR'] = 'mail';
$config['LDAP_ACCOUNT_OBJECTCLASS'] = 'user';
$config['LDAP_DISTRIBUTIONLIST_OBJECTCLASS'] = 'group';

$config['LDAP_DISTRIBUTIONLIST_ATTR'] = 'member';

Wednesday, December 11, 2013

Raspberry Pi Internet Radio

We have a radio in the office that gets stations sometimes, and fails sometimes.  FM signal is sketchy in my neck of the woods.

So I grabbed one my stagnant Raspberry Pi's and went about a search on Google to find instructions for an Internet Streaming Radio.

Raspberry Pi Wifi Internet Radion Player

I found this site, and although it has some issues with setup it got me going.  Here is my post on what I did using the latest Debian Wheezy for Raspberry Pi and fully updated on Dec. 11, 2013.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoclean
sudo apt-get autoremove

My favorite set of commands to get things fully updated.

sudo apt-get install mpd mpc

MPD is the music player deamon.  It does the hard work/heavy lifting.  MPC is the music player client.

sudo shutdown -r now

After a restart everything just works.  Here is a great website with all of the command line tools for using mpc.

MPC - Linux Man Page

My setup is headless and actually sitting in the switch closet connected to an audio cable to the surround sound amp.

sudo apt-get install php5

Below is my php code that I created to control mpc from a webpage.  Why ssh into the system when you can keep the website open and control it from there?

<?php
if(isset($_POST['p'])){
exec("mpc toggle");
}
if(isset($_POST['s'])){
exec("mpc stop | mpc clear");
if($_POST['s']==1){
exec("mpc add http://ice8.securenetsystems.net/KHTRFM?type=.mp3");
}else if($_POST['s']==2){
exec("mpc add http://streaming207.radionomy.com:80/TheChristmasStation");
}else if($_POST['s']==3){
exec("mpc add http://audioplayer.wunderground.com:80/UniKyrn/Spokane.mp3");
}
exec("mpc play | mpc volume 90");
}
if(isset($_POST['v']) || isset($_POST['vol'])){
if($_POST['v']!=""){$vol = $_POST['v'];}
if($_POST['vol']!=""){$vol = $_POST['vol'];}
exec("mpc volume ".$vol);
}
?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="30" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<title>DO Radio</title>
<style type="text/css">
h4{margin:0;}
</style>
</head>
<body>
<h1>District Office Radio</h1>
<?php
echo "<h3>".exec("mpc -f '%name%' current")."</h3>";
echo "<h2>".exec("mpc -f '[[%artist% ]%title%' current")."</h2>";
?>
<form action="index.php" method="post">
<button type="submit" name="p">Play/Pause</button><br /><br />
<h4>Volume:
<?php
$vol = exec("mpc volume");
echo substr($vol,strpos($vol,":")+1);
?></h4><br />
<button type="submit" name="v" value="-10">-10</button>
<button type="submit" name="v" value="-1">-1</button>
<button type="submit" name="v" value="+1">+1</button>
<button type="submit" name="v" value="+10">+10</button>
<br />
<input type="text" name="vol" /><input type="submit" value="Submit" /><br />
<br /><br />
<button type="submit" name="s" value="1">KHTR 104.3</button><br />
<button type="submit" name="s" value="2">The Christmas Station</button><br />
<button type="submit" name="s" value="3">NOAA Weather - Spokane, WA</button><br />
</form>
</body>
</html>

I have actually added a bunch of more radio stations, just grabbed the stream address from this website:
http://web-radio.fm/st_list.cfm

Thursday, August 2, 2012

Xibo on Raspberry Pi

Ok, so i know I haven't posted much at all since I started this but I have been busy teaching students and haven't had time to keep updating a blog that no one will check often.

Anyway, this post is because I have a Raspberry Pi, and I am working to make it into a Xibo Digital Signage station.  My current setup is a nComputing terminal at each tv, but that is not 1080P HD over HDMI.

Listed below is my setup of the Raspberry Pi and what I had to do to get it to run Xibo Pyclient.  I have followed some great articles online, one of which is located at: http://www.cnx-software/2012/01/19/xibo-digital-signage-in-raspberry-pi-emulator-step-1/

Follow the Xibo Pyclient instructions located at: http://wiki.xibo.org.uk/wiki/Install_Guide_Python_Client

I have also used the assistance of many people on the Raspberry Pi Forum: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=12261

(All commands are rough since I built this a week ago, but I should have better instructions when I build it again for the other screen!)
- I started with the latest Raspbian "wheezy" image located at Raspberry pi's Download page.
- Make sure you apt-get update, and apt-get upgrade, and apt-get dist-upgrade to get the latest
- Follow Xibo's Pyclient install instructions:
sudo apt-get install python-gtk2 glade librsvg2-2 python-imaging dropbear
sudo apt-get install -y libdc1394-22 libgraphicsmagick++3 libgraphicsmagick3 bzr 
  python-soappy python-feedparser python-serial libavcodec52 libavformat52
  libswscale0 libsdl1.2debian-pulseaudio libvdpau1
?sudo apt-get install libboost-python1.42.0 libboost-thread1.42.0 
- sudo ldconfig
- sudo apt-get install python-libavg
- The instructions continue with getting Berkelium and libbrowsernode, but those aren't compiled yet.  Hopefully someone with knowledge can do that.  Berkelium is required, Hexxeh's Chromium is currently not compatible with Xibo, so I don't know if that can be fixed.
- mkdir /opt/zibo
- cd /opt/xibo && sudo bzr branch lp:xibo pyclient
- cd /opt/xibo/pyclient/client/python
- sudo cp site.cfg.default site.cfg
- sudo nano site.cfg
- Edit the server sections to work with your Xibo server.


This is as far as I have been able to go before the script tells me that the version of Berkelium is not compatible.  I hope that sometime this will be fixed, but until then this is what I got so far.  It is close, but still not working.  I will edit as I get it working.

Edit:  I decided to give up with this project.  If someone else gets this going please message me and I would be glad to test it out.  I have moved away from Xibo signage and am just using my own php page with iframes to do what I want to accomplish.  At some time I might get back into it.  Anyway, good luck.