Elementary OS, Linux, Uncategorized

Updates to Relay

I pushed out some updates to Relay. You can find the changes on Github or Launchpad. Relay is an elegant and sleek IRC client designed for Elementary OS but will work on any Linux OS.

Relay will try to switch to a theme that looks good. You can now disable this by passing the -t option.

I also added better Unicode support and fixed an issue that was causing it to close prematurely.

Here is what Relay looks like. Its one of the nicest looking IRC clients out there.

Screenshot from 2015-07-04 13:52:24

Elementary OS, Linux, Ubuntu

Create BTRFS Snapshots With Each apt-get Transaction

So I took it upon myself to fork apt-btrfs-snapshot. It is a program that takes BTRFS snapshots after each apt transaction. I wanted it to use Snapper because Snapper has a GUI. Snapper also abstracts all of the functionality of working with BTRFS snapshots.

Here are some of the things its provides:

  • Management via a GUI
  • Rollbacks without mounting anything
  • A list of what files were changed and their filesizes
  • Tracking of what packages were installed
  • Pre and post snapshots
  • Automatic clean up

You can check it out on github:

64bit .deb

Ubuntu 14.04 Ubuntu 14.10 Ubuntu 15.04
32bit .deb 32bit .deb 32bit .deb
64bit .deb 64bit .deb 64bit .deb

You can use a tool called gdebi to grab all the dependencies you need, which are only really Python and Ssnapper. If you want this done for you run
gdebi apt-btrfs-snapper_0.4.1_all.deb

Management Via a GUI

You can check out this post on installing Snapper GUI on Ubuntu. As you can see below you get a list of all your snapshots and in the bottom you can see what packages were installed. If you hold down control you can select two snapshots and open up the changes view to see what files were changed.

Snapper-GUI on Ubuntu
Snapper-GUI on Ubuntu


To rollback to a previous version you just type:
sudo apt-btrfs-snapper --restore .
Replace <ID> with the snapshot ID or the snapshot name. This will delete, create, and modify your files to get your machine back in the state that it was in when that snapshot was created. You can then roll forward in time just by using a newer ID. You don’t need to restart anything.


You can get a list of snapshots with:
sudo apt-btrfs-snapper list
You can then see what files were changed between two snapshots with:
sudo apt-btrfs-snapper diff

Here is a sample of that output:

c   391 B      /usr/share/doc/maya-calendar-plugin-caldav/changelog.gz
c   391 B      /usr/share/doc/maya-calendar-plugin-google/changelog.gz
c   391 B      /usr/share/doc/maya-calendar/changelog.gz
c   542 B      /usr/share/doc/pantheon-files/changelog.gz
c   246 B      /usr/share/doc/pantheon-photos-common/changelog.Debian.gz
c   246 B      /usr/share/doc/pantheon-photos/changelog.Debian.gz
c   854 B      /usr/share/doc/plank/changelog.Debian.gz 

You can use snapper itself to restore an individual file to a specific state.

Tracking of what packages were installed

apt-btrfs-snapper saves the names of all the packages that were installed in the user data of each snapshot. The best place to view this is in snapper-gui. It can be viewed in the snapper command line tools but it is hard to read. You can see this in the bottom pane in the screenshot above.

Pre and post snapshots

apt-btrfs-snapper takes a snapshot before and after each transaction. They are grouped together in snapper-gui. You can easily see what changes took place between the two snapshots.

Automatic clean up

One of the best parts about snapper are the clean up algorithms built into it. apt-btrfs-snapper simply uses the configuration settings set for the number cleanup algorithm which is part of snapper.

So check it out. Its stable, works great, and makes taking and manipulating BTRFS snapshots a lot easier.

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.

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:

wget https://raw.githubusercontent.com/agronick/Wallpaper-Slideshow/master/wallpaper_slideshow.sh

Once it is saved just set it to executable with:

chmod +x ./wallpaper_slideshow.sh

There are a few parameters you can use:

Usage: ./wallpaper_slideshow.sh [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 ./wallpaper_slideshow.sh without any parameters.

Here is a sample command: ./wallpaper_slideshow.sh ~/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: http://chromecastbg.alexmeub.com/ Click Download in the top right to get them all.