I supported the new Linux Voice magazine with their Indegogo campaign and have just received the first digital issue. It is awesome and a great read. Given that the team is made up of mostly of ex-Linux Format employees, it shares some similarities. Well done Linux Voice!
Year: 2014
How to setup VPN connection Oxford University Ubuntu (Linux)
I needed to connect to Oxford University via a VPN connection from my Ubuntu 13.10 laptop. They have some instructions by they are quite complicated and not very clear. Here is how I did it:
1 – Install a Cisco compatiable VPN Client
Oxford University uses the Cisco VPN. You can install this directly from the repositories.
sudo apt-get install network-manager-vpnc vpnc <code>network-manager-vpnc-gnome</code></pre> <pre>
2 – Update the VPN service
sudo nano /etc/dbus-1/system.d/nm-vpnc-service.conf
Add a new policy before the </busconfig>
<policy at_console="true"> <allow own="org.freedesktop.NetworkManager.vpnc"/> <allow send_destination="org.freedesktop.NetworkManager.vpnc"/> </policy>
You can save and close nano by ctrl-o (for saving files) and ctrl-x (for exiting).
3 – Get the settings…
Go to https://register.it.ox.ac.uk/self/index and follow these steps to get the settings. Note: you will need to login using your account details (these will be the same as your emails etc).
Login then select “Register for and download site-licensed software (Sophos, VPN)”
Select “VPNC Client for Linux/Unix”
Client the “vpnc configuration file”
… and up pops this window.
You will need all this information for the following steps.
4 – Configure the VPN Connection Locally
Click on the network icon at the top right of the screen. Select VPN connections -> Configure VPN…
In the Network Connections dialog box – click “Add”
Select “Cisco Compatitble VPN (vpnc)”. It you can’t see this option then you need to go back and install the VPNC client.
Fill in the fields as show below. You will need your University login and also the setting which we found before.
Then click “Save”. You can connect…
5 – Connect…
Click on the network icon and under “VPN Connections” – select the VPN connection that you have just created. The network icon will pulse and you should see this icon:
Let me know if this works or doesn’t work for you.
Happy VPN’ing.
Ansible Diff Function
Ansible is a great tool for configuring servers. I only recently discovered the Ansible diff argument which can be used to check what changes are going to be made for a file. If you use this with the –check flag you can see what changes will be applied. I find this especially useful when coming back to a project after a break.
ansible-playbook paybook.yml –check –diff –limit my.example.com
You can read the Ansible docs on this here:
Awesome.
ImportError: No module named interactive Paramiko
If you have cut a pasted the demo.py script from Paramiko to test is working on your server then you might get this error:
import interactive ImportError: No module named interactive
There isn’t a python module called interactive – you need to download the interactive.py file which is included in the same folder as the demo application.
How to get Airplay to work on a ddwrt router
I just brought an Airplay device (an Audio Pro Allroom Air One) because I wanted to stream music from my iPhone and Synology NAS.
I followed the installation instructions and connected the Airplay device to the network. The device appeared as an option when playing music on the phone. However, the streaming started and after about 5 seconds the network crashed and music stopped playing.
I logged into the router and checked the signal strength:

I knew it was a network crash because everything got kicked off. My Ubuntu laptop, the Airplay device and the phone all lost network connection.
The Solution
Step 1 – Disable the SPI Firewall.
On your router, go to Security -> Firewall. Disable the SPI Firewall, save changes and then apply them.

Step 2 – Change Network Security from WPA (TKIP) to WPA (AES)
Some of posts on Apples website suggest that changing from TKIP to AES will reduce the network crashes and this seems to be the case for me. To change this setting go to Wireless -> Security and select AES. Then save and apply changes. I found that I had to reconnect the AudioPro device to the network after making this change.
Step 3 – Enable JIFFS2
I have no idea why enabling jiffs2 would make a difference but it seems to. On the router, go to Administration -> Management and stroll near the bottom to enable jiffs.
…
Does this work for you?
If this works for you or if you find another way to stop Airplay freezing / killing your network then please let me know by leaving a comment.
How to find what dns server your using Ubuntu
If you need to know what dns servers you are using on Ubuntu then this command will help:
nm-tool | tail -n 8
How to rotate a PDF from the command line using Ubuntu / Linux
You might want rotate an image from the command line using the command line in Ubuntu. This is really usefull if you are stripting pdf manipulations.
sudo apt-get install pdftk
Then
pdftk input.pdf cat 1east output output.pdf
Happy rotating.
How to test if Bacula-fd is running
I just installed a new Bacula client but for some reason the server could not connect to it. I found this out by trying to get the status of the client on the server with the following command:
sudo bconsole status client=my.client-rd
Here is the things that I checked on the server.
Step 1 – Check that the service bacula-fd is started:
sudo service bacula-fd status
Step 2 – Check the bacula-fd process is bound to the port 9102
sudo netstat -an|grep 9102
Step 3 – Check that you can telnet into the client port from the server.
telnet ip.ad.dr.ess 9102
I found the the client configuration did have the correct client ipaddress but each of these checks enabled me to narrow down the problem.
The Teamviewer daemon is not running – please start the daemon ubuntu
I have just started using Teamviewer on Ubuntu 13.10 to help a few people setup some software on their computers. When I try and launch it pops up a dialogue saying:
The TeamViewer daemon is not running!
Please start the daemon (needs root permissions) before running TeamViewer
teamviewer –daemon start
….
Trying “sudo teamviewer –daemon start” doesn’t actually do anything – so the solution is to:
sudo teamviewer --daemon enable
php ini_set(“memory_limit”) isn’t working at all
If you are trying to set your php memory limit at the top of a php script using the php int_set() and it doesn’t appear to have any affect then there is a chance that you have the PHP Suhosin security extension installed. Suhosin stops a script from being able to increase the memory limit.
If you have the Suhosin extension installed then simply edit /etc/php5/conf.d/suhosin.ini and change:
;suhosin.memory_limit = 0
To:
suhosin.memory_limit = 1G
Or however much memory you would like to allow for the script. Then restart nginx / or apache.
sudo service apache2 restart
Note – if you use int_set() and attempt to set a higher memory limit than allowed in the suhosin settings then it will no have any affect at all.