Slock 1.1 background colour

If you use the slock application, like I do, you may have noticed a subtle change with the latest release (which is version 1.1). That change is that the background colour is now teal-like when you start typing your password in order to disable slock, and get back to using your system. This change came from a dual-colour patch that was added to version 1.1.

I personally don’t like the change, and would rather have my screen simply stay black until the correct password is entered. Is it a huge deal? No, of course not. However, I think of it as just one additional piece of security via obscurity. In any case, I wanted it back to the way that it was pre-1.1. There are a couple ways to accomplish this goal. The first way is to build the package from source. If your distribution doesn’t come with a packaged version of slock, you can do this easily by downloading the slock-1.1 tarball, unpacking it, and modifying config.mk accordingly. The config.mk file looks like this:


# slock version
VERSION = 1.0-tip

# Customize below to fit your system

# paths
PREFIX = /usr/local

X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

# includes and libs
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext

# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"\#005577\"
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}

# On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS and add -DHAVE_BSD_AUTH
# On OpenBSD and Darwin remove -lcrypt from LIBS

# compiler and linker
CC = cc

# Install mode. On BSD systems MODE=2755 and GROUP=auth
# On others MODE=4755 and GROUP=root
#MODE=2755
#GROUP=auth

With the line applicable to background colour being:

CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"\#005577\"

In order to change it back to the pre-1.1 background colour scheme, simply modify -DCOLOR2 to be the same as -DCOLOR1:

CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"black\"

but note that you do not need the extra set of escaping backslashes when you are using the colour name instead of hex representation.

If you use Gentoo, though, and you’re already building each package from source, how can you make this change yet still install the package through the system package manager (Portage)? Well, you could try to edit the file, tar it up, and place the modified tarball in the /usr/portage/distfiles/ directory. However, you will quickly find that issuing another emerge slock will result in that file getting overwritten, and you’re back to where you started. Instead, the package maintainer (Jeroen Roovers), was kind enough to add the ‘savedconfig’ USE flag to slock on 29 October 2012. In order to take advantage of this great USE flag, you firstly need to have Portage build slock with the USE flag enabled by putting it in /etc/portage/package.use:

echo "x11-misc/slock savedconfig" >> /etc/portage/package.use

Then, you are free to edit the saved config.mk which is located at /etc/portage/savedconfig/x11-misc/slock-1.1. After recompiling with the ‘savedconfig’ USE flag, and the modifications of your choice, slock should now exhibit the behaviour that you anticipated.

Hope that helps!

Cheers,
Zach

Happy 15th, Noah!

Just wanted to wish you a very happy 15th birthday, Noah! I hope that you have an awesome day, filled with fun and excitement, and surrounded by your friends, family, and loved ones. Those are the best elements of a special day, but maybe, just maybe, you’ll get some cool stuff too! 😎 I also can’t believe that it’s just one more year until you’ll have your license; bet you can’t wait!

Anyway, thinking about you, and hope that everything in your life is going superbly well.

With love,
Zach

Lorell 86200 mesh-back office chair

When I moved back to Saint Louis with my current job, and started working from home, it became readily apparent that I would need a decent office chair (sitting on one of my chairs from the less-than-great dining room table would certainly not be ideal). After looking at a bunch of different options, and realising that I’m not going to spend $1000+ USD on a Herman Miller Aeron, I found some great choices on Amazon.

I finally settled on the 86200 model Executive Mesh-back chair from Lorell:

Lorell 86200 Executive Mesh-back chair

For the price, the chair is actually incredibly well-built. Is it an Aeron? No, of course not, but it also doesn’t carry nearly the same price tag with it. That being said, it also doesn’t feel like a cheaply-made knock-off. The only part of the build quality that is somewhat questionable is the armrest construction. They have plastic shields and are rubber-stamped on the top, but they do serve their purpose nicely. I would like a little further adjustment capabilities on them, but they are what they are. The only other qualm that I have is that the chair makes a bit of noise when moving around, or leaning back. I believe that these sounds are related to the two adjustable nuts near the chair’s base, but I haven’t thoroughly tested that idea.

Assembly of the chair was incredibly easy and straightforward. I did find it a lot easier to do with the help of one other person (for holding the back of the chair in place whilst attaching it to the base, et cetera). If you don’t have help, though, it would be easy enough to do by one’s self. There was one piece of plastic that served no useful purpose, but only an aesthetic element. I chose to not screw that piece into backing of the chair (maybe that’s the engineer in me).

More important than the build quality and the ease of assembly, the seat is very comfortable, even for the 8-10 hours per day that I am in it. I don’t find that I struggle to stay comfortable during that time. Also, the lumbar support and backing are both stronger than other chairs that I have used in the past. Given that I have had trouble with my middle back in the past, I’m pleasantly surprised that I don’t experience any discomfort in that area throughout the day.

So, if you are in the market for a good office chair, but don’t want to spend a huge amount of money, I recommend that you at least look into the Lorell 86200. It is nicely built, easy to assemble, and I find it to be one of the most comfortable chairs in the price range.

Cheers,
Zach