Both controllers use Bluetooth, so two player wire-free gaming is
possible. The USB cables are just for charging, but if you’ve got no
charge they can be used as wired controllers too. Retropie can be
controlled via the controllers, no keyboard/mouse required.

I recently bought the Nextcloud Box. When
it came to setting it up I ran into a problem, I only had Raspberry Pi 3
computers available and at the time of writting the microSDHC card
provided with the Nextcloud Box only supports the Raspberry Pi 2. Bummer!

Overview

Ubuntu Core is a tiny, transactional version of Ubuntu for IoT devices and large container deployments. It runs a new breed of super-secure, remotely upgradeable Linux app packages known as snaps

After following this guide Ubuntu Core and any installed snaps (and
their data) will reside on the SD card and the 1TB hard disk in the
Nextcloud box will be available for file storage. This
guide explains how to:

Install and configure Ubuntu Core 16 for the Raspberry Pi 3

Format the 1TB hard disk in the Nextcloud Box and auto-mount it

Install the Nextcloud snap and connect the removable-media interface to allow access to the hard disk

Activate and configure the Nextcloud External Storage app so the hard disk can be used to store files

Optional configuration of Email and HTTPS for Nextcloud

Prepare a microSDHC card

I explained the main steps in this post but you really should read and
follow the Get started with a Raspberry Pi 2 or 3
page as it fully explains how to use a desktop computer to download an
Ubuntu Core image for your Raspberry Pi 2 or 3 and copy it to an SD card
ready to boot.

Here’s how to create an Ubuntu Core microSDHC card for the Raspberry Pi
3 using an Ubuntu desktop:

You’ll need a keyboard and monitor connected to the Raspberry Pi 3 to go complete the first boot process and device configuration.

Insert the Ubuntu Core microSHDC into the Raspberry Pi, which should be
in the assembled Nextcloud Box
with a keyboard and monitor connected. Plug in the power.

The system will boot then become ready to configure

The device will display the prompt “Press enter to configure”

Press enter then select “Start” to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials

At the end of the process, you will see your credentials to access your Ubuntu Core machine:

This device is registered to <Ubuntu SSO email address>.
Remote access was enabled via authentication with the SSO user <Ubuntu SSO user name>
Public SSH keys were added to the device for remote access.

Login

Once setup is done, you can login to Ubuntu Core using ssh, from a
computer on the same network, using the following command:

ssh <Ubuntu SSO user name>@<device IP address>

The user name is your Ubuntu SSO user name.

Reconfiguring network

Should you need to reconfigure the network at a later stage you can do
so with:

sudo console-conf

Prepare 1TB hard disk

Log in to your Raspberry Pi 3 running Ubuntu Core via ssh.

ssh <Ubuntu SSO user name>@<device IP address>

Partition and format the Nextcloud Box hard disk

This will create a single partition formatted with the ext4 filesystem.

If Let’s Encrypt didn’t work for you, you can always use Nextcloud with
a self-signed certificate.

sudo nextcloud.enable-https -s

Manual configuration changes

If you need to make any tweaks to the Nextcloud configuration file you
can edit it like so:

sudo vi /var/snap/nextcloud/current/nextcloud/config/config.php

If you have manually editted the Nextcloud configuration you may need to
restart nextcloud:

sudo snap disable nextcloud
sudo snap enable nextcloud

Conclusion

So there it is, Nextcloud running on Ubuntu Core powered by a Raspberry
Pi 3. The performance is reasonable, obviously not stellar, but certainly
good enough to move some cloud services for a small family away from the
likes of Google and Dropbox. Now go and install some
Nextcloud clients for your desktops and devices :-)

Enable Power Saving via udev

The following rules file /etc/udev/rules.d/90-local-n54l.rules enables
power saving modes for all PCI, SCSI and USB devices and ASPM. Futher
the internal Radeon card power profile is set to low as there is rarely
a monitor connected. The file contains the following:

Conclusion

With these settings applied powertop reports everything that can be in
a power saving mode is and the room temperature is measurably cooler.
More importantly, with four 4TB drives in a RAID-5 configuration
formatted with XFS and dual bonded gigabit ethernet, I am able to backup
data to the server at a sustained rate of 105MB/s, which is 0.85 Gbit.

I spoke about this new system on LINUX Unplugged Episode 122
and have been contacted by people wanting more details. Hopefully this
blog post will answer any outstanding questions. Press play below to
hear to what I said on the podcast.

The SSDs

This is where you might need to do some more research. At the
time of writing, it is not possible to boot directly from the Samsung
SM951 NVMe SSD. Although other quad channel NVMe SSDs do appear to be
supported as the boot device. It is possible that the Samsung SSD 950 Pro,
which is also NVMe, can be used as the boot device in Linux, but don’t
take my word for it. Do your research.

My work around was make the SanDisk Ultra II the boot device by putting
/boot and the MBR on it. I have put / and swap (swap because I
want to experiment with suspend and hibernate) are on the Samsung SM951
and /home is on the SanDisk Ultra II.

There are faster SSDs than the SanDisk Ultra II but this was 50% off
during Black Friday and just too good a deal to pass by. I did
sacrifice a little performance on this component, so if absolute
performance is your goal look at alternative SSDs, the Samsung 850 EVO
seems to benchmark favourably.

The Monitor

A week after I purchased the NUC I noticed ebuyer.com
were selling the monitor I wanted with a £100 discount. So I snapped one up.

The NUC is connected via mini Display Port and my Dell Precision T7400
is connected via HDMI. The Samsung S27D850T has an audio out and a 2.1
speaker set is connected to it.

Conclusion

I’m extremely happy with the NUC5I7RYH.
Linux compatibility is first class, it’s fast and has relatively low
power consumption. You can even charge a mobile phone using one of the
front USB ports (the yellow one) when the NUC is powered off. It is my
principle workstation and is able to handle everything I demand from it,
with ease:

Nikola is a static site and blog generator written in
Python that I’ve been using for a good while now.
This blog post describes how to install Nikola on
Ubuntu 14.04 or newer. Now, this may look like a long winded way to install
Nikola, given that .deb package exist, but in my opinion it is the correct way
to install Nikola on Ubuntu.

The Snakepit

Create a virtualenv for Nikola

The following will create a new virtualenv called nikola based on Python 3.4.

virtualenv -p /usr/bin/python3.4 ~/Snakepit/nikola-773

Working on a virtualenv

To activate the virtualenv do the following.

source ~/Snakepit/nikola-773/bin/activate

Your shell prompt will change while a virtualenv is being worked on to
indicate which virtualenv is currently active.

While working on a virtualenv you can pip install what you need or manually
install any Python libraries safe in the knowledge you will not adversely
damage any other virtualenvs or the global packages in the process. Very
useful for developing a new branch which may have different library
requirements than the master/head.

When you are finished working in a virtualenv you can deactivate it by
simply executing deactivate.

What are these requirements for?

The following are required to build pillow, the Python imaging library.

liblcms2-dev

libfreetype6-dev

libjpeg8-dev

libopenjp2-7-dev

libtiff5-dev

libwebp-dev

zlib1g-dev

The following are required to build lxml, a Python XML library.

libxml2-dev

libxslt1-dev

The following are required to build python-coveralls.

libyaml-dev

The following are required to build pyzmq.

libzmq-dev

Install Nikola

First install Cython, which will ensure some of the packages required by Nikola use
all the available optimisations.

pip install --upgrade Cython

Install all of Nikola.

pip install --upgrade "Nikola[extras,tests]"

Create a site

After installing Nikola, you should create a site. A site is a collection of
all assets needed to render your website, including configuration, posts,
pages, images, and all other files and customizations.

To create a site, you need to run:

nikola init <directory_name>

A wizard will guide your initial setup The --demo option can be used to populate
your site with some example content. If you do not want the wizard, use the --quiet
argument.

Nikola is now installed and and initial site is setup. nikola help and the
Nikola Handbook will assist you from here.

Willie is an IRC bot written in
Python that I’ve recently started using.
This blog post describes how to install Willie
on Debian and as usual I will be using virtualenv to isolate this
Python application from the rest of the system.

The Snakepit

Create a “Snakepit” directory for storing all the Python virtual environments.

mkdir ~/Snakepit

Create a virtualenv for Willie

The following will create a new virtualenv called willie using Python
2.7 as the interpreter.

virtualenv -p /usr/bin/python2.7 ~/Snakepit/willie

Working on a virtualenv

Activate the virtualenv for Willie.

source ~/Snakepit/willie/bin/activate

Your shell prompt will change, something like (willie)[email protected]:~$,
while a virtualenv is being worked on to indicate which virtualenv is
currently active.

While working on a virtualenv you can pip install what you need or
manually install any Python libraries safe in the knowledge you will
not upset any other virtualenvs or the global packages in the process.
Very useful for developing a new branch which may have different
library requirements than the current stable release.

When you are finished working in a virtualenv you can deactivate it by
simply executing deactivate.

Install Willie

I’ve decided to use Python 2.7 to run Willie and therefore have to
install backports.ssl_match_hostname which is not required if you use
Python 3.3.

pip install willie backports.ssl_match_hostname

Additional functionality

Willie has no external dependencies, besides Python. However, some of
the modules do have external dependencies. So install the following
Python modules so that I can make use of everything Willie can do.

[core]nick=nicofyourbotuser=nicofyourbotname=Give You Bot A Namehost=chat.freenode.netuse_ssl=trueverify_ssl=trueport=6697owner=nicofthebotownerchannels=#examplenickserv_password=************prefix=\.timeout=120[db]userdb_type=sqliteuserdb_file=/home/username/.willie/willie.db

Willie as a daemon

From this point on I assume you’ve completed the first run
configuration of Willie and have .willie/default.cfg in your home directory.

I have been using the BIP
IRC proxy that maintains a persistent connection(s) to a list of IRC channels.
However, I’ve heard good things about ZNC and decided to give it
a try.

The purpose of an IRC proxy, or bouncer, is that you can then point your IRC
clients to them to maintain a transparent connection from multiple clients
and playback the conversations that took place while you were away.

Installing ZNC

The ZNC package for Debian Wheezy are very old, so I decide to install
from source.

Install required packages

We first need to make sure we have all the packages required to build ZNC.

After you’ve created the script, you must give it the proper permissions to run
and add the script to the startup/shutdown sequence.

sudo chmod 755 /etc/init.d/znc
sudo update-rc.d znc defaults

Start the service:

sudo service znc start

Stop the service:

sudo service znc stop

Web configuration

I love that ZNC comes bundled with a web based configuration tool. Just
login to https://znc.example.org:7778 to add users, add networks to
users and to add channels to networks. Really simple stuff.

IRC client configuration

I use HexChat, but other IRC clients are
available. Just add a new Network to HexChat for your ZNC server, use the
username, suffixed with the network name you configured in ZNC, and your ZNC password.

Conclusion

I much prefer ZNC to BIP.

I really like the web and IRC configuration but I still have the option to
configure the config files directly.

ZNC is far less cryptic with regard to setting up IRC client connections and
user management is much better implemented.

When I add a new channel to an existing network in ZNC it automatically appears
in my connected clients without the need to restart anything.

ZNC’s IRC backlogs don’t have the confusing double time stamps present in BIP
and ZNC is much faster re-establishing connections to my multiple IRC network and channels.

I have a few Debian servers that run at home and on VPSs. I wanted to add
some basic systems monitoring to them, but didn’t want anything too
complicated to look after. I found Monitorix.

Monitorix is a free, open source, lightweight system monitoring tool
designed to monitor as many services and system resources as possible.
It has been created to be used under production Linux/UNIX servers,
but due to its simplicity and small size can be used on embedded devices
as well.

Install Monitorix

This install has been tested on Debian Squeeze and Wheezy. First install
the dependencies.

References

Last year I removed all my music from Google Play Music and created my
own subSonic server. I really
like subSonic but don’t use it a huge amount, mostly for syncing some
music to my phone prior to going on holiday or business. Therefore, I’ve
made a single one time donation to the project rather than the ongoing
monthly usage fee.

References

I have a Brother MFC-7360N printer at home and there is also one at work.
I wanted to to get Cloudprint
working with Android devices rather than use the Android app Brother
provide, which is great when it works but deeply frustrating (for my wife)
when it doesn’t.

What I describe below is how to Cloudprint enable “Classic printers” using
Debian Wheezy.

Add the MFC-7360N to CUPS.

If your MFC-7360N is connected to your server via USB then you should be
all set. Login to the CUPS administration interface on
http://yourserver:631 and modify the MFC7360N printer (if one was
created when the drivers where installed) then make sure you can print
a test page via CUPS before proceeding.