Changing the default fallback subsitution fonts in Linux

The default/fallback/substitution fonts are those used when an application or webpage doesn't specify a specific font or when a character glyph is not available in the selected font. When the CSS contains "font-family: sans", which font is that? Note: I'm using an Ubuntu-based distribution, but the details should apply anywhere fontconfig is used.


Running ezstream as a startup service with Upstart

This is a method to run an ezstream icecast2 audio stream as a startup service within a Upstart init system. This method will also work for anything else which needs to run as a service.

I assume you have icecast2 installed and functioning:

Create a configuration file for ezstream in /etc/icecast2/ or in a project specific directory:

Forcing a mysqldump to always be nice to CPU and I/O

Exporting or dumping a database with mysqldump, pg_dump or sqlite is a common procedure. The problem is the programs always run as fast as possible generally monopolizing your hard disk and sometimes your CPU. This can noticeably slow down other processes. Generally, responding to a HTTP request or a simply a ls command is more important than the database dump. If the dump takes slightly longer you'll probably never notice it.

Scripting public-key-access-only user creation in Linux

The process of adding many users to a new Linux system can get tedious, especially if it is involved. So, let's replace the process with a simple shell script.

For this example, public keys are the only allowed login method. Password login is disabled, so the password is not set. The first step is to run set -e to stop the script on any errors. Next assign readable variable names, and check they aren't null. Next the user is created, and as the user the public keys are setup.

ASCII control characters escape sequences in iTerm

Normally I work in Windows or Linux. Currently, I am working on an iMac. Rather than fighting years of muscle memory, I switched the Command and Control keys in the Keyboard preferences. Problem is now Control keys in iTerm don't work. After some research I determined how to send Control characters with both Command and Control.
Note: I know this could use some screenshots. No time right now.
Here is how to make Control-C work in iTerm when Control/Command have been switched:

Subscribe to linux