Thursday, September 29, 2016

Conky 1.10 syntax change and multi-monitor support in Debian 8 via Jessie-Backports

conky

If you do not know, Conky is an on-screen system-monitor for Linux. Search for conky images to to see some glorious screenshots:

Conky 1.10 was released for it’s 10th birthday in June 2015. Conky 1.10.x was rewritten in C++ and now uses a Lua based config.

Debian 8 Stable (Jessie) still uses contains 1.9; However, Jessie-Backports contains the newer 1.10.x branch.

Be prepared to spend some time on fixing your conkyrc files if you decide to upgrade. I believe I spent a good hour fixing mine.

I typically use Debian-Backports to install newer versions of various software. It’s more stable to use the backports rather than the “testing” or “unstable” branches. However, sometimes you can still break your packages. With that warning, here is a link to the Backports instuctions: https://backports.debian.org/Instructions/

I installed conky from jessie-backports with the following command sudo aptitude -t jessie-backports install conky.

Afterward, the display of my various “conkyrc” files was a mess. And I also found during the execution of conky, it mentioned “converting to old syntax”. I found the following page that was a great help: https://github.com/brndnmtthws/conky/wiki/Convert-to-new-1.10-syntax

Using the information from the link, I first made a backup of my conkyrc files. I installed lua with the command sudo aptitude install lua5.3 then copied the converter script and edited the #! to use the proper lua binary which was /usr/bin/lua5.3.

I ran the script on each of my conkyrc files, but some failed. I edited my originals to clean up various problems including purging all the comments. I also paid attention to the line numbers mentioned by the script when it error-ed out.

During all this conversion and testing, I re-ran my conky-launcher script repeatedly. To give you an idea, my script looks as such:

#!/bin/sh
killall conky
sleep 5
nice conky -c ~/.conkyrc-main -d
nice conky -c ~/.conkyrc-main_2 -d
nice conky -c ~/.conkyrc-disk -d
nice conky -c ~/.conkyrc-vlans -d
nice conky -c ~/.conkyrc-todo -d
nice conky -c ~/.conkyrc-messages -d
nice conky -c ~/.conkyrc-proc -d
nice conky -c ~/.conkyrc-usb -d

After successfully converting the files, some would not display, so I edited the new transcribed files and found a few odd lines that i simply deleted. For example, I had some with a line object.0, which caused the conky execution to die.

Almost fully functional, I still found a major issue of some conkyrc files not showing onscreen or they were way-off from where I expected them.

It turned out that version 1.10.x now has proper multi-monitor support. From the information on the page https://github.com/brndnmtthws/conky/issues/249, I added the ximerama_head = line to each of my conkyrc files.

You should note that your monitor ID’s start with 0 (zero). Therefore my first screen’s config was ximerama_head = 0, and my second screens config was ximerama_head = 1,.

After editing almost all my gap_x = lines, my conky looks exactly like it did before.

Was it worth it? I have no idea.

Your turn, have fun!

- - -

Written and posted with StackEdit.

Friday, September 23, 2016

Prevent downloaded Flowblade 1.x from being downgraded to 0.x upon Debian upgrade

pin

I recently learned about FlowBlade, but my Debian Stable (Jessie 8.0) contained version 0.12, whereas a version 1.8 is available from https://github.com/jliljebl/flowblade/blob/master/flowblade-trunk/docs/INSTALLING.md .

I installed the .deb file using the usual sudo dpkg -i flowblade-1.8.0-1_all.deb method, but when i went to do an sudo aptitude update && sudo aptitude full-upgrade, Debian insisted on “upgrading” flowblade to version 0.12.

I searched the terms “pin” and “pinning” for apt, but that solution seemed specific to repositories. Luckily along the way, I found the correct term “hold”.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Better solution found !!! Jump to the bottom.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The solution was to put the package on hold with sudo aptitude hold flowblade, thusly full-upgrade will now not downgrade. You can conversely unhold with the similar command sudo aptitude unhold flowblade.

One unlikeable caveat however, is that it will still show up as an available update: aptitude search "~U". Since I use Updates: ${execi 360 aptitude search "~U" | wc -l | tail} in my conky setup, it looks like there is always an update to install, which is wrong.

Conky View

Do you have a better solution? Please share!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Better solution found !!! Do NOT “hold” as described above, instead “Pin” the package as described below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Edit your /etc/apt/preferences and add the following block:

Package: flowblade
Pin: version 1.*
Pin-Priority: 1001

This will prioritize version 1.x over version 0.x. When 2.x is released, don’t forget about editing your preferences again!

As always, good luck!

- - -

Edited and published with StackEdit.io