Apple Magic Trackpad 2 on Ubuntu Linux

The is a guide to installing the Apple Magic TrackPad 2 on Ubuntu Linux. While this guide has been written for Ubuntu 20.04, it should be easy to follow these instructions with minor changes for Fedora.

Plug the TrackPad in to USB. The trackpad should just work via a cabled connection. 2 Finger scrolling will work, a 2-finger tap is right mouse button, and a 3-finger tap is the middle button (or paste).

Enabling Bluetooth

To connect the trackpad via bluetooth, unplug the USB cable and turn the trackpad off, wait a second or two then turn it back on. The trackpad will now appear in bluetooth settings and can be paired.

Enabling Gesures

Add your user to the ‘input’ group. After doing this you will need to completely restart your session – the easiest way to do this is to reboot. Logging in and out will not work.

$ sudo gpasswd -a $USER input

Now you will need to install libinput-gesture – the example below uses the latest from git

$ sudo apt-get install xdotool wmctrl git python3 libinput-tools build-essential
$ mkdir ~/src/
$ cd ~/src/
$ git clone https://github.com/bulletmark/libinput-gestures.git
$ cd libinput-gestures
$ sudo make install
$ libinput-gestures-setup autostart
$ libinput-gestures-setup start

After this, a three finger swipe up and down will switch workscapes. Read /etc/libinput-gestures.conf to see other options that are available.

Issues

Unfortunately, when used over bluetooth, the sensitivity of the touch to click is far too sensitive. I found that text was constantly accidently selected. This issue does not occour when the decice is wired.

Libinput seems to show the same device details as below for both wired and bluetooth – so I’ve not figured out that cause of this yet.

Device:           Apple Inc. Magic Trackpad 2
Kernel:           /dev/input/event25
Group:            6
Seat:             seat0, default
Size:             162x115mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    button-areas *clickfinger 
Disable-w-typing: n/a
Accel profiles:   none
Rotation:         n/a

Expanding a Dell PERC H800 RAID array with additional MD1200 shelves

Here is a short guide to creating a RAID 10 array on a PERC 800.  In my case, additional drives were added via 2 new MD1200 which were chained onto the existing shelves.

Continue reading “Expanding a Dell PERC H800 RAID array with additional MD1200 shelves”

Getting PHP4 to work along side PHP5 in Ubuntu Gutsy

I got PHP4, compiled it as CGI.. here’s how.

Install required packages

  apt-get install make libmysqlclient15-dev libmcrypt-dev libxpm-dev libpng12-dev 
libjpeg62-dev libcurl4-openssl-dev apache2-dev  gcc bison flex

configured as follows.

./configure --enable-force-cgi-redirect --disable-cli --enable-discard-path  
 '--prefix=/home/pookey/php/' '--with-xml'  '--enable-bcmath' '--enable-calendar' 
 '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
  '--with-xpm-dir=/usr/X11R6' '--with-mcrypt' '--enable-magic-quotes' 
 '--with-mysqli' '--with-mysql=/usr' '--with-openssl' 
  '--enable-discard-path' '--with-pear' '--enable-sockets' 
 '--enable-track-vars' '--enable-versioning' '--with-zlib'

This installed it into /home/pookey/php

Enabled per vhost using the following syntax

  SetEnv PHPRC /home/pookey/php/lib/stage
  ScriptAlias /php4-cgi /home/pookey/php/bin/php

  <Location />
    Action php4-script /php4-cgi
    AddHandler php4-script .php
  </Location>

For some stupid reason I failed to figure out, doc_root needs to be set to the document root for each vhost, and can only be done in php.ini (setting PHP_DOCUMENTATION_ROOT with SetEnv failed). This means each vhost needs it’s own php.ini, which is placed wherever you set PHPRC to.

Using this system, you can have PHP4 and PHP5 mixed even on the same vhost

Irssi – making it beep when your nick is mentioned

Irssi by default will highlight your nickname, but that actually requires you to be looking at the screen. I wanted to make irssi beep when someone mentioned my nick, so that I didn’t have to actively monitor the tab in konsole. Here’s how to do it.

/set bell_beeps ON
/set beep_msg_level MSGS NOTICES DCC DCCMSGS HILIGHT