07 August 2011

13. phpSheduleIt - basic installation

phpScheduleIt is a nice web-driven instrument scheduling system, which I first come into contact with as an NMR user at the University of California at Davis, where it is used to manage the scheduling of the instruments in the NMR facility there.

You will need to have a LAMP server set up (see e.g. http://www.howtoforge.com/ubuntu_debian_lamp_server). You will need apache2, php and mysql to play nicely together. Basically follow steps one and two, then sudo /etc/init.d/apache2 restart.

Download phpScheduleIt from http://www.php.brickhost.com/

A basic way to get it up and running goes as follows:

1. create a directory under /var/www. In our example it will be /var/www/nmr
sudo mkdir /var/www/nmr. Unzip the file you downloaded from www.php.brickhost.com and put the files in the /var/www/nmr directory

2. in your terminal, go to /var/www/nmr and chmod o+x all files (including subdirectories)

3. cp /var/www/nmr/config/config.php.new /var/www/nmr/config/config.php

4. Edit it.
change $conf['app']['weburi'] = 'http://localhost/phpScheduleIt';
to

change $conf['app']['weburi'] = 'http://localhost/nmr'; 
edit other relevant items, such as adminEmail, defaultLanguage, timeFormat, emailType, defaultPassword etc,

The admin email is important, since this will become the administrator account.

5. go to http://localhost/nmr/install
If nothing happens, or you get an error message, it's time to start trouble-shooting. Going to the terminal and
cd /var/www/nmr/install
php index.php
might give some useful information. Most likely you have either a) made an error in config/config.php, or b) you haven't chmod:d the subdirectories.

6.  If all goes well, you are asked for your root user name and root mysql password (which you set during the installation). Thus, login as root with the correct password. Once you're in, hit the button saying 'create tables'. If all went well you can now delete the /var/www/nmr/install directory.

7. Go to http://localhost/nmr
You should be greeted with a log in window. Important: select create new user and enter the email address you gave as the administrator email in the config.php file. This will then automatically become an administrator account. It has nothing to do with the order you create accounts in - it's all about what email address you put in the config.php file. 

8.  Once you've set up the account you are able to create instruments, user groups, booking restrictions etc. 
Anyone who wants to use the facilities can create their own new registered users, BUT only the administrator(s) can assign resources to them. 

9. Be careful with your GMT setting...

This page has some information as well: http://www.m-osaka.com/jp/plaza/readme.html

31 July 2011

12. Pulseaudio - controlling where the output goes

The non-free flash plugin can be a bit of a headache, since even if you install it and flash videos play nicely, you may not get any sound. On a laptop, you might not notice it, since the default output seems to be the laptop speakers. However, you may have problems piping the sounds through any attached USB speakers. Same goes for desktops, where the default output may be the sounds ports on your motherboard.

The fix is simple (assuming you have pulseaudio installed)
create an /etc/asound.conf file or a ~/.asoundrc file, with the following in it:

pcm.!default.type pulse
ctl.!default.type pulse

Rebooting should take care of things

11. Sorting out problems with NVIDIA or ATI graphics cards on Debian Testing

This bug has been a problem for a while now when running debian testing - if you do a dist-upgrade, chances are your prorietary drivers get borked.

Symptoms include gdm not starting i.e. no Gnome login window. Instead you get dumped into the terminal.

There are two fixes - one quick and dirty one and one which is more long term.

1. Quick and dirty
If you want Gnome up and running without necessarily using graphics acceleration, simply log in in your terminal and rename your xorg.conf.

sudo mv xorg.conf xorg.conf.old

This will allow you to use the graphics card on your motherboard again. It won't help with a PCI card much.

2. A real fix
SMXI. It may seems scary, but is fairly straightforward. Log in (presumably in the terminal)

sudo su
cd /usr/local/bin && wget -Nc smxi.org/smxi.zip && unzip smxi.zip && smxi


The sudo su logs you in as root. You could also sudo each command individually above.

Follow the instructions and let the smxi script install your graphics drivers.