Category Archives: Arch Linux

Vim colorscheme tuneup

I hadn’t thought about it for awhile but today I updated by Vim colorscheme for the first time in about two years. In the process I found a few that were notable:









I think this one is based on neon. link




jellybeans blueberry


This is what I decided on. It’s jellybeans with a twist. I put this in my ~/.vimrc for the adjustments:

colorscheme jellybeans
" Jellybeans colorscheme edits (not working)
"let g:jellybeans_overrides = {
"\   'Normal': { 'ctermbg': '242' }, 
"\   'CursorLine': { 'ctermbg': '238' },
highlight Normal     ctermbg=323232
highlight Normal     ctermbg=303030
highlight CursorLine ctermbg=238
highlight Visual     ctermbg=240

Others may have different results though as the theme alters dynamically as per background (mine is #323232 btw).


I got these from a collection today and have put them in the AUR

xuserrun – Run a command on the currently-active user’s server display

xuserrun is a bash script to run a command on the active server display.  This is primarily necessary if from within another environment  (different user, console, cron, boot script…).  xuserrun gathers DISPLAY and user environmental variables via systemd and passes them on to be able to dothis. xuserrun is designed for use with only a single user server display. Running it is basic:

xuserrun xclock -digital

Tto put out a notification:

xuserrun notify-send "Hello, Dave."

It’s available for Arch users in the AUR and is also downloadable on github.

Firefox: Defining font type and size


What a professional typesetter knows is the importance of a good font. For centuries typesetters have evolved fonts to provide ease of reading that we know today. Having the text look good in the web browser is a nice bonus; choosing the right type and size can make a big difference to how well we read, especially if used quite a bit.

Font installation

To make a web page feel right — as the designer had in mind — the fonts should be on your system that a page requires. On some Linux systems, only the basic fonts are installed. Installing missing fonts usually adds nice touches that may have not been realized before. To help discover missing fonts, the Context Font add-on will display font type and size of a selected font. Many sites define their fonts as Arial, or sometimes, Verdana, or Georgia; these fonts can be added by installing Microsoft’s core fonts; a few define theirs with Apple fonts, and a few less with others. These font packages contain the most popular fonts (for Arch Linux):

arpa -i otf-bitter otf-exo ttf-bitstream-vera ttf-dejavu ttf-inconsolata ttf-lato ttf-liberation ttf-mac-fonts ttf-opensans ttf-win7-fonts

Font size

To get a good idea on good font size to use, look at a book. The size there that feels comfortable will likely feel comfortable on the monitor too. When choosing font size also think about making the various typefaces the same size (i.e. serif, sans-serif, and monospace).

Font type

Being able to define one’s own font can help readability quite a bit; however,keep in mind, tastes differ. In Firefox, the settings that can be defined are generic typefaces of: serif, sans-serif, and monospace (additionaly, the minimum font size can be set). It should be known though, that many sites still force a specific font type and size; however, gradually, a greater number of sites are using generic typeface definitions. In the future this means that personalizing fonts will be of greater availability. When choosing a font type, keep in mind to pick one that helps improve readability rather than one that grabs ones attention.

Font tests

Here is a basic test of what Firefox’s base-defined font types and sizes look like (click to view):

Font test: Type and size (based defined). (click to view)

Font test: Type and size (based defined).

Here are what a few of the common font groups look like (click to view):

Font test: Common webfonts group 1. (click to view)

Font test: Common webfonts group 1.

Font test: Common webfonts group 2. (click to view)

Font test: Common webfonts group 2.

What did I choose?

After adding all the new fonts and testing them, I found out I like a varied group; they read beautifully and scale good. Ultimately I came up with these:

Typeface Font Size
Serif Bitter 13
Sans-serif Open Sans 13
Monospace DejaVu Sans Mono 12
Minimum 10

DejaVu Sans Mono and Open Sans are good fonts and, for me, hard to beat. Rather than just define them in Firefox, I prefer to define my serif, sans-serif, and monospace fonts system-wide. This allows me to have a consistent overall look to me desktop. Here is my Fontconfig configuration (note: fonts are listed preferential/available first): fonts.conf.

For GNOME the fonts sizes are:

Setting Font
Window Titles Cantarell Bold 11
Interface Cantarell 11
Documents Cantarell 11
Monospace Monospace 10

What they look like:

Font type and size.

Font type and size.

Common webfont groups 1

Common webfont groups 1




External monitor as Discrete

I use my laptop primarly at home with an external monitor as discrete, meaning that I have the laptop monitor turned off and I only use it. At times this is also called a dedicated monitor. GNOME can be set to disable the laptop monitor and enable the external but it wasn’t able to hotplug the monitor after I returned the laptop, and at times wouldn’t do so after resuming from sleep. Also in the proccess I discovered that the server DPI setting wasn’t being done correctly and that GNOME’s text scaling needed to be adjusted. So I decided to do it in a script and it turned out to be pretty easy.

I wrote the basic script that toggles monitors depending if the external monitor is present, then it detects correct physical size dimension of the screen so the the correct DPI can be set. After this, I added a startup script (.desktop file), a pm-utils script to runafter resuming, and a udev script to detect andset the monitor when plugged in. The udev rule is generic but appears to be working for a lot of people, it relys on Kernel Mode setting (KMS) so doesn’t work for me wiht the catalyst driver, but every thing else works great. I put it on github for any who like to look at it.

The bash script cannot be used right away instead a couple bit will need to be directed:

 The package cannot be installed directly and be expected to work, some edits
 will need to be made.  First, in the resume script '80_discretemon' a username 
 will need to be defined; next, the monitor names will need to be defined as
 created by the driver in 'discretemon'.

Also, the monitors can be defined in xorg.conf but the fix for after resume from sleep, remains.

Section "Monitor"
  Identifier  "0-LVDS"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName"  "Acer Aspire Laptop Screen"
  Option      "DPMS" "true"
  Option      "TargetRefresh" "60"
  Option      "Position" "0 0"
  Option      "Rotate" "normal"
  Option      "Disable" "true"
  DisplaySize  344 194 # only works with xrandr disabled.


Section "Monitor"
  Identifier  "0-DFP1"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName"  "Samsung SyncMaster SA350"
  Option      "DPMS" "true"
  Option      "PreferredMode" "1920x1080"
  Option      "TargetRefresh" "60"
  Option      "Position" "0 0"
  Option      "Rotate" "normal"
  Option      "Disable" "false"
  DisplaySize  476 268 # only works with xrandr disabled.
  Option      "DPI" "102 x 102"

Catalyst Driver, a Journey Taken… Better than I’d Known

I previously read about (a good number of times) people not having the best experiences with AMD’s proprietary driver. However, with my new laptop I decided that no matter how much I love the open-source driver (bought it because AMD opened the specs to it), that realistically it would take a few years before I’d be able to play games with it. The AMD/ATI website says 7xxxM series is supported so I decided to try it.

Prepare for Installing Catalyst

Removed open-source Radeon driver options, commented /etc/X11/xorg.conf.d/20-radeon.conf.

Installing Catalyst Driver

Using Vi0l0’s excellent catalyst repository, I added it to /etc/pacman.conf:

[catalyst] Server =$arch

Add Vi0l0 key:

sudo pacman-key -r          NUM
sudo pacman-key --lsign-key NUM

Installed (using pacman shortcuts script (pm):

pm y
pm i linux-headers catalyst-hook catalyst-utils lib32-catalyst-utils

Using catalyst-hook here to have the module put into initramfs when kernel versions areupgraded (provides catalyst driver). Server-Configuration

sudo aticonfig --initial 

Added module to load at boot:

echo '# Load AMD Catalyst driver
fglrx' | sudo tee /etc/modules-load.d/fglrx.conf

Disabled Mode Setting: Added GRUB_CMDLINE_LINUX="nomodeset" (for GRUB2) to /etc/default/grub), then:

sudo grub-mkconfig -o /boot/grub/grub.cfg


Reboot, and driver loaded properly (lsmod | grep fglrx), and direct rendering is enabled (glxinfo | grep direct).

Configuring Display

Created root .desktop for ATI Catylyst Control Center:

cp /usr/share/applications/amdcccle.desktop ~/.local/share/applications/
sed -i 's/Exec=amdcccle/Exec=gksudo amdcccle/' ~/.local/share/applications/amdcccle.desktop
chmod +x ~/.local/share/applications/amdcccle.desktop


  • Color Temperature: Use display’s settings

Display Manager

  • Selected down arrow for both monitors to change to correct settings.

Logout/Login: Gnome 3 crash, extensions disabled
Login: Monitor settings lost, both on lower resolution (open-source radeon driver and catalyst define monitors differently so Gnome using xrandr flubs the first time after.


  • Pixel Format: RGB 4:4:4 (Full RGB)
  • Adjustments: Overscan 0%

Switchable Graphics

Catalyst driver does not recognize discrete GPU properly, thinks integrated GPU is discrete GPU:

Show GPUs:

aticonfig --list-adapters
* 0. 00:01.0 AMD Radeon HD 6520G          # * Default
  1. 01:00.0 AMD Radeon HD 7600M Series


aticonfig --px-list
PowerXpress: Discrete GPU is active (High-Performance mode).

I tried using sudo aticonfig --px-igpu to switch to integrated to see if it would switch but got an server hang. Also tried sudo aticonfig --px-dgpu to see if aticonfig --px-list was in error but no luck. Tried using discrete GPU BusID (BusID "PCI:1:0:0") in xorg.conf but that didn’t work either. The catalyst driver doesn’t properly recognize the 7670M GPU as discrete GPU. Entered bug.


When I first started with GNOME mouse clicks would miss at times and sometimes keypresses did too, I added export CLUTTER_VBLANK=none to ~/.bash_profile and it fixed this. Oddly, I commented it later because I thought it might be related to another bug (it was not) and forgot to enable it again, but I haven’t seen the problem since.


Hard to believe there is not official AMD Catalyst bugzilla (odd how their website points to the unofficial one) so I’m a bit worried about the near future but think all will be fine.

The driver works good. I’m getting a consistent 50fps on Urban Terror and tried Doom and it looks pretty good. Disappointed about not being able to use the discrete GPU, would have been nice. Gonna keep using catalyst, its working good.

Here’s a script i built called gpuswitch I plan to use when gaming later. Night.


systemd transfer… Done!

Well, after being throughly put off, I dived into systemd and have done a complete (pure) systemd installation; and I can tell you, I think its pretty nice.

I had no plans to change Arch’s initialization system, but I needed to switch to systemd because parts of GNOME 3 require it. Its been a long time a coming but systemd is a good thing for Linux, a real good thing. Arch’s init system was legendary. It’s what I believed what attracted a lot of people about Arch. Being so pulled to for me was it’s basic, straight-forward setup, so I wasn’t exactly excited about having to switch to systemd. systemd setup isn’t quite as easy as Arch’s rc system but I like it and found it has good logic. The best thing about systemd though will be its unification between other distros. This means that setting up a good number of programs will be similar no matter what distribution documentation is read. Also systemd will save a good amount of developers time as many of the distribution-based init scripts will no longer have to be specifically written (and will rather be included in the application). Plus it inclusion of D-BUS makes it a good deal more powerful.

Here’s what it looks like. It’s not quite as nice looking as Arch’s, but oh well:

systemd is the future… yeeeaaahh! A more unified Linux front.

A basic detail of my systemd install can be found on my GNOME 3 Setup page. Even better to read the whole page on the wiki which is really well done.

Download Package Source Files

I wanted a way to easily download source files for quick editing. Sure abs and numerous AUR-helpers do it but I wanted a simple all-together program/script that could do it, and it turned out to be pretty easy. I wanted to be able to define the repository, and then the package and I did it!

pacpull extra/a52dec

aur/ can be used here as well as the other repositories. I set up /etc/abs.conf and $XDG_CONFIG_HOME/cower/config to use my pkgbuilds directory ~/.arch/pkgbuild (ABSROOT="/home/todd/.arch/pkgbuild", TargetDir = /home/todd/.arch/pkgbuild/aur respectively) so it looks pretty nice:

aur  extra  own  testing

If the repository is wrong it will list the available repositories:

pacpull extar/a52dec
 Not a valid repository:

And it’s nice and it’s basic:

Arch Linux Legacy Blue1 Toon Logo

I created this because I liked the legacy logo and was inspired by Encelo’s Arch toon logo. It needs help on the gradient. To do a curved gradient, I had to rely on a blur (because Inkscape does not appear to be able to do curved gradients) and it bleeds a bit. But otherwise, I think it turned out pretty good. Under the CC license so be free to do what you want with it.

makepkg Shortcuts Script

This one is not as important as the pacman related script but I find I use it often too. I maintain several packages in the AUR and it comes in handy to quickly refer to common tasks related to makepkg. The md5sum function still needs a bit of work (i.e. it requires the build function in the PKGBUILD be able to place the md5sums nicely). Otherwise it’s pretty ready. Here’s what it does:

 mp <option> - common makepkg building tasks
  b - build package (install dependencies if required)
  m - update md5sums
  r - remove previous build directories
  s - create source files for upload, prompts for submission to the AUR
  t - create PKGBUILD template

(ar)ch (pa)ckages – a generic package tasks script for Arch Linux

I once saw a wrapper-script for pacman in the forums that was basically a short-hand version of common pacman tasks. I thought this was a good idea and over the last couple years, I’ve expanded on it. It does just about everything I need it to. It’s real basic and I call it arpa. Here is a basic synopsis:

arpa [option] [*package] - a generic package tasks wrapper script
  -e, --explicit - install a package as explicit
  -g, --get      - get/download package upgrade(s)    : -G get pkg upgrades all
  -i, --install  - install a package                  : -I install as dependency
  -l, --list     - list package files                 : -L list pkgs installed
  -o, --owns     - owning package of a file
  -q, --query    - query for an installed package     : -Q query w/ description
  -r, --remove   - remove a pkg and its deps          : -R force, no argue orphs
  -s, --search   - search for a package               : -S search w/ description
  -u, --upgrade  - upgrade system                     : -U upgrade AUR
  -y, --sync     - sync package db

Good for me to have this around so I can remember everything :), and it is in the AUR.

Back to Blue

Well, I got my Arch installed again and it feels good. I’d been working in Ubuntu for awhile because my older laptop had problems with suspend (that I desperately needed) that I couldn’t figure out in Arch and because of serious time constraints. Being back though, I forgot how much I missed the simplicity and straightforwardness of Arch. I had built a helper script for Ubuntu/Debian that could do just about anything but it took awhile to get there. So far on Arch I’ve actually done a lot less bug fixing, tracking down issue take less time, and with the AUR all the packages are there.

I’d been fixing bits in the wiki as I gone through setup (which is still doing great Misfit) and was able to re-write and add considerably to the MiniDLNA today. Feels good.


Get every new post delivered to your Inbox.

Join 53 other followers