Thunderbird Office365 Calendar QUB

22 February 2015

To have access to Outlook’s meeting request and calendar features, you need to install and configure two addons for Thunderbird.

  1. Install the latest version of the Lightning add-on.
  2. Download the latest version of the Exchange Calendar and Tasks Add-on.
  3. In Thunderbird, click on Tools Add-ons
  4. Click on the Gear icon (next to “Search all add-ons”) and select Install Add-on From File.
  5. Select the recently downloaded addon.

Once the two addons are installed, create a new calendar, select Microsoft Exchange 2007/2010 Use the following settings:

Server URL: https://pod51050.outlook.com/ews/exchange.asmx
Primary email address: name01@qub.ac.uk
Username: userid@.ads.qub.ac.uk
Domain name: [Leave this blank]
Share Folder Id: [Leave this blank]

These details are for Queen’s University Belfast, something similar should work with other organizations.

If you are having trouble connecting, check the Server URL. I identified the address by checking the URL bar when I was logged into office365’s outlook web-app. I have been unable to reproduce this, if you find a way to identify which pod you are using please let me know.


Configuring static IP and Internet sharing on the RaspberryPI

07 February 2015

With just a fresh install of raspbian, and a network cable, you too can setup your very own Raspberry PI with Internet access.

Make sure you have the same physical setup:

PI (Ethernet) -> (Ethernet) Computer (Wireless or second Ethernet) -> Internet.

Install raspbian onto the SD card. Mount the SD card with write privileges and navigate to the file /etc/network/interfaces and set a static IP.

auto eth0
iface eth0 inet static
	address 10.50.50.2
	netmask 255.255.255.0
	network 10.50.50.0
	broadcast 10.50.50.255
	gateway 10.50.50.1

On your computer which the PI is connected to configure the ethernet interface. This will allow you to ping and SSH into the PI.

sudo ifconfig p5p1 10.50.50.1 up

Setup the Internet connection sharing on your computer using iptables. You may need to change the interfaces to match yours. Below, wlan0 is my Internet interface, and p5p1 is connected to my PI.

sudo iptables -A FORWARD -o wlan0 -i p5p1 -s 10.50.50.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

The first rule allows forwarded packets (initial ones). The second rule allows forwarding of established connection packets (and those related to ones that started). The third rule does the NAT.

That’s it, you should now be able to connect to the Internet from your PI. Note that this is a NATed connection, which means that you will not be able to connect to your PI from any machine on the network, with out a bit more work.


Compiling mcabber with OTRv4 on Debian

11 December 2014

Currently OTRv4 (libotr5-dev) is only in testing, which means you need to add the backports repository. (For Ubunutu skip this step, the rest is the same.)

Add the following line to the bottom of /etc/apt/sources.list if you don’t already have it.

deb http://ftp.debian.org/debian/ wheezy-backports main 

Update and install the required libraries to compile mcabber with OTR, PGP and UTF-8 support.

apt-get install build-essential libloudmouth1-dev libgpgme11-dev libncursesw5-dev libotr5-dev

Download and extract the latest release. [Currently] (https://bitbucket.org/McKael/mcabber-crew/issue/133/gpg-signed-release)there is no signed, or hashed checksum to confirm.

wget http://mcabber.com/files/mcabber-0.10.3.tar.bz2
tar xvfj mcabber-0.10.3.tar.bz2
cd mcabber-0.10.3

Run the configuration script, you need to specify OTR or it will not compile support for it.

./configure --enable-otr
make
sudo make install

Confirm everything has compiled and installed correctly.

mcabber -V

Create the config directories, along with a place to store your OTR keys.

mkdir -p ~/.mcabber/otr
chmod 0700 ~/.mcabber

Create a configuration file, called ~/.mcabber/mcabberrc. Example config file here.

# Basic jabber server stuff
set jid = <UserName>
set server = <Server>
set tls = 1

# Disbale logging.
set disable_chatstates = 1
set logging = 0
set load_muc_logs = 0

# Enable OTR to always run.
set otr = 1
otrpolicy default always
set otr_dir = "~/.mcabber/otr/"

Should all be working, use /help otr to get more information.

/OTR key
/OTR start|stop|info [jid]
/OTR fingerprint [jid [fpr]]
/OTR smpq|smpr [jid] secret

/OTR smpa [jid]
You can use the shortcut-jid "." for the currently selected contact.

/otr key
Print the fingerprint of your private key to the Status Buffer

/otr start [jid]
Open an OTR channel to the specified jid (or the currently selected contact)

/otr stop [jid]
Close the OTR channel to the specified jid (or the currently selected contact)

/otr info [jid]
Show current OTR status for the specified jid (or the currently selected contact)

/otr fingerprint [jid [fpr]]
Show the active fingerprint of an OTR channel.

If the fingerprint is provided instead of "fpr", the fingerprint will become trusted.  If you replace "fpr" by some bogus string the fingerprint will loose the trusted status.

/otr smpq [jid] secret
Initiate the Socialist Millionaires Protocol with the secret and the buddy

/otr smpr [jid] secret
Respond to the Initiation of the jid with the secret

/otr smpa [jid]
Abort the running Socialist Millionaires Protocol

GTK icons missing using a window manager

13 November 2014

If you’re using a window manager, such as awesome or goomwwm, instead of a desktop environment, such as GNOME or XFCE, then you might have the issue of some GTK applications not looking quite right, a problem I had was with missing icons.

Before and after:

GTK Before and After

List all available icons themes:

ls ~/.icons/ /usr/share/icons/

You need to append the line, gtk-icon-theme-name = "-insert-theme-name-", to /etc/gtk-2.0/gtkrc or ~/.gtkrc-2.0.

echo "gtk-icon-theme-name = \"Humanity\"" >> /etc/gtk-2.0/gtkrc

The above command globally sets the theme to Humanity. The command is appended if the file exists, and creates it if not.


Missing Window Manager Gtk Icons

13 November 2014

2014-11-13-missing-window-manager-gtk-icons

date: 2014-11-13 10:56:39
published: true
layout: post
slug: missing-window-manager-gtk-icons
title: GTK icons missing using a window manager
category: Linux, goomwwm, awesome, window-manager


If you’re using a window manager, such as awesome or goomwwm, instead of a desktop environment, such as GNOME or XFCE. Then you might have the issue of some GTK applications not looking quite right, a problem I had was with missing icons.

GTK Before and After

List all available icons themes:

    ls ~/.icons/ /usr/share/icons/

You need to append the line, gtk-icon-theme-name = "-insert-theme-name-", to /etc/gtk-2.0/gtkrc or ~/.gtkrc-2.0.

    echo “gtk-icon-theme-name = \”Humanity\”” >> /etc/gtk-2.0/gtkrc

The above command globally set the theme to Humanity. The command is appended if the file exists, and creates it if not.


Wireshark Privileges

30 October 2014

Reconfigure wirehsark-common so that it allows non-root users to access the interface. Add the user to the wireshark group.

dpkg-reconfigure wireshark-common
usermod -a -G wireshark <user>

Done.


Flash Fullscreen Focus Fix

28 October 2014

To force flash to not exit full screen when focus is lost, edit the NET_ACTIVE_WINDOW, in libflashplayer.so

sudo sed -i 's/_NET_ACTIVE_WINDOW/__ET_ACTIVE_WINDOW/g' /usr/lib/firefox-addons/plugins/libflashplayer.so

GOOMWWM Keybinding

15 July 2014

Keyboard shortcuts become a thing of the past when you’re running a minimal window manager such as GOOMWWM. I decided to use XBindKeys, a grabbing keys program for X.

XBindKeys uses a configuration file, located at $HOME/.xbindkeysrc.

Contents of my .xbindkeysrc

"gnome-terminal"
  Mod2 + F12

You can create your own config, or have a default one generated for you.

xbindkeys --defaults > $HOME/.xbindkeysrc 

To get the correct key codes, you can use -k to identify key presses. It will open a blank window and output the command to be placed into your configuration file.

xbindkeys -k

XBindKeys should be easily found in your package manager.


iptables pcap log

23 March 2014

ULOG is the netfilter/iptables logging daemon. It connects to the netlink device of the Linux kernel and reads messages from the netfilter that get queued with the iptables ULOG target. It can output to plain text, MySQL, Postgres and PCAP.

Install with:

apt-get install ulogd-pcap 

Configure ulogd to output in PCAP format

 vim /etc/ulogd.conf

Un-comment plugin="/usr/lib/ulogd/ulogd_PCAP.so", restart ulog. Then add a log rule to iptables before the final drop rule.

-A INPUT -j ULOG

The PCAP log file should be located at /var/log/ulog/pcap.log


LaTeX Install .cls

20 March 2014

Installing a LaTeX class in three simple steps.

locate article.cls

Copy your .cls file to the same directory.

sudo cp yourclsfile.cls /usr/share/rest/of/the/path/from/above

Update the kpathsea database.

sudo texhash