Skip to navigation

Installing Limesurvey

August 16th, 2012

Notes to future self:

  1. Download limesurvey tarball and unpack into web root.
  2. Edit [limesurvey-root-dir]/config.php:
    • Change $databaseuser from ‘root’ to ‘limesurvey’
    • Choose and insert $databasepass, the password for the limesurvey mysql user.
    • If applicable, change rooturl to reflect directory where you unpacked the limesurvey tarball.
    • Change the default password for the default limesurvey user ‘admin’. This is a temporary password. You will change this through limesurvey later anyway, to avoid seeing the limesurvey warning message that the default password is still in use. However, between the moment you install limesurvey and the moment you first log in and change the password, limesurvey is vulnerable if the default password was the one that came with the installation.
    • Change the default user ‘admin’ to something else, a minor protection against script attacks.
  3. In mysql, create mysql limesurvey user and password and create database “limesurvey”, grant privileges to limesurvey user:
    $ mysql -u root -p 
    [enter password at prompt]
    mysql> create user 'limesurvey'@'localhost' identified by '[password]';
    mysql> create database limesurvey;
    mysql> grant all privileges on limesurvey.* to 'limesurvey'@'localhost';
  4. Navigate browser to
    Limesurvey will offer to populate the database for you.
  5. Remove [limesurvey-root-dir]/admin/install
  6. Log in at [limesurvey-root-dir]/admin/ with default user and password.
  7. Click on the key symbol “Create/edit users” and change the password of the default user.
  8. Log out.

Compile latest unison on Ubuntu lucid

May 23rd, 2012

Short version: You need to apt-get the packages ocaml and liblablgtk2-ocaml-dev, download and unpack the unison tarball you want, then run “make:

Change filename in the following as necessary to download the tarball you want:

tar xvfz unison*tar.gz
cd unison*
sudo aptitude install ocaml
make UISTYLE=text
sudo aptitude install liblablgtk2-ocaml-dev
make unison

Maybe compiling the text version can be skipped. I then move the unison executable to my local ~/bin/ and execute from the command line. You may need to “sudo make” for system wide install.

Emacs 22 does not highlight region

September 8th, 2011

Well, I doubt many people have this problem. For some reason, on a server I use the installed Emacs version is Emacs 22, not the current Emacs 23, and I ran into the problem that I was expecting transient-mark-mode when it was in persistent-mark-mode, as I figured out here. However, it’s the kind of solution you don’t easily find when you don’t know Emacs terminology (mark, point, region, active), so an attempt to make this more googleable especially for Emacs newbies:

The symptom was that in an Emacs buffer, after hitting Ctrl and the spacebar (C-space) and then moving the cursor, I was expecting the text in between (between mark and point) to be highlighted (indicating an active region), but the region was not highlighted and not active. Accordingly, then doing a replace-string and expecting it to replace text in the region that is “normally” (in Emacs 23) highlighted did not replace anything. (I was, however, able to cut and paste (kill and yank) the same region. In Emacs-speak, the region was not active. Another symptom: after M-x replace-string where I normally see “Replace string in region” in the minibuffer, it now only said “Replace string”.

The solution:

M-x transient-mark-mode

to enable transient-mark-mode and get the expected behaviour (this command toggles it on and off).

How to connect to kclad (the KCL Active Directory domain)

August 30th, 2011

I followed these instructions (I did not get any errors).

sudo aptitude install likewise-open5


sudo domainjoin-cli join LOGIN

Add the line winbind use default domain = yes to the file /etc/samba/lwiauthd.conf
Check if you are connected:

sudo domainjoin-cli query

I now seem to be connected whenever I am on the KCL network.

sudo domainjoin-cli leave

(I don’t explicitly leave. It disconnects when I disconnect from the network.)

Find more network printers from the Ubuntu command line

August 19th, 2011

Some of the network printers at work do not show up when I try to find them via the Ubuntu GUI System -> Administration -> Printing but I can find them via the command hp-probe. Here at work the list returned by hp-probe is long and I know the names I’m looking for start with “printer0” so I do

hp-probe -bnet | grep printer0

This returns lines that contain a URI like this


Copy that and go back to the GUI where you paste it under “Enter device URI”