Before you can use PsyToolkit on Linux, you will need to install Linux. This is not as difficult as you may think it is. Anyone can do it!

Introduction

PsyToolkit can be used in the laboratory on dedicated computers. PsyToolkit is actually being developed on Linux systems, because the developer is a big Linux fan.

What is Linux?

  • Linux is a freely downloadable operating system, an alternative to Microsoft Windows and Apple Mac.

  • Linux comes with a nice desktop and many applications, including the LibreOffice suite, which is easy to use and just as good (if not better) as commercial ones.

  • Linux is a widely used operating system, used around the world.

  • Linux has many advantages for users:

    • Linux does not cost money (you can download it for free)

    • Linux is highly configurable

    • Linux works well on older computers

    • It is easy to install

Is it difficult to install Linux?

Linux is very easy to install on your computer:

  1. You need to download a Linux ISO file (see below)

  2. You need to put this downloaded file on a USB stick or DVD disc.

  3. If you have Windows, make sure you have data on your computer for an extra operating system (around 10GB is enough); you can install Linux while keeping Windows.

  4. Put the disc in your computer, make sure your computer can boot from it, and then start computer.

  5. Now it takes around 15 minutes to install.

  6. If you are new to Linux, make sure read a good intro on installation, for example Install Linux Mint.

You can download an easy to install Linux flavor, such as

There is no need for a Windows version of PsyToolkit. This because anyone who does not want to (or is not allowed to) install Linux, for example on a University computer, can use the browser-based version.

Linux desktop

Linux offers different "desktop environments". They look very different from one another. The main ones are: Cinnamon (Mint default), KDE, Gnome, and Ubuntu’s own one.

For PsyToolkit, I strongly recommend XFCE, because it gives you more control than other desktop environments, although it is not necessary. For example, only the XFCE display settings dialog allows you to directly change the refresh rate (which only matters if you have an expensive monitor, most monitors work at 60 Hz).

Further, in XFCE you can also switch off the Desktop compositor (under Desktop tweaks), which can make the screen slightly more responsive (this depends on many different things).

Altogether, you do not need to worry about the desktop, but the point is that you can have full control over your system if you want, and a combination of Mint Linux with XFCE makes that easiest to do in my experience.

For whom is the Linux version?

Anyone can use it! It is easy to install and free of cost, so why not give it a try.

PsyToolkit on Linux can have some specific advantages:

  • For research which needs very high timing precision (note that even the browser-based version has good enough timing to measure even relatively small psychological effects) - To use special hardware, such as Cedrus keyboards or special digitial IO cards (which are supported by PsyToolkit)

  • There are PsyToolkit functions which can be used only on Linux, in particular the sprite functions (moving objects)

External keyboards and voicekey

PsyToolkit is compatible with external keyboards

The BlackBox voicekey is easy to use and does not need a special driver.

Installation of PsyToolkit on Linux

Installing Linux for PsyToolkit is relatively simple and straightforward, especially if you already know a bit about Linux. For Debian-based systems (e.g., Mint and Ubuntu) as well as for RPM based systems (e.g., Fedora) there are ready-to-install packages (see below).

Download and install

PsyToolkit is available for different Linux distributions in different packaging formats (RPM and Debian, or simply as source file).

RPM based systems

If you have an RPM-package manager (e.g., Fedora)

  1. Make sure you have administrator rights

  2. Download the RPM package: Download here

  3. Go into the folder where the downloaded package is and open a terminal (in file manager, right-click your mouse and select "open in terminal")

  4. In the terminal window, type on the command line: sudo dnf install ./psytoolkit-2.3.2-1.noarch.rpm

  5. To check if it worked, type psycc -v

If you use non-Fedora system, you need to install using your specific RPM package manager, such as yum.

Debian based systems

If you have a Debian based package manager (Debian, Mint, Ubuntu, and many more):

  • As Debian package:

    1. Download the Debian package: Click here.

    2. If you click on the package, typically the computer will ask to open it with the gdebi package installer.

    3. Click the "install package" (you will need to have administrator rights).

    4. To check if it worked, open a terminal window and type psycc -v

  • If you do not have the gdebi installer, you can install it as follows:

    1. Make sure you have administrator rights

    2. Download the Debian package: Click here.

    3. Go into the folder where the downloaded package is, right-click mouse and select "open in terminal"

    4. type on the command line: sudo dpkg -i ./psytoolkit_2.3.2.deb

    5. dpkg will complain about dependencies. No problem, just type sudo apt-get -f install

    6. Now again type sudo dpkg -i ./psytoolkit_2.3.2.deb

    7. To check if it worked, type psycc -v

Any other Linux system

  1. Download source package here.

  2. Make sure you install all the dependencies which your package manager. There quite many (click here for list)

  3. Go into the folder where the downloaded package is and open terminal.

  4. Unpack the source package: tar -xf psytoolkit.src.2.3.2.tar.gz

  5. Then go into the unpacked source package: cd psytoolkit_src

  6. Install (as administrator/root): sudo ./install.sh -p

  7. To check if it worked, type psycc -v

Dependencies

PsyToolkit needs quite a few other Linux packages. If you use the RPM or Debian installer, these will be automatically installed. If you install from source, you need to find install these yourself using your packege manager.

gcc, make, ruby, SDL and SDL2 packages (including image, mixer, ttf, gfx), indent, libusb, ruby-gnome2, imagemagic, closure-compiler, perl, fonts-freefont-ttf

Use PsyToolkit on Linux

Once you have installed the PsyToolkit package, it is easy to use. In essence, the coding is the same as in the browser-based version. You can write scripts like you would do in your webbrowser (but you need a text editor). The PsyToolkit scripting language is the same.

You need to compile your scripts in a terminal window (details below).

Example 1

In this example, you download experiment from PsyToolkit experiment library and compile on your Linux system.

  1. Go to the library: Click here

  2. The select the entry on the Simon task: Click here

  3. Download the "PsyToolkit code zip file" Click here

  4. Go to the folder where the simon.zip file is

  5. Create a new folder

  6. Unpack the zip files into the new folder

  7. Create the experiment: psycc -t simon.psy

  8. Run the experiment: ./experiment

Example 2

In this example, we use exactly the same files as in Example 2, but now you will be able to create a "shortcut" of the experiment on the desktop. Also, we are going to allow the experiment to work in full screen mode.

To put it on the desktop, just use the -d option.

Type: psycc -d simon.psy

You can now run the experiment by clicking the new icon on the desktop, or by typing: ./experiment

Example 3

Copy an example from the examples in the installed example directory

  1. Use your file manager: All examples are in /usr/share/doc/psytoolkit/2.3.2/examples/

  2. In terminal type: cp -r /usr/share/doc/psytoolkit/2.3.2/examples/simon-spatial-compatibility ~/

  3. In terminal type: cd ~/simon-spatial-compatibility

  4. In terminal type: psycc -t -d simon.psy

  5. You can now run the experiment by clicking the new icon on the desktop, or by typing: ./experiment

You can look through your example folder, there are a whole bunch. In order to compile them, you need to copy them to your home directory, as done in the example steps above.