Flirting With Voidlinux
Welcome back my friends to the show that never ends, we’re so glad you could attend, come inside, come inside. If you’ve just arrived by way of prism, the rest of us have completed a freshie ZOL enhanced Voidlinux minimal install that’s ready to build out for workstation duty. Yippie yi yo kiyah!
We’re using ZOL and have snapshotted our freshie base. As noted above, I plan on using this puppy in a workstation capacity. Presuming your hardware isn’t too exotic, this guide should get you a functioning plain vanilla minimal Xorg configuration using twm, xterm, and good 'ol xclock that you can then season to taste with your favorite window manager or integrated desktop environment. I prefer crafting a customized desktop experience built upon a stand alone window manger over prefabbed integrated desktop environments. What can I say? I like to tweak. Maybe you do too. It can be one hell of a time sink but the rewards are there for those willing to put in the effort. If not, no need to stress. Others have gone before you and Voidlinux offers several popular desktop environments. A couple even come standard with kitchen sinks. Yeah, haw!
Prep work is about the same regardless. Its the kind of stuff that is already well documented elsewhere. Yet folks still seem to run into issues. The good news is that the Xorg Crew has made the basics pretty damned easy. Gone are the days of stressing over monitor frequencies and mode lines. Sane defaults just git-r-done. Most of the time. So let’s hop to it.
Base Camp
There’s a few things I want to ensure we’ve established before making a summit bid. Let’s check the weather, eh? Networking should already be configured and sshd started. If not, configure runit and start their engines.
# ln -s /etc/sv/dhcpcd /var/service/
# ln -s /etc/sv/sshd /var/service/
If you have a ZOL setup and have not already snapshotted your new system, now is the time to do it.
# zfs snapshot rogue/ROOT/void@2016070100-freshie
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
rogue/ROOT/void@2016070100-freshie 0 - 316M -
Before proceeding further let’s lay in some fresh provisions and insure our brave new world is up to date. [1]
# xbps-install -Suv
What Time Is It?
I like to keep accurate time. That doesn’t mean I need the accuracy of an atomic clock. Nor that I am willing to sacrifice security. OpenNTPD hits the sweet spot. Let’s install it.
# xbps-install -S openntpd
OpenNTPD’s configuration file is, unsurprisingly, /etc/ntpd.conf. [2] You should be good to go using the defaults. If you have specific time server preferences edit the server line. I prefer to point to IP addresses but feel free to use hostnames. If you want this box to also serve as a time server for other devices on your network, provide the ip address of the network interface you’d like your server to listen on.
[root@rogue ~]# cat /etc/ntpd.conf
# $OpenBSD: ntpd.conf,v 1.3 2015/05/18 11:10:03 dtucker Exp $
# sample ntpd configuration file, see ntpd.conf(5)
# Addresses to listen on (ntpd does not listen by default)
#listen on *
# sync to a single server
#server ntp.example.org
# use a random selection of NTP Pool Time Servers
# see http://support.ntp.org/bin/view/Servers/NTPPoolServers
servers pool.ntp.org
# use a specific local timedelta sensor (radio clock, etc)
#sensor nmea0
# use all detected timedelta sensors
#sensor *
# get the time constraint from a well-known HTTPS site
#constraints from "https://www.google.com/"
Now create runit symlinks. This also starts the OpenNTP daemon.
# ln -s /etc/sv/ntpd /var/service/
Create a User
I’ve already set up a dedicated ZFS dataset for my mortalme user. If you haven’t already, you may want to consider doing likewise before proceeding, e.g.
# zfs create -o mountpoint=/home/mortalme rogue/USERS/mortalme
Add your user. Void’s default useradd creates a dedicated group for each user. We’ll also be adding our user to several convenience groups.
# useradd -s /bin/bash -U -G wheel,users,audio,video,cdrom,input \
-d /home/mortalme mortalme
Do some more housekeeping stuff:
# cp -r /etc/skel/* /home/mortalme/
# chown -R mortalme:mortalme /home/mortalme
# passwd mortalme
New password:
Retype new password:
Lather, rinse, repeat as necessary for additional users.
I prefer not bothering with sudo when I am on a single user system. Your mileage may vary. If so now is the time for you to git-r-done.
Installing Xorg
There’s basically two approaches to Xorg. Install the xorg metapackage, in all of it’s splendor and glory and reap the low hanging fruit. Else exercise finer grained contorl by picking and choosing your components. I’ll be opting for the latter and using xorg-minimal. [3]
bash-4.3# xbps-install -S xorg-minimal xf86-input-evdev
We’re going to need some graphic drivers. But which?
bash-4.3# lspci | grep -i vga
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rage XL PCI (rev 27)
This box is using the onboard ATI Rage controller. Let’s check on drivers.
[root@rogue ~]# xbps-query -Rs xf86-video | grep ati
[-] xf86-video-ati-7.7.0_2 Xorg ATI Radeon video driver
I like to also install the vesa drivers so that I always have workable fallback video should the GPU specific driver hit a glitch in its get-along
# xbps-install -S xf86-video-ati xf86-video-vesa
Now we need to install some fonts. Everyone has their faves. I have mine and they’re refined. Enjoy seasoning to taste. If, on the other hand, you want a sampling of common fonts the xorg-fonts meta package may be your ticket.
# xbps-install -S font-inconsolata-otf terminus-font dejavu-fonts-ttf
We’re ready for a window manager. I like to include the fallback components for getting a plain ol' startx. They’ve been around forever and come in handy for driver verification and testing purposes.
# xbps-install -S xterm, xclock, twm
Start Your X Engine
We’re now ready to test our handiwork. Login as your mortalme user. A simple startx sans any additional adornment should launch into twm session sporting xterm and xclock. Ooh, la, la!! If not, examination of /var/log/Xorg.0.log may provide insights.
Now that you have a known good and working Xorg you’re ready to spice things up with a WM or DE. I will be using StumpWM. That’s a project for another time.
If Stump’s modus operadi were not so well tuned for Emacs my window manager shortlist might include bspwm, i3, and OpenBOX. OpenBOX is a floater. If you’re unfamiliar with tilers, now might be a good time to take a gander.
Else otherwise you may be wanting to get on with installing a full blown desktop environment. Xbps offers metapackages for several popular options. If 8,000 pound gorillas are not your thing but you’d still like the application integration and cohesion afforded by a DE, you may want to check out LXDE. New development is happening on LXQt but it seems glitchy yet last I looked.
I recommend Enlightenment if you’re looking for some middle ground between the sparseness of a stand alone window manager and the bloat that many DE’s have become. Over a decade ago Enlightenment was the WM of choice for most Gnome users. In more modern times Enlightenment has been evolving towards a full featured DE in its own right. Yet Enlightenment remains fairly nimble and offers a drop dead gorgeous and elegant out of the box experience that lets you tune just about any knob you’d want to.
In any case, you may want to break out a little ZFS awesome sauce and snapshot your system first. Groove on it.
# zfs snapshot rogue/ROOT/void@2016071400-xorg
Geronimo, you’re ready to go. Big medicine.
Peace.