Installing Snapper-GUI on Ubuntu: A GUI for BTRFS Snapshots

Snapper GUI is a great program and one you absolutely need if you are using Snapper on a desktop. Snapper is a program that helps manage snapshots on the btrfs filesystem. This quick guide will go over how to install it on Ubuntu.

Snapper-GUI on Ubuntu
Snapper-GUI on Ubuntu

Run the following in a terminal.

First install the packages you will need to run:
sudo apt-get install python3 libgtksourceview-3.0-1 python3 python3-dbus python3-setuptools git

Then clone the snapper-gui GIT repo somewhere:
git clone --depth=1

cd into the snapper-gui folder GIT created and run:
sudo python3 install

Now run the program:

If you haven’t made a config with snapper first run:
snapper create-config /

Now that you have it installed you can use apt-btrfs-snapper to take a snapper snapshot every time you do an apt-get transaction.

Bash Scripts, Elementary OS, Linux

Updated Desktop Slideshow script for ElementaryOS

ElementaryOS logo A few days ago I released a desktop wallpaper slideshow script for ElementaryOS. A user pointed out that it wasn’t changing the login screen wallpaper. I added a fix and now your login screen will have a random background; the same one as the desktop slideshow. If there is a big demand for them to be independant of eachother I may make the desktop slideshow differ from the login screen.

You can still use the -bootonly flag to only set only one random wallpaper once when you log in to ElementaryOS. This will now also change your login screen’s wallpaper.

If you rather not change the login screen background from the default ElementaryOS one you can use the –nologin flag.

To change the login screen you will need qdbus. You can install it with apt-get install qdbus.

I added a bunch of logging which is useful if you give the desktop slideshow script a large number of files to work with. Occasionally you may see an x on your desktop indicating that an image couldn’t load. You can then check the logs with tail -f /var/log/syslog and see what image is giving you issues. Then you can delete it or move it. You must enable logging with the –log flag for this to work.

As always you can get the wallpaper slideshow script from Github. Check out the last post for more information on installing and running the Wallpaper Slideshow script. Let me know if you encounter any issues. Its always good to hear feedback.

Bash Scripts, Linux

Get the size of your BTRFS Snapshots

If you want to get the size of your BTRFS snapshots you would probably use btrfs qgroup show.  This only shows you a list of IDs and the sizes are in bytes. I wrote a script that will convert the sizes from bytes to kilobytes, megabytes or gigabytes. It will combine the IDs with the name of each snapshot or subvolume from btrfs subvolume list to make each row a lot more meaningful.

In the end instead of seeing a list like this:
Screenshot from 2015-05-26 15:47:24

You’ll see:

Detailed information of each BTRFS snapshot
Detailed information of each BTRFS snapshot

Instead of meaningless IDs you now have the name of your BTRFS subvolumes or snapshots. Instead of a hard to decipher string of bytes it converts each amount into the most appropriate unit of measurement. You can also see the total amount of data that is being used by the snapshots.

For this to work you first need to enable  quotas. Run this command to enable quotas if you haven’t done so already:

sudo btrfs quota enable /

You can clone the project from github by running:
git clone

Or you can just go a wget on the script:

Set it to executable with:
chmod +x ./

Now you can just run the script with: ./

All the columns are pretty self explanatory. The Total column will tell you how much data is in that BTRFS subvolume. The Exclusive Data column is how much data is exclusive to that subvolume. Since BTRFS is a “copy on write” filesystem none of the data is replicated when you create a snapshot. It only needs to make a copy when something changes.

Leave your feedback here to let me know how it worked for you.


Debugging Vala programs in an IDE


Geany is an IDE the supports a number of languages including Vala. This tutorial will show you how to get the debugger plugin for Geany working with Vala code. At the time of this writing the plugin in the Ubuntu repositories happens to be broken. We’ll install it from source and configure it for Vala. If you don’t use Ubuntu or a derivative like Elementary OS this article should still be applicable. You just might need to change a few things.


You can install Geany with:
sudo apt-get install geany

There is a package called geany-plugin-debugger. You can try installing it. At the time of this writing its broken. It installs to the wrong location. If you copy the files to the right location it causes a segmentation fault as soon as you enable it. This was reported half a year ago:

Instead you can get all the plugins for Geany off Github. At the current time the version of Geany in the Ubuntu repos is 1.24. All we care about is the debugger but the other ones are nice to have. I removed the ones from the build script that won’t compile on 1.24 and forked it. You can get it using this command:
git clone

If you have Geany 1.25 grab the offical one:
git clone

You need autotools to compile it. Just do sudo apt-get autotools 

Now to install it just do:
make -j PROCESSORS #Replace PROCESSORS with the number of processor cores your computer has or the number of jobs you want to spawn to compile
sudo make install

Hopefully this worked. If you get an dependency error install whatever dependency is missing.

Now open up Geany. If you go to Tools > Plugin Manager you should be able to enable the debugger. It wont work just yet though. There are a few more things you need to set up.


At this point you’ll want to create a new project. Now you’ll need to set the build parameters. Go to Build > Set Build Commands.

Set this under Vala Commands:

Label Command
Compile valac -c "%f"
Build valac -g --save-temps --pkg gtk+-3.0 "%f"

You can remove the –pkg gtk+-3.0 part if you don’t want to build GTK apps.

Now you will need to do the following:

  1. Insert a breakpoint in your Vala program
  2. Click the build icon
  3. Open the debugging view
  4. Browse for the executable it created
  5. Run your Vala program

Steps for debugging
 There you go. You now have a working Vala debugger. You can step through the code and look up variables at runtime right in your IDE. I hope this helps and is useful. I know I was looking for it for a few months. Its nice to finally have.

I also made this video on how to debug segmentation faults in a command line:

Elementary OS, Linux

Elementary OS Slideshow Wallpaper

Elementaryos logo I set out to code a lightweight script that will make your desktop background change at a preset interval. It changes the background with a fade turning your wallpaper into a slideshow. Having a desktop slideshow seems to be a desired feature in Elementary OS and this method does it using hardly any memory. This should work on any Gtk based distro but I’ve only used it on Elementary OS. Even if you don’t want a slideshow you can use the script to load a random background on each boot up or whenever you run the script. Just use the –bootonly option.

You can find the script on my Github or do a simple wget put the script wherever you want:


Once it is saved just set it to executable with:

chmod +x ./

There are a few parameters you can use:

Usage: ./ [FOLDER] [MINUTES]…

  • [FOLDER] Set a folder with images. If it has other files they will be ignored.
  • [MINUTES] (Optional default:2) Set the number of minutes that you want to wait before changing to the next image.
  • [–bootonly] Set this if you want to change to a random image on boot and then exit.
  • [–wait] Do a delay of however minutes you set MINUTES to before switching to the first image.
  • [–log] Display information to the console and log it to syslog.
  • [–help] Display a help message and then exit.

If you just want to see it cycle the default Elementary OS wallpapers every two minutes run ./ without any parameters.

Here is a sample command: ./ ~/Pictures/Backgrounds/ 2 --log

Once you found a setup you like you can append –makecmd to show you a command you can copy and paste into Elementary OS’s startup application settings.

Setting it up for startup in Elementary OS
You need to go to Applications > System Tools > System Settings > Applications > Startup

Elementray OS Startup Applications

Once there click the + in the bottom left. You can then paste the command given to you by –makecmd in the highlighted box.

That’s it. You’ll now have a slideshow wallpaper on your desktop. The script is programmed to load a random set of images and display them as desktop wallpaper sequentially. When it gets to the end it will shuffle the list and start displaying from the beginning.

Update: If you’ve downloaded in the past you probably want to redownload. Elementary OS wasn’t killing the script when it ended a session. Now the script will kill itself if it spends 10 minutes disconnected to a desktop.

Update2: The script now supports changing your ElementaryOS’ login screen. There is a post detailing the changes.

If you are looking for a great collection of wallpaper you can find one here: Click Download in the top right to get them all.


Display statistics for EnhanceIO

There doesn’t seem to be any any GUIs for Enhance IO. There is a way to display statistics in a terminal. By cobbling together a few commands you can display the statistics and highlight what is being changed. You can set a shortcut for this in .bashrc so you can always access it quickly.

Open up .bashrc and append the following line to the bottom:

alias cache-stats="watch -d 'cat /proc/enhanceio/OSD_0_CACHE/stats /proc/enhanceio/OSD_0_CACHE/io_hist | pr -J -T --columns=2'"

Now you can view all the information EnhanceIO gives you and the differences between each update will be highlighted.

This will display the statistics and the IO history together. Its easy enough to see where one ends and the other begins. This will also concatenate the files into two columns.

Here is what the EnhaceIO stats will look like
Here is what the EnhaceIO stats will look like. Click for a larger view.
KDE, Linux, OpenSuse

Installing KDE5 on OpenSUSE 13.2 as the only desktop enviorment

If you’re looking for a way to install KDE5 during the OpenSUSE OS installation there is a way. It takes a few steps but it works. I’ll explain how to do it below. As of this writing it will install KDE 5.1 on OpenSUSE 13.2.

Make sure you have a network connection during the install because the options you need don’t appear unless you add repos before installation. Fortunately the OpenSUSE installer now has you set up a network connection before you do anything else.

On this screen make sure you have “Add Online Repositories” checked off.

The default repos are all you need.

On this screen do not select any of the default desktop environments. Select “Minimal X Window”.

On this screen click software.

Check off Plasma 5 base on the left. Here you should also search for NetworkManager and install it as well. You might also want to check off some other packages such as image viewers and PDF readers. Everything you need to have a working OpenSUSE system with KDE 5.1 is selected already though.

Once you boot up you’ll have you’ll have a very minimal graphical interface. Log in as Root. You will need to go into Yast and then click the /etc/sysconfig editor.

Go to Desktop > Display Manager > DISPLAY_MANAGER and set it to kdm.
Then go to Desktop > Window Manager > DEFAULT_WM and set it to plasma5.

That’s it. Restart your system and you’ll have OpenSUSE KDE5 without the bulk of two full featured desktop environments.

You can try setting sddm as the display manager but as of now there is no easy way to get it running. Here is just one of several people I’ve heard feedback from:

From personal experience, sddm in openSUSE is very buggy. It does not allow a proper logout yet (display manager hangs during logout/restart/shutdown).

eeickmeyer (