BIP IRC proxy

BIP is an IRC proxy that maintains a persistent connection(s) to a list of IRC channels. You can then point your IRC client to BIP each time you log in and playback the conversations that took place while you were away.

I’ve found bBIP to be so useful that I now maintain BIP for Arch Linux, although I now run my BIP proxy on Debian because my new VPS provider doesn’t offer Arch Linux as an option.

Installing BIP

Installing BIP is simple for both Arch Linux and Debian.

Debian

I run BIP on Debian Wheezy with the backport repository enabled.

sudo apt-get -t wheezy-backports install bip
sudo sed -i 's/ENABLED=0/ENABLED=1/' /etc/default/bip

Arch Linux

pacman -S bip
systemctl enable bip

Create a user

The next thing to do is create a username and password and BIP provides it’s own utility for doing this called bipmkpw. Replace ‘username’ with whatever you want your BIP ‘username’ to be. This name has no relation to any IRC usernames so it can be anything.

bipmkpw username

Enter a password when prompted. The password will then be output as a hash. Make a note of both the hashed and un-hashed values somewhere, you will need them later.

Create a certificate

We don’t want the username and password being sent as clear-text, so we will create an SSL certificate for BIP to use.

openssl req -new -newkey rsa:4096 -nodes -x509 -keyout bip.pem -out bip.pem

Move the certificate to /var/lib/bip

sudo mv bip.pem /var/lib/bip

Change ownership and permissions of the certificate to the user bip which was created automatically when the package was installed.

sudo chown bip:bip /var/lib/bip/bip.pem
sudo chmod 600 /var/lib/bip/bip.pem

Configure BIP

Here is example configuration for BIP. Copy it to /etc/bip.conf, modify it accordingly and then change the ownership and permissions.

sudo chown bip:bip /etc/bip.conf
sudo chmod 640 /etc/bip.conf

Example configuration

# bip default config file.
# Thou shoult change thy password

ip = "0.0.0.0";

# To connect a client to bip, try the port below, and
# be sure to set the password to the value
# specified in the network you want to connect to. 
port = 7778;

# If you set this to true, you'll only be able to connect to bip
# with a SSL capable IRC client. Be sure to generate a certificate
# for bip with 'make cert'
client_side_ssl = true;

log_level = 3;

pid_file="/var/run/bip/bip.pid";

# This is where logs go. Channel and private messages will use that
# configuration value as a prefix, and then log_format to determine
# full log filename.
log_root = "/var/log/bip/";

# Log format allows you to make log filenames depend on the log line's
# attributes. Here's a list :
# %u -> user name
# %n -> network name
# %Y -> 4 digit year
# %m -> 2 digit month
# %d -> 2 digit day
# %c -> destination (#chan, privates, ...)
#log_format = "%n/%Y-%m/%c.%d.log";

# Sets the frequency (in seconds) of log syncing (real write to kernel)
#log_sync_interval = 5;

# Makes bip send the log of each channel and privates while
# you were not connected to the proxy upon connection. 
backlog = true;         # enable backlog
backlog_lines = 0;      # number of lines in backlog, 0 means no limit
backlog_always = false; # backlog even lines already backlogged

# If blreset_on_talk talking on an irc network has the same effect of issuing
# /bip blreset, meaning that stuffed logged before the command won't be read
# back on backlog
blreset_on_talk = true;

# Network definition, a name and server info
network {
    name = "freenode";
    server { host = "chat.freenode.net"; port = 6667; };
};

network {
    name = "blitzed";
    server { host = "irc.blitzed.org"; port = 6667; };
};

# Configuration example with one user who connects to two irc networks
# To use the multi-server feature:
#  - define the connections
#  - chose and setup a different login for each connection
# on your irc client:
#  - Use the multi server feature of your client, the server being each time
#    the server where bip is running. In your client setup server password to:
#      username:password:connectionname
#  - do not store the password in clear here, use the bipmkpw util to generate
# a hash

# User structure is grouping information for a given user
user {
    # The name in bip of the user
    # This is used by bip only
    name = "USERNAME;   #BIP User account created with bipmkpw
    password = "00000000000000000000000000000000000000";  # the hash bipmkpw created 
    ssl_check_mode = "none";

    # These will be the default for each connections
    default_nick = "NICKNAME";        #IRC Nick
    default_user = "IRCUSERNAME";     #IRC User
    default_realname = "REALNAME";    #IRC Real Name

    admin = true;
    backlog_msg_only = true;    # When true,

    # A user can have mutiple connections to irc networks.
    # define a connection:

    connection {
        name = "freenode";      # used by bip only
        network = "freenode";   # which ircnet to connect to

        # these will be sent to the real IRC server
        user = "IRCUSERNAME";
        realname = "IRCREALNAME";
        password = "serverpassword";  #can be commented out if not needed

        # Some options:
        follow_nick = true;
        ignore_first_nick = false;
        #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword";

        # Autojoined channels:
        channel { name = "#cat"; };                   # Join #cat
        channel { name = "#dog"; backlog = false; };  # Join #dog but don't backlog it.
        channel { name = "#pig"; key = "01nk01nk"; }; # Join #pig that has a password.
    };

    connection {
        name = "blitzed";       # used by bip only
        network = "blitzed";    # which ircnet to connect to

        # these will be sent to the real IRC server
        user = "IRCUSERNAME";
        realname = "IRCREALNAME";
        password = "serverpassword";  #can be commented out if not needed

        # Some options:
        follow_nick = true;
        ignore_first_nick = false;
        #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword";

        # Autojoined channels:
        channel { name = "#bar"; };
        channel { name = "#foo"; };
    };
};

If you require any clarification about what the configuration options do then man bip.conf is your friend.

Start BIP

Now that BIP is configured, it can be started.

Debian

sudo /etc/init.d/bip start

Arch Linux

sudo systemctl start bip

Client configuration

I use HexChat, but other IRC clients are available. I add a new Network to HexChat for each of the IRC networks I defined in /etc/bip.conf. The screen shot below shows how I configure a BIP network in HexChat.

HexChat BIP Configuration

Password format

The Password is the most important and confusing item. This is for BIP, not for any IRC network. Remember the unhashed password? That goes here but with a twist. The format for the password is:

bipusername:unhashedbippassword:bipnetwork

Bipnetwork? What is that? It is from the following section of /etc/bip.conf on the server?

network {
    name = "freenode";
    server { host = "chat.freenode.net"; port = 6667; };
};

A more practical example:

myuser:S3cr3tP@$$w0rd:freenode

Conclusion

And that’s it! We are now perpetually connected to IRC, can connect to BIP proxy from multiple devices in a completely transparent and seamless manner. Moreover, the logs for all channels are saved and automatically rotated on the server.

If you looking for an alternative to BIP, then try ZNC.

References

LXC on Arch Linux

At some point last year I was experimenting with Linux Containers (LXC) on Arch Linux. I never finished the blog post but somehow it was briefly published and then unplublished. I have no idea how accurate this blog post is but someone did see it and bookmarked it. They recently emailed me to ask where the blog has disappeared to, so here it is in all its unfinished glory.

Install LXC

sudo pacman -Syy --needed --noconfirm arch-install-scripts bridge-utils lxc netctl

netctl Bridge

The guest containers will connect to the LAN via a bridged network deviced.

sudo nano /etc/netctl/bridge

Add the following.

Description="Bridge"
Interface=br0
Connection=bridge
BindsToInterfaces=(eth0)
IP=dhcp
## sets forward delay time
FwdDelay=0
## sets max age of hello message
#MaxAge=10

Enable and start the bridge.

sudo netctl enable bridge
sudo netctl start bridge

Creating Containers

I’m only interetsed in running Arch Linux or Debian containers.

Container Configurations

Each container should have a matching configuration file, they look something like this.

lxc.arch = i686
lxc.utsname = myhostname
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 0.0.0.0
lxc.network.name = eth0
  • lxc.arch Architecture for the container, valid options are x86, i686, x86_64, amd64.
  • lxc.utsman Container name, should also be used when naming the configuration file
  • lxc_network.type Type of network virtualization to be used for the container. The option veth defines a peer network device. It is created with one side assigned to the container and the other side is attached to a bridge by the lxc.network.link option.
  • lxc_network.flags Network actions. The value up in this case activates the network.
  • lxc.network.link Host network interface to be used for the container.
  • lxc.network.ipv4 IPv4 address assigned to the virtualized interface. Use the address 0.0.0.0 to make use of DHCP. Use lxc.network.ipv6 if you need IPv6 support.
  • lxc.network.name Dynamically allocated interface name. This option will rename the interface in the container.

More example files can be found in /usr/share/doc/lxc/examples/. Find details about all options via man lxc.conf.

Arch Linux

sudo lxc-create -t archlinux -n arch-01 -f ~/arch-01.conf -- --packages netctl

I am unable to get DHCP to work for a Arch Linux LXC container, therefore my dirty hack is to alway use a statis IP address in the netctl profile. There is also a bug (#35715) was helpful in narrowing down the problem, but wasn’t the solution in my case. Use /var/lib/lxc/CONTAIN_NAME/rootfs/etc/netctl/example/ethernet-static as a template.

sudo cp /var/lib/lxc/CONTAIN_NAME/rootfs/etc/netctl/example/ethernet-static /var/lib/lxc/CONTAIN_NAME/rootfs/etc/netctl/static

Modify /var/lib/lxc/CONTAIN_NAME/rootfs/etc/netctl/static accordingly. Now create a hook, with the same name as the netctl profile.

sudo nano /var/lib/lxc/CONTAIN_NAME/rootfs/etc/netctl/hooks/static

Add the following.

1
2
3
4
5
6
#!/usr/bin/env bash

if [[ $(systemd-detect-virt) != none ]]; then
    BindsToInterfaces=()
    ForceConnect=yes
fi

Start the container and enable the netctl profile.

netctl enable static
netctl start static

Debian Containers.

Install debobootstrap and dpkg so that Debian containers can be created.

packer -S --noedit dpkg debootstrap

Squeeze

Create a Debian container, squeeze is the default.

sudo lxc-create -t debian -n squeeze-01 -f ~/squeeze-01.conf

Change the root password.

chroot /var/lib/lxc/squeeze/rootfs/ passwd

Wheezy

Much the same as the Squeeze exaple above but use the following template.

Using containers

Start a container

sudo lxc-start -d -n CONTAINER_NAME

Connect to the container and log in:

sudo lxc-console -n CONTAINER_NAME

To halt a container cleanly by the containers initv-system:

sudo lxc-halt -n CONTAINER_NAME

Stop and remove your container always with the two steps:

sudo lxc-stop -n CONTAINER_NAME
sudo lxc-destroy -n CONTAINER_NAME
References

Installing Nikola on Debian

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 Debian. Now, this may look like a long winded way to install Nikola, given that Debian .deb package exist, but in my opinion it is the correct way to install Nikola on Debian.

Installing Python

First you’ll need Python and virtualenvwrapper

sudo apt-get install libpython2.7 python2.7 python2.7-dev python2.7-minimal

Remove any apt installed Python packages that we are about to replace. The versions of these packages in the Debian repositories soon get stale.

sudo apt-get purge python-setuptools python-virtualenv python-pip python-profiler

Install pip.

wget https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py

Use pip to install virtualenv and virtualenvwrapper.

sudo pip install virtualenv --upgrade
sudo pip install virtualenvwrapper

The Snakepit

Create a “Snakepit” directory for storing all the virtualenvs.

  mkdir ~/Snakepit

Add the following your ~/.bashrc to enable virtualenvwrapper.

export WORKON_HOME=${HOME}/Snakepit
if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then
    source /usr/local/bin/virtualenvwrapper.sh
elif [ -f /usr/bin/virtualenvwrapper.sh ]; then
   source /usr/bin/virtualenvwrapper.sh
fi

Create a virtualenv for Nikola

Open a new shell to ensure that the virtualenvwrapper configuration is active.

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

mkvirtualenv -p /usr/bin/python2.7 ~/Snakepit/nikola-640

Working on a virtualenv

To workon, or activate, an existing virtualenv do the following.

workon nikola-640

You can switch to another virtualenv at any time, just use workon envname. 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.

Install Nikola requirements

Nikola is will be powered by Python 2.7 and some additional packages will be required.

sudo apt-get install python2.7-dev libfreetype6-dev libjpeg8-dev libxslt1-dev libxml2-dev libyaml-dev

What are these requirements for?

  • python2.7-dev provides the header files for Python 2.7 so that Python modules with C extensions can be built.

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

  • libjpeg8-dev
  • libfreetype6-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

Install Nikola

Download Nikola.

mkdir -p ${VIRTUAL_ENV}/src
cd ${VIRTUAL_ENV}/src
wget https://github.com/getnikola/nikola/archive/v6.4.0.tar.gz -O nikola-640.tar.gz
tar zxvf nikola-640.tar.gz
cd nikola-6.4.0

Install the Nikola requirements.

pip install -r requirements-full.txt

If you intend to use the Nikola planetoid (Planet generator) plugin you’ll also need to following.

pip install peewee feedparser

Actually install nikola.

python setup.py install

Nikola is now installed. nikola help and the Nikola Handbook will assist you from here on.

Memory consumption of Linux desktop environments

Note Updated on June 3rd 2014 and now includes LXQt and Unity.

For the last 9 months or so I’ve spent my spare time working with the MATE Desktop Team. Every so often, via the various on-line MATE communities, the topic of how “light weight” MATE is when compared to other desktop environments crops up and quite often XFCE is suggested as a lighter alternative. After all MATE and XFCE both provide a traditional desktop environment based on GTK+ so this suggestion is sensible. But is XFCE actually “lighter” than MATE?

I’ve found MATE to be (subjectively) more responsive that XFCE and there have been two recent blog posts that indicate MATE has lower memory requirements than XFCE.

Given that I’m comfortably running MATE on the Raspberry Pi Model B (which has just 512MB RAM) I’ve been stating that MATE is well suited for use on resource constrained hardware and professional workstations alike. This is still true, but I’ve also said that MATE is lighter than XFCE and I might have to eat humble pie on that one.

The topic of measursing desktop environment resource use came up on the #archlinux-tu IRC channel recently and someone suggested using ps_mem.py to gather the memory usage data. ps_mem.py provides a far more robust mechanism for gathering memory usage data than I’ve seen in previous comparisons.

So the seed was planted, I created a bunch of VirtualBox guest machines and set to work comparing the memory requirements of all the Linux desktop environments I could.

Damn it, just tell me what the “lightest” desktop environment is!

OK, for those of you who just want the final answer, with none of the explaination, here it is:

| Desktop Environment  | Memory Used |
| ---------------------|------------:|
| Enlightenment 0.18.8 |    83.8 MiB |
| LXDE 0.5.5           |    87.0 MiB |
| XFCE 4.10.2          |   110.0 MiB |
| LXQt 0.7.0           |   113.0 MiB |
| MATE 1.8.1           |   123.0 MiB |
| Cinnamon 2.2.13      |   176.3 MiB |
| GNOME3 3.12.2        |   245.3 MiB |
| KDE 4.13.1           |   302.6 MiB |
| Unity 7.2.0.14       |   312.5 MiB |

Bullshit! How did you come up with these numbers?

TL;DR

All the VirtualBox VMs are 32-bit with 768MB RAM and based on the same core Arch Linux installation. I achieved this using my ArchInstaller script which is designed for quickly installing reproducible Arch Linux setups.

Each VM differs only by the packages that are required for the given desktop environment. The desktop environments native display manager is also installed but if it doesn’t have one then lightdm was chosen. LXDE, XFCE, MATE, Cinnamon and GNOME all have gvfs-smb installed as this enables accessing Windows and Samba shares (a common requirement for home and office) in their respective file managers and the KDE install includes packages to provide equivalent functionality. You can see the specific desktop environment packages or package groups that were installed here:

Each VM was booted, logged in and any initial desktop environment configuration was completed choosing the default options if prompted. Then ps_mem was installed, the VM shut down and a snapshot made.

Each VM was then started, logged in via the display manager, the desktop environment was fully loaded and waited for disk activity to settle. Then ps -efH and ps_mem were executed via SSH and the results sent back to my workstation. When the process and memory collections were conducted there had been no desktop interaction and no applications had been launched.

Your numbers are wrong I can get xxx desktop to run in yyy less memory!

Well done, you probably can.

Each virtual machine has VirtualBox guest additions, OpenSSH, Network Manager, avahi-daemon, ntpd, rpc.statd, syslog-ng and various other bits and bobs installed and running. Some of these are not required or have lighter alternatives available.

So, while I freely accept that each desktop environment can be run in less memory, the results here are relative to a consistent base setup.

However, what is important to note is that I think the Cinnamon results are too low. Cinnamon is forked from GNOME3 and the Arch Linux package groups for Cinnamon only install the core Cinnamon packages but none of the GNOME3 applications or components that would be required to create a full desktop environment.

So comparing Cinnamon with the other desktops in this test is not a fair comparison. For example, GNOME3 and KDE default installs on Arch Linux include all the accessibility extensions and applications for sight or mobility impaired individuals where as Cinnamon does not. This is just one example of where I think the Cinnamon results are skewed.

The RAM is there to be used. Is lighter actually better?

No, and Yes.

I subscribe to the school of thought that RAM is there to be used. But;

  • I want to preserve as much free RAM for the applications I run, not for feature bloat in the desktop environment. I’m looking at you KDE.
  • I want a fully integrated desktop experience, but not one that is merely lighter because it lacks features. I’m looking at you LXDE.
  • I want a consistent user interface that any of my family could use, not one that favours style over substance. I’m looking at you Enlightenment.

Another take on lightness is that the more RAM used, the more code that needs executing. Therefore, higher CPU utilisation and degraded desktop performance on modest hardware. This could also translate into degraded battery performance.

This is why I choose MATE Desktop. It is a fully integrated desktop environment, that is responsive, feature full, has reasonable memory requirements and scales from single core armv6h CPU with 512MB RAM to multi core x86_64 CPU with 32GB RAM (for me at least).

Without the full stats it never happened. Prove it!

He is the full data capture from ps_mem.py for each desktop environment.

Enlightenment

Private  +   Shared  =  RAM used    Program

172.0 KiB +  46.5 KiB = 218.5 KiB   dbus-launch
316.0 KiB +  40.0 KiB = 356.0 KiB   dhcpcd
336.0 KiB +  87.5 KiB = 423.5 KiB   rpcbind
560.0 KiB +  37.0 KiB = 597.0 KiB   crond
580.0 KiB +  54.0 KiB = 634.0 KiB   systemd-logind
688.0 KiB +  67.5 KiB = 755.5 KiB   systemd-udevd
480.0 KiB + 276.0 KiB = 756.0 KiB   avahi-daemon (2)
700.0 KiB + 133.5 KiB = 833.5 KiB   ntpd
768.0 KiB +  78.5 KiB = 846.5 KiB   VBoxService
580.0 KiB + 267.0 KiB = 847.0 KiB   tempget
544.0 KiB + 312.0 KiB = 856.0 KiB   enlightenment_start
764.0 KiB +  94.0 KiB = 858.0 KiB   rpc.statd
600.0 KiB + 280.5 KiB = 880.5 KiB   at-spi-bus-launcher
624.0 KiB + 298.0 KiB = 922.0 KiB   at-spi2-registryd
724.0 KiB + 309.5 KiB =   1.0 MiB   accounts-daemon
784.0 KiB + 386.5 KiB =   1.1 MiB   enlightenment_fm
952.0 KiB + 395.0 KiB =   1.3 MiB   efreetd
  1.0 MiB + 517.0 KiB =   1.5 MiB   dbus-daemon (3)
  5.3 MiB + -3781.0 KiB =   1.7 MiB udisksd
  1.2 MiB + 483.0 KiB =   1.7 MiB   (sd-pam) (2)
  1.6 MiB + 234.0 KiB =   1.9 MiB   syslog-ng
  1.1 MiB +   1.0 MiB =   2.1 MiB   systemd (3)
  1.4 MiB + 814.5 KiB =   2.2 MiB   lightdm (2)
  1.3 MiB +   1.1 MiB =   2.4 MiB   sshd (2)
  2.6 MiB + 575.5 KiB =   3.2 MiB   VBoxClient (4)
  2.4 MiB + 781.0 KiB =   3.2 MiB   NetworkManager
 10.9 MiB + -7741.5 KiB =   3.3 MiB polkitd
  6.2 MiB +  68.5 KiB =   6.3 MiB   systemd-journald
 11.3 MiB + -2300.0 KiB =   9.1 MiB nm-applet
 16.3 MiB + 426.0 KiB =  16.7 MiB   Xorg
 19.9 MiB +   1.5 MiB =  21.4 MiB   enlightenment
---------------------------------
                         89.6 MiB
=================================

LXDE

 Private  +   Shared  =  RAM used   Program

184.0 KiB +  45.0 KiB = 229.0 KiB   dbus-launch
320.0 KiB +  36.0 KiB = 356.0 KiB   dhcpcd
340.0 KiB +  83.0 KiB = 423.0 KiB   rpcbind
360.0 KiB +  78.0 KiB = 438.0 KiB   lxdm-binary
384.0 KiB +  93.5 KiB = 477.5 KiB   lxsession
580.0 KiB +  50.0 KiB = 630.0 KiB   systemd-logind
700.0 KiB +  55.0 KiB = 755.0 KiB   systemd-udevd
464.0 KiB + 297.0 KiB = 761.0 KiB   avahi-daemon (2)
  4.6 MiB + -3890.5 KiB = 821.5 KiB menu-cached
612.0 KiB + 213.0 KiB = 825.0 KiB   at-spi-bus-launcher
500.0 KiB + 328.0 KiB = 828.0 KiB   lxdm-session
768.0 KiB +  97.5 KiB = 865.5 KiB   rpc.statd
632.0 KiB + 251.5 KiB = 883.5 KiB   gvfsd
644.0 KiB + 244.5 KiB = 888.5 KiB   at-spi2-registryd
776.0 KiB + 189.0 KiB = 965.0 KiB   accounts-daemon
  4.8 MiB + -3888.5 KiB =   1.0 MiB gvfsd-fuse
884.0 KiB + 305.0 KiB =   1.2 MiB   gvfsd-trash
  1.1 MiB + 322.0 KiB =   1.4 MiB   udisksd
  1.1 MiB + 381.0 KiB =   1.5 MiB   upowerd
  1.1 MiB + 410.0 KiB =   1.5 MiB   gvfs-udisks2-volume-monitor
  1.0 MiB + 485.5 KiB =   1.5 MiB   dbus-daemon (3)
  1.2 MiB + 507.0 KiB =   1.7 MiB   (sd-pam) (2)
  1.6 MiB + 259.0 KiB =   1.9 MiB   syslog-ng
  1.2 MiB + 991.5 KiB =   2.1 MiB   systemd (3)
  1.3 MiB +   1.1 MiB =   2.4 MiB   sshd (2)
  1.5 MiB + 983.0 KiB =   2.4 MiB   lxpolkit
  6.3 MiB + -3414.0 KiB =   3.0 MiB NetworkManager
  3.3 MiB + 706.5 KiB =   4.0 MiB   openbox
  4.4 MiB +  59.5 KiB =   4.4 MiB   systemd-journald
  6.9 MiB + -1941.0 KiB =   5.0 MiB lxpanel
 12.9 MiB + -7745.0 KiB =   5.3 MiB polkitd
  3.6 MiB +   1.8 MiB =   5.4 MiB   pcmanfm
 11.5 MiB + -3637.5 KiB =   8.0 MiB ntpd
  7.1 MiB +   1.8 MiB =   9.0 MiB   nm-applet
 13.9 MiB + 604.5 KiB =  14.5 MiB   Xorg
---------------------------------
                         87.0 MiB
=================================

XFCE

 Private  +   Shared  =  RAM used   Program

176.0 KiB +  32.0 KiB = 208.0 KiB   dbus-launch
292.0 KiB +  26.5 KiB = 318.5 KiB   gpg-agent
316.0 KiB +  32.0 KiB = 348.0 KiB   dhcpcd
324.0 KiB +  81.0 KiB = 405.0 KiB   rpcbind
488.0 KiB +  96.0 KiB = 584.0 KiB   xfconfd
588.0 KiB +  47.0 KiB = 635.0 KiB   systemd-logind
464.0 KiB + 260.0 KiB = 724.0 KiB   avahi-daemon (2)
712.0 KiB +  49.0 KiB = 761.0 KiB   systemd-udevd
608.0 KiB + 173.0 KiB = 781.0 KiB   at-spi-bus-launcher
644.0 KiB + 169.5 KiB = 813.5 KiB   at-spi2-registryd
768.0 KiB +  57.5 KiB = 825.5 KiB   VBoxService
784.0 KiB +  55.5 KiB = 839.5 KiB   sh
640.0 KiB + 218.5 KiB = 858.5 KiB   gvfsd
764.0 KiB +  94.5 KiB = 858.5 KiB   rpc.statd
760.0 KiB + 160.0 KiB = 920.0 KiB   accounts-daemon
872.0 KiB + 174.0 KiB =   1.0 MiB   gvfsd-fuse
  4.8 MiB + -3831.0 KiB =   1.1 MiB gvfsd-trash
  1.1 MiB + 311.0 KiB =   1.4 MiB   upowerd
  1.1 MiB + 282.0 KiB =   1.4 MiB   tumblerd
  1.1 MiB + 289.0 KiB =   1.4 MiB   udisksd
  1.1 MiB + 369.0 KiB =   1.4 MiB   gvfs-udisks2-volume-monitor
  1.1 MiB + 353.0 KiB =   1.5 MiB   xfce4-notifyd
  1.2 MiB + 515.0 KiB =   1.7 MiB   (sd-pam) (2)
  1.3 MiB + 483.5 KiB =   1.8 MiB   dbus-daemon (3)
  1.6 MiB + 248.5 KiB =   1.9 MiB   syslog-ng
  1.5 MiB + 465.0 KiB =   1.9 MiB   Thunar
  5.4 MiB + -3457.5 KiB =   2.0 MiB lightdm (2)
  1.1 MiB + 992.5 KiB =   2.1 MiB   systemd (3)
  1.4 MiB + 695.5 KiB =   2.1 MiB   panel-6-systray
  1.6 MiB + 651.0 KiB =   2.3 MiB   xfce4-session
  1.3 MiB +   1.1 MiB =   2.3 MiB   sshd (2)
  1.9 MiB + 525.0 KiB =   2.4 MiB   xfsettingsd
  1.6 MiB + 903.0 KiB =   2.5 MiB   panel-2-actions
  6.3 MiB + -3505.0 KiB =   2.9 MiB NetworkManager
  2.6 MiB + 442.5 KiB =   3.0 MiB   VBoxClient (4)
  2.6 MiB + 624.5 KiB =   3.2 MiB   xfce4-power-manager (2)
  2.1 MiB +   1.1 MiB =   3.2 MiB   xfwm4
  3.1 MiB +   1.3 MiB =   4.4 MiB   xfce4-panel
  5.0 MiB +  61.5 KiB =   5.0 MiB   systemd-journald
 12.9 MiB + -7827.0 KiB =   5.3 MiB polkitd
  3.8 MiB +   1.6 MiB =   5.4 MiB   xfdesktop
  6.6 MiB +   1.3 MiB =   7.8 MiB   nm-applet
 11.5 MiB + -3643.5 KiB =   7.9 MiB ntpd
 23.0 MiB + -3258.0 KiB =  19.8 MiB Xorg
---------------------------------
                        110.0 MiB
=================================

LXQt

 Private  +   Shared  =  RAM used   Program

176.0 KiB +  35.0 KiB = 211.0 KiB   dbus-launch
320.0 KiB +  35.0 KiB = 355.0 KiB   dhcpcd
324.0 KiB +  83.0 KiB = 407.0 KiB   rpcbind
612.0 KiB +  51.0 KiB = 663.0 KiB   systemd-logind
460.0 KiB + 267.0 KiB = 727.0 KiB   avahi-daemon (2)
676.0 KiB +  53.0 KiB = 729.0 KiB   systemd-udevd
580.0 KiB + 179.0 KiB = 759.0 KiB   menu-cached (2)
768.0 KiB +  63.5 KiB = 831.5 KiB   VBoxService
604.0 KiB + 247.0 KiB = 851.0 KiB   at-spi-bus-launcher
768.0 KiB +  96.5 KiB = 864.5 KiB   rpc.statd
648.0 KiB + 231.5 KiB = 879.5 KiB   at-spi2-registryd
4.7 MiB + -3856.0 KiB = 976.0 KiB accounts-daemon
908.0 KiB + 396.0 KiB =   1.3 MiB   lxqt-globalkeysd
1.1 MiB + 425.0 KiB =   1.5 MiB   upowerd
1.1 MiB + 484.5 KiB =   1.6 MiB   dbus-daemon (3)
1.2 MiB + 551.0 KiB =   1.7 MiB   (sd-pam) (2)
1.6 MiB + 248.0 KiB =   1.9 MiB   syslog-ng
1.1 MiB + 998.5 KiB =   2.1 MiB   systemd (3)
1.3 MiB +   1.0 MiB =   2.3 MiB   sshd (2)
1.5 MiB + 933.5 KiB =   2.4 MiB   lxqt-policykit-agent
1.6 MiB + 901.0 KiB =   2.4 MiB   lxqt-session
1.7 MiB + 837.0 KiB =   2.5 MiB   sddm
2.6 MiB + 456.5 KiB =   3.0 MiB   VBoxClient (4)
6.3 MiB + -3350.0 KiB =   3.1 MiB NetworkManager
2.4 MiB +   1.5 MiB =   3.8 MiB   lxqt-powermanagement
2.6 MiB +   1.5 MiB =   4.1 MiB   lxqt-runner
3.4 MiB + 881.0 KiB =   4.3 MiB   openbox
2.7 MiB +   1.8 MiB =   4.5 MiB   lxqt-notificationd
4.7 MiB +  59.5 KiB =   4.7 MiB   systemd-journald
12.5 MiB + -7812.0 KiB =   4.9 MiB polkitd
3.8 MiB +   2.2 MiB =   6.0 MiB   lxqt-panel
11.5 MiB + -3644.5 KiB =   7.9 MiB ntpd
11.2 MiB + -2581.0 KiB =   8.7 MiB nm-applet
12.2 MiB + 366.0 KiB =  12.6 MiB   pcmanfm-qt
18.2 MiB + -644.0 KiB =  17.6 MiB  Xorg
---------------------------------
                        113.0 MiB
=================================

MATE

 Private  +   Shared  =  RAM used   Program

248.0 KiB +  57.0 KiB = 305.0 KiB   rtkit-daemon
316.0 KiB +  31.0 KiB = 347.0 KiB   dhcpcd
344.0 KiB +  81.0 KiB = 425.0 KiB   rpcbind
388.0 KiB +  80.5 KiB = 468.5 KiB   dbus-launch (2)
  4.4 MiB + -4003.0 KiB = 525.0 KiB dconf-service
588.0 KiB +  45.0 KiB = 633.0 KiB   systemd-logind
552.0 KiB + 117.0 KiB = 669.0 KiB   gconfd-2
456.0 KiB + 259.0 KiB = 715.0 KiB   avahi-daemon (2)
548.0 KiB + 189.0 KiB = 737.0 KiB   gconf-helper
692.0 KiB +  47.0 KiB = 739.0 KiB   systemd-udevd
592.0 KiB + 150.5 KiB = 742.5 KiB   at-spi-bus-launcher
660.0 KiB + 179.5 KiB = 839.5 KiB   at-spi2-registryd
644.0 KiB + 199.5 KiB = 843.5 KiB   gvfsd
768.0 KiB +  92.5 KiB = 860.5 KiB   rpc.statd
  4.7 MiB + -3955.0 KiB = 893.0 KiB accounts-daemon
  4.8 MiB + -3943.5 KiB =   1.0 MiB gvfsd-fuse
  4.8 MiB + -3854.0 KiB =   1.1 MiB gvfsd-trash
  5.0 MiB + -3789.0 KiB =   1.3 MiB upowerd
  5.1 MiB + -3817.0 KiB =   1.4 MiB udisksd
  1.1 MiB + 337.0 KiB =   1.4 MiB   gvfs-udisks2-volume-monitor
  1.6 MiB + 249.5 KiB =   1.9 MiB   syslog-ng
  1.6 MiB + 429.0 KiB =   2.0 MiB   polkit-mate-authentication-agent-1
  5.4 MiB + -3485.5 KiB =   2.0 MiB lightdm (2)
  1.7 MiB + 510.5 KiB =   2.2 MiB   dbus-daemon (4)
  1.3 MiB +   1.0 MiB =   2.3 MiB   sshd (2)
  1.4 MiB +   1.0 MiB =   2.4 MiB   systemd (4)
  1.8 MiB + 679.5 KiB =   2.4 MiB   (sd-pam) (3)
  1.9 MiB + 570.5 KiB =   2.5 MiB   mate-screensaver
  2.0 MiB + 536.0 KiB =   2.5 MiB   mate-session
  1.9 MiB + 679.5 KiB =   2.6 MiB   notification-area-applet
  2.1 MiB + 703.0 KiB =   2.8 MiB   mate-power-manager
  2.2 MiB + 596.0 KiB =   2.8 MiB   NetworkManager
  2.7 MiB + 686.5 KiB =   3.4 MiB   marco
  2.6 MiB + 937.5 KiB =   3.5 MiB   wnck-applet
  3.6 MiB + 309.5 KiB =   3.9 MiB   pulseaudio
  2.7 MiB +   1.2 MiB =   3.9 MiB   mate-volume-control-applet
  3.0 MiB +   1.0 MiB =   4.0 MiB   clock-applet
  7.6 MiB + -2931.0 KiB =   4.7 MiB mate-settings-daemon
  7.7 MiB + -2790.0 KiB =   4.9 MiB mate-panel
  5.0 MiB +  60.5 KiB =   5.1 MiB   systemd-journald
 13.0 MiB + -7854.0 KiB =   5.3 MiB polkitd
 10.2 MiB + -2592.0 KiB =   7.7 MiB caja
 11.5 MiB + -3653.5 KiB =   7.9 MiB ntpd
  7.5 MiB +   1.1 MiB =   8.6 MiB   nm-applet
 14.9 MiB +   1.2 MiB =  16.1 MiB   Xorg
---------------------------------
                        123.0 MiB
=================================

Cinnamon

 Private  +   Shared  =  RAM used   Program

248.0 KiB +  56.0 KiB = 304.0 KiB   rtkit-daemon
316.0 KiB +  31.0 KiB = 347.0 KiB   dhcpcd
340.0 KiB +  82.0 KiB = 422.0 KiB   rpcbind
  4.4 MiB + -3995.0 KiB = 469.0 KiB dconf-service
384.0 KiB +  88.5 KiB = 472.5 KiB   dbus-launch (2)
576.0 KiB +  44.0 KiB = 620.0 KiB   systemd-logind
556.0 KiB + 115.0 KiB = 671.0 KiB   gconfd-2
452.0 KiB + 258.0 KiB = 710.0 KiB   avahi-daemon (2)
544.0 KiB + 185.0 KiB = 729.0 KiB   gconf-helper
596.0 KiB + 174.5 KiB = 770.5 KiB   at-spi-bus-launcher
656.0 KiB + 170.5 KiB = 826.5 KiB   at-spi2-registryd
800.0 KiB +  47.0 KiB = 847.0 KiB   systemd-udevd
640.0 KiB + 208.5 KiB = 848.5 KiB   gvfsd
768.0 KiB +  88.5 KiB = 856.5 KiB   rpc.statd
  4.7 MiB + -3946.0 KiB = 910.0 KiB accounts-daemon
  4.8 MiB + -3938.5 KiB =   1.0 MiB gvfsd-fuse
  4.8 MiB + -3847.0 KiB =   1.1 MiB gvfsd-trash
  5.0 MiB + -3818.0 KiB =   1.3 MiB upowerd
  5.1 MiB + -3819.0 KiB =   1.4 MiB udisksd
  1.1 MiB + 340.0 KiB =   1.4 MiB   gvfs-udisks2-volume-monitor
  1.1 MiB + 303.0 KiB =   1.4 MiB   cupsd
  1.3 MiB + 394.0 KiB =   1.7 MiB   csd-printer
  1.6 MiB + 198.5 KiB =   1.8 MiB   syslog-ng
  1.4 MiB + 599.5 KiB =   2.0 MiB   lightdm (2)
  1.6 MiB + 513.5 KiB =   2.1 MiB   dbus-daemon (4)
  1.3 MiB + 979.0 KiB =   2.2 MiB   sshd (2)
  1.4 MiB +   1.0 MiB =   2.4 MiB   systemd (4)
  1.9 MiB + 784.5 KiB =   2.6 MiB   (sd-pam) (3)
  6.2 MiB + -3555.0 KiB =   2.7 MiB NetworkManager
  6.6 MiB + -3794.5 KiB =   2.9 MiB colord
  2.7 MiB + 713.5 KiB =   3.4 MiB   polkit-gnome-authentication-agent-1
  2.8 MiB + 805.0 KiB =   3.6 MiB   cinnamon-screensaver
  3.6 MiB + 341.5 KiB =   3.9 MiB   pulseaudio
  3.2 MiB + 826.5 KiB =   4.0 MiB   cinnamon-session
  4.9 MiB +  56.5 KiB =   5.0 MiB   systemd-journald
 13.2 MiB + -7890.0 KiB =   5.4 MiB polkitd
  3.9 MiB +   2.1 MiB =   6.0 MiB   nm-applet
  5.5 MiB +   2.0 MiB =   7.5 MiB   cinnamon-settings-daemon
 11.4 MiB + -3668.5 KiB =   7.9 MiB ntpd
  8.2 MiB +   1.1 MiB =   9.3 MiB   cinnamon-launch
  7.7 MiB +   2.0 MiB =   9.8 MiB   nemo
 21.2 MiB + -527.5 KiB =  20.7 MiB  Xorg
 85.9 MiB + -34668.5 KiB =  52.1 MiB    cinnamon
---------------------------------
                        176.3 MiB
=================================

GNOME3

 Private  +   Shared  =  RAM used   Program

180.0 KiB +  34.0 KiB = 214.0 KiB   dbus-launch
276.0 KiB +  14.0 KiB = 290.0 KiB   ssh-agent
248.0 KiB +  51.0 KiB = 299.0 KiB   rtkit-daemon
312.0 KiB +  28.0 KiB = 340.0 KiB   dhcpcd
324.0 KiB +  21.5 KiB = 345.5 KiB   systemd-hostnamed
328.0 KiB +  20.0 KiB = 348.0 KiB   systemd-localed
324.0 KiB +  80.0 KiB = 404.0 KiB   rpcbind
580.0 KiB +  52.5 KiB = 632.5 KiB   bluetoothd
604.0 KiB +  40.0 KiB = 644.0 KiB   systemd-logind
556.0 KiB + 109.0 KiB = 665.0 KiB   gconfd-2
452.0 KiB + 252.0 KiB = 704.0 KiB   avahi-daemon (2)
680.0 KiB +  44.0 KiB = 724.0 KiB   systemd-udevd
548.0 KiB + 182.0 KiB = 730.0 KiB   gconf-helper
  4.6 MiB + -3950.5 KiB = 765.5 KiB at-spi2-registryd
596.0 KiB + 185.0 KiB = 781.0 KiB   at-spi-bus-launcher
768.0 KiB +  50.5 KiB = 818.5 KiB   VBoxService
696.0 KiB + 146.5 KiB = 842.5 KiB   gvfsd
768.0 KiB +  86.5 KiB = 854.5 KiB   rpc.statd
  4.8 MiB + -3960.0 KiB = 960.0 KiB accounts-daemon
852.0 KiB + 137.5 KiB = 989.5 KiB   gvfsd-fuse
792.0 KiB + 267.0 KiB =   1.0 MiB   zeitgeist-daemon
  5.1 MiB + -3910.5 KiB =   1.3 MiB gdm
  5.0 MiB + -3853.0 KiB =   1.3 MiB upowerd
  1.0 MiB + 291.0 KiB =   1.3 MiB   gvfs-udisks2-volume-monitor
  5.1 MiB + -3877.0 KiB =   1.3 MiB udisksd
  1.1 MiB + 286.0 KiB =   1.4 MiB   cupsd
  1.4 MiB + 133.0 KiB =   1.5 MiB   gnome-keyring-daemon
  1.1 MiB + 448.0 KiB =   1.5 MiB   gdm-session-worker
  1.3 MiB + 359.0 KiB =   1.7 MiB   gsd-printer
  1.2 MiB + 509.0 KiB =   1.7 MiB   (sd-pam) (2)
  1.6 MiB + 192.5 KiB =   1.8 MiB   syslog-ng
  1.3 MiB + 648.0 KiB =   1.9 MiB   mission-control-5
  5.6 MiB + -3676.5 KiB =   2.0 MiB gnome-session
  1.1 MiB + 984.5 KiB =   2.1 MiB   systemd (3)
  1.5 MiB + 573.5 KiB =   2.1 MiB   zeitgeist-datahub
  1.3 MiB + 953.0 KiB =   2.2 MiB   sshd (2)
  6.1 MiB + -3700.5 KiB =   2.5 MiB colord
  6.1 MiB + -3656.0 KiB =   2.5 MiB NetworkManager
  2.2 MiB + 466.0 KiB =   2.6 MiB   dbus-daemon (3)
  2.0 MiB + 728.5 KiB =   2.7 MiB   gnome-shell-calendar-server
  2.6 MiB + 491.5 KiB =   3.1 MiB   VBoxClient (4)
  2.5 MiB +   1.0 MiB =   3.5 MiB   evolution-source-registry
  6.5 MiB + -2914.5 KiB =   3.6 MiB tracker-extract
  3.5 MiB + 338.5 KiB =   3.9 MiB   pulseaudio
  6.7 MiB + -2828.5 KiB =   3.9 MiB tracker-miner-fs
  3.4 MiB +   2.1 MiB =   5.5 MiB   goa-daemon
 13.3 MiB + -7973.0 KiB =   5.5 MiB polkitd
  4.9 MiB + 728.0 KiB =   5.7 MiB   tracker-store
  6.1 MiB +  51.5 KiB =   6.2 MiB   systemd-journald
  4.2 MiB +   2.1 MiB =   6.3 MiB   nm-applet
 11.4 MiB + -3668.5 KiB =   7.9 MiB ntpd
 10.1 MiB + -1729.0 KiB =   8.4 MiB gnome-settings-daemon
  8.1 MiB +   1.7 MiB =   9.8 MiB   Xorg
 10.7 MiB + -816.5 KiB =   9.9 MiB  evolution-alarm-notify
 24.6 MiB +   1.1 MiB =  25.7 MiB   evolution-calendar-factory
143.2 MiB + -56658.5 KiB =  87.9 MiB    gnome-shell
---------------------------------
                        245.3 MiB
=================================

KDE

 Private  +   Shared  =  RAM used   Program

 72.0 KiB +   8.0 KiB =  80.0 KiB   start_kdeinit
 80.0 KiB +  13.5 KiB =  93.5 KiB   kwrapper4
128.0 KiB +  23.0 KiB = 151.0 KiB   agetty
176.0 KiB +  28.0 KiB = 204.0 KiB   dbus-launch
292.0 KiB +  28.5 KiB = 320.5 KiB   gpg-agent
320.0 KiB +  28.0 KiB = 348.0 KiB   dhcpcd
272.0 KiB +  84.0 KiB = 356.0 KiB   cat (4)
340.0 KiB +  79.0 KiB = 419.0 KiB   rpcbind
604.0 KiB +  39.0 KiB = 643.0 KiB   systemd-logind
464.0 KiB + 247.0 KiB = 711.0 KiB   avahi-daemon (2)
768.0 KiB +  87.5 KiB = 855.5 KiB   rpc.statd
852.0 KiB +  51.5 KiB = 903.5 KiB   startkde
352.0 KiB + 669.0 KiB =   1.0 MiB   systemd-udevd (2)
656.0 KiB + 524.5 KiB =   1.2 MiB   kdm (2)
  1.1 MiB + 420.0 KiB =   1.5 MiB   upowerd
852.0 KiB + 780.0 KiB =   1.6 MiB   klauncher
  1.3 MiB + 346.0 KiB =   1.7 MiB   udisksd
  1.5 MiB + 256.5 KiB =   1.8 MiB   akonadi_control
  1.3 MiB + 529.0 KiB =   1.8 MiB   (sd-pam) (2)
  1.6 MiB + 201.5 KiB =   1.8 MiB   syslog-ng
  1.5 MiB + 409.5 KiB =   1.9 MiB   dbus-daemon (2)
  1.2 MiB + 971.5 KiB =   2.1 MiB   systemd (3)
656.0 KiB +   1.5 MiB =   2.2 MiB   kdeinit4
  1.3 MiB + 997.0 KiB =   2.3 MiB   sshd (2)
  1.3 MiB +   1.6 MiB =   2.9 MiB   kio_trash (2)
  2.1 MiB +   1.1 MiB =   3.2 MiB   klipper
  6.9 MiB + -3587.0 KiB =   3.4 MiB NetworkManager
  2.4 MiB +   1.0 MiB =   3.5 MiB   ksmserver
  3.2 MiB + 594.5 KiB =   3.8 MiB   kuiserver
  3.2 MiB + 952.5 KiB =   4.1 MiB   kglobalaccel
  3.4 MiB + 829.5 KiB =   4.2 MiB   akonadi_migration_agent
  3.4 MiB + 837.5 KiB =   4.3 MiB   polkit-kde-authentication-agent-1
  3.8 MiB + 716.5 KiB =   4.5 MiB   knotify4
  4.4 MiB +  49.5 KiB =   4.5 MiB   systemd-journald
  3.8 MiB + 891.0 KiB =   4.7 MiB   baloo_file
  3.8 MiB + 975.0 KiB =   4.7 MiB   akonadi_maildispatcher_agent
  3.8 MiB + 983.0 KiB =   4.7 MiB   akonadi_baloo_indexer
  4.1 MiB +   1.3 MiB =   5.4 MiB   akonadi_newmailnotifier_agent
  4.3 MiB +   1.1 MiB =   5.4 MiB   korgac
 13.2 MiB + -7804.0 KiB =   5.6 MiB polkitd
  5.5 MiB +   1.7 MiB =   7.1 MiB   akonadi_notes_agent
 11.1 MiB + -3575.0 KiB =   7.6 MiB kactivitymanagerd
  5.6 MiB +   2.1 MiB =   7.7 MiB   akonadi_sendlater_agent
 11.4 MiB + -3697.5 KiB =   7.8 MiB ntpd
  7.2 MiB + 777.5 KiB =   8.0 MiB   akonadiserver
  6.0 MiB +   2.9 MiB =   8.9 MiB   akonadi_archivemail_agent
  6.3 MiB +   2.6 MiB =   8.9 MiB   kmix
  6.1 MiB +   2.9 MiB =   9.0 MiB   akonadi_mailfilter_agent
  6.9 MiB +   2.4 MiB =   9.3 MiB   kded4
  9.1 MiB +   2.7 MiB =  11.7 MiB   akonadi_agent_launcher (3)
 13.8 MiB + -1069.5 KiB =  12.8 MiB kwin
 13.2 MiB +   3.2 MiB =  16.5 MiB   krunner
 68.8 MiB + -49024.0 KiB =  21.0 MiB    mysqld
 30.3 MiB + -2270.0 KiB =  28.1 MiB Xorg
 36.9 MiB +   6.8 MiB =  43.7 MiB   plasma-desktop
---------------------------------
                        302.6 MiB
=================================

Unity

 Private  +   Shared  =  RAM used   Program

 92.0 KiB +  14.0 KiB = 106.0 KiB   cat
128.0 KiB +  21.0 KiB = 149.0 KiB   agetty
180.0 KiB +  28.0 KiB = 208.0 KiB   dbus-launch
252.0 KiB +  47.0 KiB = 299.0 KiB   rtkit-daemon
312.0 KiB +  27.0 KiB = 339.0 KiB   dhcpcd
324.0 KiB +  18.0 KiB = 342.0 KiB   systemd-localed
336.0 KiB +  21.0 KiB = 357.0 KiB   systemd-timedated
344.0 KiB +  79.0 KiB = 423.0 KiB   rpcbind
412.0 KiB +  69.0 KiB = 481.0 KiB   dconf-service
592.0 KiB +  39.0 KiB = 631.0 KiB   systemd-logind
588.0 KiB +  92.5 KiB = 680.5 KiB   indicator-messages-service
448.0 KiB + 245.0 KiB = 693.0 KiB   avahi-daemon (2)
604.0 KiB +  89.5 KiB = 693.5 KiB   indicator-bluetooth-service
548.0 KiB + 168.0 KiB = 716.0 KiB   gconf-helper
  4.6 MiB + -3955.0 KiB = 725.0 KiB at-spi-bus-launcher
684.0 KiB +  42.0 KiB = 726.0 KiB   systemd-udevd
640.0 KiB + 100.0 KiB = 740.0 KiB   gconfd-2
636.0 KiB + 115.5 KiB = 751.5 KiB   at-spi2-registryd
652.0 KiB + 144.5 KiB = 796.5 KiB   indicator-power-service
648.0 KiB + 158.5 KiB = 806.5 KiB   gvfsd
772.0 KiB +  45.5 KiB = 817.5 KiB   VBoxService
768.0 KiB +  85.5 KiB = 853.5 KiB   rpc.statd
796.0 KiB + 122.0 KiB = 918.0 KiB   accounts-daemon
568.0 KiB + 391.5 KiB = 959.5 KiB   (sd-pam)
  4.8 MiB + -3982.5 KiB = 969.5 KiB gvfsd-fuse
824.0 KiB + 253.0 KiB =   1.1 MiB   dbus (2)
828.0 KiB + 271.0 KiB =   1.1 MiB   zeitgeist-daemon
  4.9 MiB + -3904.0 KiB =   1.1 MiB gvfsd-trash
  1.0 MiB + 131.5 KiB =   1.2 MiB   indicator-session-service
  5.0 MiB + -3883.0 KiB =   1.2 MiB upowerd
  1.1 MiB + 237.0 KiB =   1.3 MiB   cupsd
  1.1 MiB + 279.0 KiB =   1.4 MiB   gvfs-udisks2-volume-monitor
  5.1 MiB + -3857.0 KiB =   1.4 MiB udisksd
  1.1 MiB + 324.5 KiB =   1.4 MiB   zeitgeist-fts
  5.1 MiB + -3833.0 KiB =   1.4 MiB indicator-application-service
  1.2 MiB + 382.0 KiB =   1.6 MiB   indicator-sound-service
  1.6 MiB + 174.5 KiB =   1.8 MiB   syslog-ng
  5.6 MiB + -3769.0 KiB =   1.9 MiB gnome-session
932.0 KiB +   1.0 MiB =   1.9 MiB   systemd (2)
  1.4 MiB + 537.0 KiB =   2.0 MiB   lightdm (2)
  1.4 MiB + 753.0 KiB =   2.1 MiB   mission-control-5
  1.3 MiB + 936.0 KiB =   2.2 MiB   sshd (2)
  1.8 MiB + 531.0 KiB =   2.3 MiB   zeitgeist-datahub
  6.2 MiB + -3779.0 KiB =   2.5 MiB colord
  2.2 MiB + 458.5 KiB =   2.6 MiB   dbus-daemon (3)
  6.2 MiB + -3682.0 KiB =   2.6 MiB NetworkManager
  2.3 MiB + 515.0 KiB =   2.8 MiB   gnome-fallback-mount-helper
  2.3 MiB + 485.0 KiB =   2.8 MiB   polkit-gnome-authentication-agent-1
  2.4 MiB + 514.0 KiB =   2.9 MiB   notify-osd
  2.5 MiB + 417.5 KiB =   3.0 MiB   VBoxClient (4)
  2.6 MiB + 547.5 KiB =   3.1 MiB   indicator-keyboard-service
  2.7 MiB + 657.0 KiB =   3.3 MiB   indicator-printers-service
  2.7 MiB + 854.0 KiB =   3.5 MiB   telepathy-indicator
  2.5 MiB +   1.1 MiB =   3.6 MiB   evolution-source-registry
  3.1 MiB + 577.0 KiB =   3.7 MiB   bamfdaemon
  3.6 MiB + 306.5 KiB =   3.9 MiB   pulseaudio
  3.0 MiB + 933.0 KiB =   3.9 MiB   indicator-datetime-service
  3.9 MiB +   1.3 MiB =   5.3 MiB   unity-panel-service
 13.2 MiB + -7982.0 KiB =   5.4 MiB polkitd
  4.4 MiB +   1.8 MiB =   6.1 MiB   nm-applet
  6.1 MiB + 747.0 KiB =   6.9 MiB   goa-daemon
  7.3 MiB +  50.5 KiB =   7.3 MiB   systemd-journald
 11.4 MiB + -3690.5 KiB =   7.8 MiB ntpd
  5.3 MiB +   4.5 MiB =   9.8 MiB   gnome-settings-daemon
 11.6 MiB +   1.0 MiB =  12.6 MiB   nautilus
 24.7 MiB +   1.2 MiB =  25.8 MiB   evolution-calendar-factory
 40.2 MiB + -351.0 KiB =  39.9 MiB  Xorg
103.2 MiB + -4818.0 KiB =  98.5 MiB compiz
---------------------------------
                        312.5 MiB
=================================

Final thoughts

On Arch Linux at least, XFCE has lower resource requirements than MATE. When I said different in the past I was wrong, unless you use openSUSE in which case I was probably right, maybe.

Anyone want to share some humble pie?

Linux Mint LMDE on Hybrid Disk Laptop

I have an old Thinkpad T43p that I am trying to extend the life of. So I recently fitted a cheap 60GB IDE Solid State Drive (SSD) and put a 320GB SATA Hard Disk Drive (HDD) in the Ultrabay. This is not a true hybrid disk, but the principles are similar. The root partition will go on the SDD (for performance) and the home partition will be located on the HDD (for capacity).

I’ve been running Arch Linux on the T43p and the SDD improves system responsiveness and boot time considerably, especially when using F2FS or btrfs (with LZO compression and SSD mount options) on the root filesystem.

I am also testing Linux Mint Debian Edition (LMDE) with the MATE desktop to determine if this is a suitable operating system for my family to use. It appears they find GNOME 3 confusing and would prefer a familar desktop experience.

While testing LMDE 201203 I ran into a few issues, so I’ve decided to capture my notes here for future reference.

Fix the installer

In order to install LMDE using partitions on multiple drives you must use the ADVANCED USER install mode. However, the ADVANCED USER install mode has a bug that prevents the installer from completing, so that needs to be fixed first.

sudo nano /usr/lib/live-installer/frontend/gtk_interface.py

Find the following on line 1765.

self.wTree.get_widget("button_next").show()

After it add the following line, making sure the identation is correct.

self.wTree.get_widget("button_next").set_sensitive(True)

Installing LMDE

  • Double click the Install Linux Mint icon on the desktop.
  • Select your Language and click Forward.
  • Select your Timezone and click Forward.
  • Select your Keyboard layout and click Forward.
  • Enter your User info and click Forward.
  • From the Hard drive window Select Manually mount partitions (ADVANCED USERS ONLY) and click Forward.

The Please make sure you wish to manually manage partitions window will appear. On my system the SSD is detected on /dev/sda and the HDD is detected on /dev/sdb. Start GParted and partition and format the drives as follows.

/dev/sda1
  Size: 256MiB
  Create as: Primary Partition
  File system: ext4
  Label: boot

/dev/sda2
  Size: 2048MiB (or the size you prefer)
  Create as: Primary Partition
  File system: linux-swap
  Label: swap

/dev/sda3
  Size: Remainder
  Create as: Primary Partition
  File system: btrfs
  Label: root

/dev/sdb1
  Size: All
  Create as: Primary Partition
  File system: ext4
  Label: home

Apply the changes and close GParted.

I use ext4 for the /boot partition because GRUB can’t currently boot from btrfs in LMDE. I use ext4 for /home because it offers the best performance on rotational drives on my Thinkpad T43p. I use btrfs on the /root partition because performs best (by some margin) on solid state drives in my Thinkpad T43p.

The filesystems need mounting under /target so the installer can install the OS. Open a Terminal and do the following.

sudo mkdir /target
sudo mount -t btrfs -o compress=lzo,ssd /dev/disk/by-label/root /target
sudo mkdir /target/{boot,home}
sudo mount -t ext4 /dev/disk/by-label/boot /target/boot
sudo mount -t ext4 /dev/disk/by-label/home /target/home

Return to the Linux Mint Debian Installer.

  • Click Forward.
  • From the Advanced options check Install GRUB and select /dev/sda. Click Forward.
  • Confirm the Summary is correct and click Install.

Time for a cup of tea while the install runs. A pop-up, titled Installation Paused, will appear. Click OK.

Create /target/etc/fstab

Do as the installer says and create /target/etc/fstab. Open a Terminal.

sudo nano /target/etc/fstab

The following fstab works for my T43p.

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>      <options>                           <dump>  <pass>
proc            /proc           proc        defaults                            0       0
LABEL=root      /               btrfs       defaults,noatime,compress=lzo,ssd   0       1
LABEL=boot      /boot           ext4        defaults,noatime                    0       2
LABEL=home      /home           ext4        defaults,relatime                   0       2
LABEL=swap      none            swap        sw                                  0       0

Upgrade MATE 1.6 and remove legacy MATE 1.4 packages

MATE 1.6 has been released for LMDE 201203 so it is a good idea to upgrade and remove legacy packages before the first boot to ensure a clean configuration. Open a Terminal.

sudo chroot /target
apt-get update
apt-get install apt-show-versions
apt-get dist-upgrade

Some MATE 1.4 packages will be left behind that are no longer required. The following can help identify them.

apt-show-versions | grep 1\.4\.[0-9]\-[0-9]\+wheezy | cut -f1 -d' '

Purge the old MATE 1.4 packages.

PKGS=`apt-show-versions | grep 1\.4\.[0-9]\-[0-9]\+wheezy | cut -f1 -d' '`
apt-get purge ${PKGS}

Exit the chroot.

exit

Finish the install

Return to the Linux Mint Debian Installer.

  • Click Forward.
  • Some final installation steps will now complete.
  • A pop-up, titled Installation finished, will appear. Click Yes.

Your computer will reboot and start LMDE.

References

Plex Media Server on Open Media Vault

I’ve recently started using Plex Media Server to handle most media streaming duties around the house. I run in on Open Media Vault 0.5.x. At the time of writing Open Media Vault is based on Debian (Squeeze) 6.0.

Plex Media Server

Anyway, it turns out that installing Plex Media Server on Open Media Vault is super simple thanks to the hard work of Christian Svedin who has packaged everything and made it available via an apt repository.

sudo apt-get install curl
echo "deb http://shell.ninthgate.se/packages/debian squeeze main" | sudo tee -a /etc/apt/sources.list.d/plexmediaserver.list
curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install plexmediaserver

The instructions above also work for Debian Wheezy, just change squeeze to wheezy in /etc/apt/sources.list.d/plexmediaserver.list.

When the install is complete point your browser at Plex/Web, for example:

  • http://plex.example.org:32400/web

Replace plex.example.org with your Plex Media Server hostname/ip address.

If you have PlexPass then head over to the Preview Releases for Debian and download and install the latest .deb.

Plex Clients

I use the Plex Client for Android on phone and tablet, a Roku 2 XS in the lounge and Roku 2 LT in the bedroom.

I’ve sucessfully tested Plex Home Theatre on Ubuntu 12.04 and Raspbmc with the PleXBMC plug-in on Raspberry Pi.

References

Setting up MiniDLNA on Open Media Vault

I have Open Media Vault running on a HP ProLiant MicroServer G7 N54L.

OpenMediaVault (OMV) is a network attached storage (NAS) solution based on Debian Linux. At the time of writing OMV 0.5.x is based on Debian 6.0 (Squeeze).

In recent months Plex has taken over just about all media streaming duties in our house, with the expection of streaming music because Plex music playback and streaming is seriously lacking (no playlists!). So, MiniDLNA is still required for serving up music around the house.

Install MiniDLNA on OMV

There is a 3rd party plugin repository for Open Media Vault which includes packages to install MiniDLNA and a WebUI plugin for managing MiniDLNA via OMV. I upgraded to OMV 0.5.x this morning. and with the 0.5.x the Plugin API changed and as of the time of writing none of the 3rd party plugins had not been migrated to OMV 0.5.x. That said, MiniDLNA is super simple to configure so a WebUI is not a requirement for me.

MiniDLNA is not currently packaged for Debian Squeeze in the official repositories but Steve Kemp has packaged a fairly up-to-date version of MiniDLNA for Squeeze. Brilliant! Do the following as root to install MiniDLNA.

wget http://packages.steve.org.uk/minidlna/apt-key.pub
apt-key add apt-key.pub
echo deb http://packages.steve.org.uk/minidlna/squeeze/ ./" > /etc/apt/sources.list.d/minidlna.list
echo "deb-src http://packages.steve.org.uk/minidlna/squeeze/ ./" >> /etc/apt/sources.list.d/minidlna.list

Once you’ve done that run the following.

apt-get update
apt-get install minidlna

The MiniDLNA defaults in Steve’s package assume you have your music in /srv/music. So you’ll probably need to modify /etc/minidlna/minidlna.conf accordingly. From this point man minidlna and man minidlna.conf will guide you.

References

SketchUp Make on Arch Linux

I use SketchUp at work to manipulate models for use in Google Earth. Here is how I got SketchUp Make 2013 installed and working on Arch Linux under Wine 1.7.

Wine for Arch Linux

Install Wine on Arch Linux as follows.

sudo pacman -S --needed icoutils libwbclient libxslt lib32-mpg123 p11-kit lib32-p11-kit samba wine winetricks wine-mono wine_gecko
sudo packer -S --noedit --noconfirm ttf-ms-fonts

For 64-bit also install the following.

sudo packer -S --noedit --noconfirm lib32-libwbclient lib32-libxslt

Installing SketchUp Make

Once Wine is installed download SketchUp Make 2013.

Create a clean wine prefix.

export WINEPREFIX="${HOME}/.sketchup"
export WINEARCH="win32"
wineboot

Install corefonts using winetricks

winetricks corefonts

Start the SketchUp Make setup.

wine SketchUpWEN.exe

Follow the installation wizard, I just went with the defaults.

That’s it. SketchUp is installed and should be associated with the appropriate file types.

Video Corruption

My workstation has a Radeon 5000 series graphics card and I use the Open Source radeon driver. I don’t know if this problem is specific to my hardware/drivers but SketchUp will eventually (sometimes immediately) encounter video corruption. Once that happens I can’t see or manipluate the models.

The solution that works for me is:

env WINEPREFIX="${HOME}/.sketchup" LIBGL_ALWAYS_SOFTWARE=1 vblank_mode=0 wine "C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe"

If this also works for you then SketchUp.desktop can be modified to persist these settings.

nano ~/.local/share/applications/wine/Programs/SketchUp\ 2013/SketchUp.desktop

Replace the contents with what follows but change USER with your username.

[Desktop Entry]
Name=SketchUp
Exec=env WINEPREFIX="/home/USER/.sketchup" LIBGL_ALWAYS_SOFTWARE=1 vblank_mode=0 wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/USER/.sketchup/dosdevices/c:/users/USER/Start\\ Menu/Programs/SketchUp\\ 2013/SketchUp.lnk
Type=Application
StartupNotify=true
Icon=1871_SketchUpIcon.0

Uninstalling SketchUp Make

Should you ever need to, you can uninstall SketchUp Make as follows.

rm -rfv ${HOME}/.sketchup/
rm -rfv ~/.local/share/applications/wine/Programs/SketchUp\ 2013/
References

Setting up Open Media Vault on the HP MicroServer N54L

I’ve installed Open Media Vault on my new HP ProLiant MicroServer G7 N54L to replace my aging, and lackluster, ReadyNAS NV.

OpenMediaVault (OMV) is a network attached storage (NAS) solution based on Debian Linux. At the time of writing OMV 0.5.x is based on Debian 6.0 (Squeeze).

This blog post is not going to cover the extremely simple OMV installation procedure, it assumes OMV 0.5.x is already installed. This post explains how to upgrade the kernel, install some addtional plugins and some hackery to update Transmission.

In case you haven’t guessed it yet, this blog post is basically the essential notes I need to recreate my server setup.

N54L Custom BIOS

I’ve installed one of the custom BIOS mods for the N54L.

I selected the BIOS mod above because the guy who created was an HP engineer and this BIOS mod only enables additional features that the N54L can actually support. Using this BIOS mod I’ve been able to:

  • Enable AHCI for the Optical Disk Drive (ODD) port.
  • Enable AHCI and port multiplier for the the e-SATA port.
  • Make all drives hot-pluggable.

The 250GB hard drive that came with N54L is now reloacted in the optical drive day and being used as the OS drive, leaving all 4 bays for data.

As some point in the future I may want to hook up a 4 bay e-SATA enclosure and this BIOS mod makes that possible.

Open Media Vault

Once Open Media Vault is installed, I do the following.

Enable SSH

OMV actually has a really good WebUI that can be used to accomplish most update/upgrade tasks but I can’t help myself. I must have shell access. From the OMV WebUI:

  • Services -> SSH
    • Put a tick in Enable and click the OK button.

Shell Tools

Things crave when at the a shell.

Login to your OMV server as root using SSH and then do the following.

apt-get install less lsb-release rsync screen tree

OMV Plugins

OMV has a number of built-in plugins and a third party repository of plugins.

Built-in Plugins

Update the built-in plugins.

  • System -> Plugins
    • Click the Check icon.

Logical Volume Manager

I use LVM. There, I said it. Enable the LVM2 plugin as follows from the OMV WebUI.

  • System -> Plugins
    • Highlight the openmediavault-lvm2 plugin.
    • Click the Install icon and then Yes.
    • When the install is Done ..., click Close.

3rd Party OMV-Plugins

Follow the instructions on the following page to enable the OMV-Extras plugin repository.

Backports 3.2 Kernel

I updated the Kernel to 3.2 because it better supports the N54L hardware, in particular the embedded graphics controller. The Linux 3.2 kernel can be installed via OMV-Extras.

  • System -> OMV-Extras.org -> Install Backports 3.2 kernel

Plex Media Server

Plex Media Server is available as a plugin once the OMV-Extras plugin repository is enabled. Plex is managed via the OMV WebUI.

  • Services -> Plex

Transmission

Transmission is available as a plugin once the OMV-Extras plugin repository is enabled. Transmission is managed via the OMV WebUI.

  • Services -> BitTorrent -> Server.

It’s all very straight forward. I use the following block list.

That pretty much covers the stuff I won’t remember in the future. I’m considering adding LXC and Dropbox in the coming that will require some manual steps.

References

Basic Debian Setup for Squeeze and Wheezy

Recently I’ve been deploying Debian 6.0 (Squeeze) and 7.0 (Wheezy) servers for some personal projects. These servers are provisioned in different ways:

  • Open Media Vault using a Squeeze pre-seed
  • VPS powered by LXC deployed via debootstrap
  • VPS powered by KVM using the hosting providers Wheezy pre-seed

Consequently the basic install differs on each instance and requires a little bit of post install tweaking to get them all consistent. This blog post is a quick reference for the post install steps I complete on Debian servers.

Timezone & Locale

Select your timezone.

dpkg-reconfigure tzdata

Select your locale(s).

dpkg-reconfigure locales

Make sure the locales are correctly generated. Replace en_GB.UTF-8 with your default locale.

update-locale LANG=en_GB.UTF-8 LANGUAGE=en_GB.UTF-8 LC_ALL=en_GB.UTF-8 LC_TIME=en_GB.UTF-8 LC_CTYPE=en_GB.UTF-8
locale -a
locale-gen

Hostname

echo box.example.org > /etc/hostname
/bin/hostname -F /etc/hostname

Update /etc/hosts accordingly.

Time

Keeping time is essential.

apt-get install ntp ntpdate

Force a clock sync.

service ntp stop
ntpdate -s pool.ntp.org
service ntp start

If your VPS is a Xen DomU then checkout the following.

Essentials

These are the essential tools I require.

apt-get install build-essential curl git htop less \
lsb-release nano rsync screen sudo tree whois

Users

The following will create a user with sudo capabilities.

useradd user_a --create-home --shell /bin/bash --user-group \
--groups adm,dialout,cdrom,plugdev,sudo

This will create a regular user.

useradd user_b --create-home --shell /bin/bash --user-group --groups adm,dialout,cdrom,plugdev

Assign a password.

echo user_a:mypassword | chpasswd

An existing user can be made a sudoer by simply adding them to the sudo group.

adduser user_b sudo

Firewall

I use firewall my VPS server with ufw. This is my initial configuration that allow access via SSH only.

sudo apt-get install ufw

Configuring ufw is simple but make sure you have console access to the host you are configuring just in case you lock yourself out.

NOTE! When enabling ufw the chains are flushed and connections may be dropped. You can add rules to the firewall before enabling it however, so if you are testing ufw on a remote machine it is recommended you perform…

ufw allow ssh/tcp

…before running sudo ufw enable. Once the firewall is enabled, adding and removing rules will not flush the firewall, although modifying an existing rule will.

Set the default behaviour to deny all incoming connections.

sudo ufw default deny

Open up TCP port 22 but with rate limiting enabled which will deny connections from an IP address that has attempted to initiate 6 or more connections in the last 30 seconds. Ideal for protecting sshd but you should conisder other SSH brute force defense techniques as well.

sudo ufw limit ssh

To enable the firewall you also have to do the following.

sudo ufw enable

On low-end servers it might be beneficial to disable logging.

sudo ufw logging off

You can see the status of the firewall using sudo ufw status.

Intrusion prevention

I use either denyhosts

sudo apt-get install denyhosts

Purge entries older than 5 days, denied hosts will only be purged twice and disable email alerts.

sudo sed -i 's/#PURGE_DENY = 5d/PURGE_DENY = 5d/' /etc/denyhosts.conf
sudo sed -i 's/#PURGE_THRESHOLD = 2/PURGE_THRESHOLD = 2/' /etc/denyhosts.conf
sudo sed -i 's/[email protected]//' /etc/denyhosts.conf

Restart denyhosts.

sudo service denyhosts restart

Also see SSH brute force defence.

Boot options

These servers are headless and often remote, therefore I enable fsck auto repair.

Squeeze

sed -i 's/FSCKFIX=no/FSCKFIX=yes/' /etc/default/rcS

Wheezy

sed -i 's/#FSCKFIX=no/FSCKFIX=yes/' /etc/default/rcS

Repositories

lsb-release was installed earlier.

This is what I put in /etc/apt/sources.list.

cat >/etc/apt/sources.list<<EOF
deb http://ftp.uk.debian.org/debian/ $(lsb_release -cs) main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ $(lsb_release -cs) main contrib non-free

deb http://security.debian.org/ $(lsb_release -cs)/updates main contrib non-free
deb-src http://security.debian.org/ $(lsb_release -cs)/updates main contrib non-free

# $(lsb_release -cs)-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ $(lsb_release -cs)-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ $(lsb_release -cs)-updates main contrib non-free
EOF

I replace ftp.uk with ftp.us for servers located in the United States.

sed -i 's/ftp\.uk/ftp\.us/g' /etc/apt/sources.list

Backports

I add the Backports repository in order to access some updated packages.

Squeeze

cat >/etc/apt/sources.list.d/backports.list <<EOF
deb http://ftp.uk.debian.org/debian-backports $(lsb_release -cs)-backports main contrib non-free
deb-src http://ftp.uk.debian.org/debian-backports $(lsb_release -cs)-backports main contrib non-free
EOF

Wheezy

cat >/etc/apt/sources.list.d/backports.list <<EOF
deb http://ftp.uk.debian.org/debian $(lsb_release -cs)-backports main contrib non-free
deb-src http://ftp.uk.debian.org/debian $(lsb_release -cs)-backports main contrib non-free
EOF

Update.

sudo apt-get update

All backports are deactivated by default (i.e. the packages are pinned to 100 by using ButAutomaticUpgrades: yes in the Release files. If you want to install something from backports run:

apt-get -t wheezy-backports install "package"

MTA

sSMTP is a simple MTA to deliver mail from a computer to a mail hub. sSMTP is simple and lightweight.

Remove exim4

Some VPS Debian templates from VPS providers have exim4 installed and running by default. Remove it.

sudo service exim4 stop
sudo apt-get purge exim4 exim4-base exim4-config

Install sSMTP

apt-get install ssmtp bsd-mailx

sSMTP Gmail Configuration

I use Gmail as my smart host, here is an example configuration for /etc/ssmtp/ssmtp.conf.

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
[email protected]

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587

# Where will the mail seem to come from?
rewriteDomain=

# The full hostname
hostname=box.example.org

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES

# Gmail requires TLS
UseTLS=YES
UseSTARTTLS=YES

# Username and password for Gmail servers
[email protected]
AuthPass=youpassword
AuthMethod=LOGIN

Then add each account that you want to be able to send mail from by editing /etc/ssmtp/revaliases:

root:username@gmail.com:smtp.gmail.com:587
user_a:username@gmail.com:smtp.gmail.com:587
user_b:username@gmail.com:smtp.gmail.com:587

Log and package monitoring

My personal VPS server are dotted about the place but I like to keep an eye on them and I find apticron and logwatch are very useful for that.

apticron

apticron is a simple tool to mail about pending package updates.

sudo apt-get install apticron

logwatch

Logwatch is a modular log analyser that runs every night and mails you the results.

sudo apt-get install logwatch

Lighter

Some of my servers have fairly low resources, these are some simple changes that can save a bit of RAM or disk space.

aptitude

I don’t use it.

sudo apt-get purge aptitude

D-Bus

D-Bus is a message bus, used for sending messages between applications. Some VPS provider Debian templates have D-Bus and avahi install. I don’t require these on Internet facing servers so I remove them. If an application pull in D-Bus as a requirement that is fine, but for this initial server state I remove it.

sudo apt-get purge dbus

at

at provides delayed job execution and batch processing. I don’t use it.

sudo service atd stop
sudo apt-get purge at

ngetty

Ngetty is a single-process getty replacement, so instead of running 6 getty processes consuming up to 3MB of RAM each, you can use a single ngetty process using less than 1MB of RAM total.

sudo apt-get install ngetty

Edit /etc/inittab, comment out getty and add ngetty like so.

#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
ng:2345:respawn:/sbin/ngetty 1 2 3 4 5 6

Restart inittab

telinit q

That about covers the general post installation step I complete on my Debian servers.

Clean up.

Remove any packages that are no longer required and clean up the package cache.

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
Flattr this