Slackware 15 install

22 February 2022
While Slackware 14.2 has aged a lot better than every other Linux distribution I have ever used there were occasionally problems with some of its ageing components, which is not surprising since it is now almost six years old. The vast majority of this article was written using the Slackware-current development branch before the formal release of Slackware 15, mainly around the time of the RaspberryPi IPSec server since the SARPi (Slackware ARM on RaspberriPi) project had mostly stopped supporting Slackware 14.2 by that time, and since then I have used the beta and release-candidate versions of Slackware 15 in production use. With Slackware 15 now officially released it was time to publish this updated mini-HowTo.

Slackware system setup

Although not everything here is essential this section covers base Slackware system setup that I prefer to do on a newly installed machine before anything else, because the fresh install defaults are ones that will sooner or later cause irritation if not trouble. Individually they are mostly simple changes that I prefer to get done all in one go before going onto more involved customisations.

Enabling the Sudo command

Logging into root via SSH using a password is usually disabled by default these days, and although it is easy to reenable the preferred practice is giving users permission to use Sudo instead. To do this in /etc/sudoers around line 82 uncomment the directive to enable sudo for those who are members of the wheel group; for some reason this file is supposed to only be edited using the visudo command but in practice I have not had issues using other editors.

## Uncomment to allow members of group wheel to execute any command %wheel ALL=(ALL) ALL

Adding non-root users to the wheel group can then be done using the following command:

usermod -a -G wheel ${USER}

Multilib (32-bit software) support

The ability to run 32-bit software on a 64-bit installation is what Slackware calls Multilib and while seldom needed these days it is still worth keeping around, particularly as some software such as Wine depends on it. It is something I prefer setting up early on because it is one of those things that is unlikely to go wrong but if it does it will seriously screw the system up. The official documentation more or less amounts to the commands below:

lftp -c "open ; mirror -c -e 15.0" cd 15.0 upgradepkg --reinstall --install-new *.t?z upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z

It is advisable to reboot the system after doing this. If using Slackpkg to keep things up to date you may want to install SlackPkg+ and enable the Multilib repository — the later parts of this guide assume this case.

Setting up a Bash profile

A very minor point but there are two settings I commonly like to change with the default Bash login. One is changing the appearance of the prompt, and the other is setting up a sub-directory for various scripts I have accumulated over the years. Both of these are done using the following .bash_profile within the home directory. And yes even today I get caught out by the inconsistent use of this script versus .bashrc between different Linux distributions..

export PS1='[\u@\h \w]\$ ' export PATH=$PATH:~/bin/

Note the use of single quote marks ('..') rather than inverted commas (aka double-quotes: ".."). With the latter the dollar sign escape unlike the other escape sequences is not converted to a hash when switching to root.

Setting group membership

In the past non-membership of certain groups been the cause of problems with things such as removable media, so it is a good move to make sure that any non-root logins are members of hardware-related groups, which can be done using the command below; I suspect there are other groups that non-membership of can also cause issues:

for grp in video,audio,plugdev,cdrom; do usermod -a -G $grp $USER; done


It was on my laptop while in China that I adopted Slackware as my main Linux distribution, and since it has a US keyboard I kept it in the default US locale which had the side-effect of bringing with it the ghastly US month-day-year date format. For other systems equipped with UK keyboards I set the system-wide locale to UK by editing /etc/profile.d/ as shown below:

# en_US is the Slackware default locale: export LANG=en_GB.UTF-8

For some reason programs such as Thunderbird also use the system locale to decide whether to show the time in 12-hour or 24-hour format, and the UK locale of en_GB adopts 24-hour format. This suits my tastes fine, although 12-hour vs. 24-hour really ought to be a setting in its own right. On some of my systems if a USB keyboard is disconnected and reconnected the keyboard layout reverts to US layout, in which case the following command will fix things back to how they should be:

setxkbmap "gb"

Adjusting memory swappiness

Linux by default limits how much program memory it allows to be resident in physical memory before it starts paging things out to swap, but the default swappiness is one that is more suited to the days of spinning hard drives than the solid-state drives that are now almost universal. The “unused” physical memory is used for filespace caching, and since reading stuff off an SSD is already pretty fast whereas swapping out program memory involves erase-write cycles on the swap partition, I prefer a swappiness that is heavily biased against swapping out program memory. I normally opt for a value of 30 rather than Linux's default of 60, although there are cases such as databases and virtual machines where values as low as 10 may be appropriate.

echo 30 > /proc/sys/vm/swappiness

To be made permanent this line needs to be placed in a startup script such as /etc/rc.d/rc.local that is run upon boot.

Locking down SSH access

For externally-accessible systems I think passwords are an inherently bad way of doing authentication and I always instead use public keys, but within a secured LAN there are many instances where keeping password logins enabled is a justifiable compromise between security and convenience. The following /etc/ssh/sshd_config snippet only allows password logins from local systems:

# Only allow passwords from LAN addresses PasswordAuthentication no ChallengeResponseAuthentication no Match address PasswordAuthentication yes

Confusingly PasswordAuthentication on is own is not enough to disable all password logins if PAM is enabled — ChallengeResponseAuthentication also needs to be set to no. Since future versions of OpenSSH may bring in other pit-falls anyone relying on this snippet is advised to check that passwords are indeed disabled for external IP addresses.

Configuring the graphical interface

Since at least 2001 I have used IceWM as my window manager although post-2015 when I adopted Xfce for professional use I have been making greater use of the latter. Each has its own set of advantages but it comes down to IceWM being light-weight and much the same as it has always been, which is pretty much why I started using it in the first place, and Xfce being an all-in desktop environment appropriate for getting work done. So far bit-rot has not been too much for a problem with these choices, with IceWM v2.4.0 having a lot of advancements over the v1.3.8 build I had used since at least 2016, and both are far better than the monstrosities that normally passed for a default user interface in the last decade or so.

Disabling Nouveau

Blacklisting of Nouveau is something that the NVidia Linux drivers require, and I suspect some other vendors may be the same, and for Slackware this can be done by installing the xf86-video-nouveau-blacklist package. This package is on the installation DVD within the extra directory.

Setting up the login manager

In Slackware SDDM is now a standard part of the KDE package and as a result inclination is use it rather than hack around with XDM like I did in the past. However if like me you prefer to exclude this diskset then SDDM can be installed stand-alone since it does not depend on anything else in the diskset — if so and if the Slackware DVD is inserted something like the following will do the trick:

mount /dev/sr0 /mnt/dvd/ installpkg /mnt/dvd/slackware64/kde/sddm-0.19.0-x86_64-10.txz umount /mnt/dvd/

You can also download sddm-0.19.0-x86_64-10.txz. For some reason the default install includes an on-screen keyboard intended for tablets, which is caused by the following in /etc/sddm.conf — for a desktop or laptop system with a physical keyboard this line ought to changed to remove the qtvirtualkeyboard keyword:

# Input method module InputMethod=qtvirtualkeyboard

Note that deleting or commenting out the entire line does not work, presumably because it then falls back to some internal default that includes the parameter, so the edited line should look like:

# Input method module InputMethod=

I also prefer the maldives theme to the default one:

[Theme] # Current theme name Current=maldives

On the SDDM login screen there is an option for changing keyboard layout, but in a fresh install it only lists ‘US’. To get it to show UK as well /usr/share/sddm/scripts/Xsetup should look like the following, the relevent line highlighted in bold:

#!/bin/sh # Xsetup - run as root before the login dialog appears # Make sure that Plasma and SDDM work on older GPUs by forcing Qt5 to use # software GL rendering if the OpenGL version is not new enough: OPENGL_VERSION=$(LANG=C glxinfo |grep '^OpenGL version string: ' |head -n 1 |sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g') if [ "$OPENGL_VERSION" -lt 2 ]; then QT_XCB_FORCE_SOFTWARE_OPENGL=1 export QT_XCB_FORCE_SOFTWARE_OPENGL fi setxkbmap "gb,us"

Note that previous versions of Slackware had this under /usr/local/share/sddm/scripts/Xsetup.

Setting graphical login

Slackware defaults to runlevel 3 which is text-based login. For graphical logins change it to runlevel 4 within /etc/inittab:

# Default runlevel. (Do not set to 0 or 6) id:4:initdefault:

Screen hangs rather than showing SDDM login

I suspect this is an artefact of installing SDDM without the rest of the KDE diskset but without the sddm being setup with certain permissions and an actual home directory you can get a frozen screen with just the mouse pointer rather than going to the SDDM login prompt as expected. One such case is IceWM hanging with just the background image upon logout but I have also known black screens with Slackware-current at other times the SDDM screen was expected. The solution is setting up the sddm user with permissions and an actual home directory to operate within:

usermod -a -G video sddm mkdir /var/lib/sddm chown sddm /var/lib/sddm usermod -d /var/lib/sddm sddm

Building & installing IceWM

IceWM requires imlib2 which can be installed via SlackBuilds, and although IceWM itself can also be built this way it is a rather old version at time of writing so I prefer to built it from the upstream sources. Although not essential the theme I prefer to use came with a patch that removes the drawing of borders around some of the taskbar components which I have recreated for more recent versions of the IceWM source code.

cd icewm-2.9.5 patch -p0 < icewm.patch ./ ./configure --prefix=/usr/local make make install

To make IceWM available in SDDM's session selection menu create /usr/share/xsessions/icewm.desktop with the following content:

[Desktop Entry] Version=2.9.5 Name=IceWM Session Comment=Use this session to run IceWM as your desktop environment Exec=dbus-launch --exit-with-session icewm-session Type=XSession

The theme I used with IceWM is SilverXP that has been modified as a workaround for some issues with drawing window decorations on some X11 servers. I managed to locate the original SilverXP distribution from an old source RPM but since the licensing of the theme is not clear I have not repackaged it with my fixes.

IceWM font size problems

In the past I have had issues with some text such as menus and window titles being too big or too small in IceWM on systems with NVidia graphics cards, which most recently started happening without any obvious change to the X11 server configuration. Adding a DPI entry to the monitor section of xorg.conf sorts it out, although you may want to try different values:

Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" Option "DPMS" Option "DPI" "96x96" EndSection

Using IceWM for VNC sessions

With version 1.11.0 the vncserver part of TigerVNC was redesigned to supposedly aid distribution packaging and the new version — confusingly referred to as vncserver in the documentation — is not intended to be run directly by individual users. And the underlying Xvnc has also had changes so copying the vncserver script from a previous version does not work. Thankfully the Slackware package patches vncserver so that one of the places it looks for the X-Session script is ~/.vnc/xstartup whereas the upstream version only looks within /etc/X11/. In any case to use to use IceWM specifically for VNC sessions a ~/.vnc/xstartup something like the following will do:

#!/bin/sh [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources exec icewm-session

Some of the options that used to be specified using command-line parameters to vncserver are now set using ~/.vnc/options but I do note that the session option for choosing a window manager is broken. If you are not fond starting VNC servers from inetd — details towards bottom of the Xvnc manpage — you are pretty much stuck with using nohup which I think is regressive move.

July 2022 update: Thankfully I still had the May 2021 Slackware beta DVD at hand and on it is the TigerVNC 1.10.1 package on it. I use this package on all my systems since I greatly prefer the old vncserver behavior. Needless to say you need to check the file signature yourself.

Setting up Xfce

I have already written a piece on my Xfce setup for Slackware 14.2, and although I suspect the way it shows things being done was not quite the correct way of getting things working, I have not looked at it since and it still seems to work with the latest Xfce. One thing to keep in mind is that Xfce 4.16 has removed things such as ~/.gtkrc-2.0 support — I do note that Slackware 14.2 is not alone in still using Xfce v4.12 whereas v4.13 seems to be when most of not all remaining GTK2 support was removed.

Importing Windows fonts

I have accumulated a lot of fonts over the years, some being conversions of System7-era Apple Macintosh font packs that I have long since lost the original disks, whereas others I filleted from various Microsoft Windows installations I have had over the decades. In most cases they give better results than various free font packs floating on the internet, so to use then in Linux copy them somewhere convenient such as /usr/share/fonts/windows and then create a config file that specifies this location:

<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <dir>/usr/share/fonts/windows</dir> </fontconfig>

The above config can either go into /etc/fonts/local.conf or in a standalone file under /etc/fonts/conf.d/ and then fc-cache will need to be run to get everything updated.

XTerm font size

XTerm is one of those program I ought to have stopped using long ago in favour of better alternatives, but one way or another I always seems to end up using it. The font used is one of many settings that can be changed by entries within /.Xdefaults and I wanted to use a much smaller font than the apparent new default. The snippet below does this as well as having black text on a white background and a right-hand scrollbar.

xterm*VT100*geometry: 94x28 xterm*font:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 xterm*background: white xterm*foreground: black XTerm*pointerColor: black XTerm*pointerColorBackground: white xterm*scrollBar: true xterm*rightScrollBar: true xterm*title: XTerm !xterm*iconName: XTerm !xterm*saveLines: 50000 xterm*utf8Title: true

The .Xdefaults can then be reloaded using the following command, after which it will affect newly created XTerm windows.

xrdb -load ~/.Xdefaults

Mouse acceleration

While I like having a high mouse acceleration I dislike there being a threshold before it kicks in — the command below removes this threshold is one is present. The fraction is the acceleration itself and 200% might be a bit fast for people not used to using trackballs.

xset m 2/1 0

The xset command can also be used to control the display in various ways.

System maintainance

In the past I used slapt-get which is a clone of Debian's apt-get and at one point had a repository with package dependency information, but these days I have moved over to slackpkg with the SlackPkg+ plugin because the former's package dependency database seems to have disappeared and the latter now ships with Slackware itself. Configuration comes down to selecting a suitable mirror in /etc/slackpkg/mirrors and in this case enabling some third-party respositories and Multilib updates in /etc/slackpkg/slackpkgplus.conf — the latter with all comments and blank lines stripped out will look like the following:



There are several third-party responsories for Slackware although in the case of AlienBob he is so close to Slackware that AlienBob's SlackBuild collection is official in all but name, and there is a UK-based mirror and UK-based repository suitable for package tools. Some of the software builds such as Chromium and VLC are unusually large since they statically link in most of the optional dependencies, but if a software package is not within the main Slackware repositories AlienBob's is always the next best port of call.


Slackbuilds is Slackware's equivilent of the FreeBSD Ports collection, which is a source-based distribution channel that I find preferable to using up-stream tar-ball distributions. The SBoPkg utility helps to automate the process of installing from Slackbuilds, but unlike in the past I prefer to use AlienBob-built binaries unless there is a specific issue I need to work around or feature I need. At time of writing Slackbuilds has not yet introduced a branch for Slackware 15.0 but in practice many of the scripts for 14.2 will still work since they are source-based.

Time synchronisation

To find out whether your system clock is running fast or slow and if so by how much, you can use the ntpdate with the -q flags:

/usr/sbin/ntpdate -q server, stratum 2, offset +13.887426, delay 0.02780 server, stratum 1, offset +13.886995, delay 0.03426 server, stratum 2, offset +13.886550, delay 0.02824 server, stratum 2, offset +13.887994, delay 0.02916 19 Feb 01:00:13 ntpdate[26271]: step time server offset +13.886995 sec

This can be run as non-root. However to set the clock run the command as root with just an NTP server address as shown below. Keep in mind that a big time correction might cause a few things to trip up, at least temporaraly, particularly if the time adjustment crosses midnight.

/usr/sbin/ntpdate 19 Feb 01:02:18 ntpdate[26273]: step time server offset +13.890185 sec

Networking configuration

A major change in Slackware 15 compared to 14.2 is better integration of IPv6 and VLAN support, the settings of which is now specified within /etc/rc.d/c.inet1.conf alongside IPv4, which thankfully has had very few changes over the years. Something like adding secondary IP addresses still need to be grafted in as commands somewhere like /etc/rc.d/rc.local but I prefer this to using NetworkManager, the latter of which Slackware now also includes as a network management option.


Although Slackware doesn't include a stock /etc/rc.d/rc.firewall script, Slackware's boot scripts are wired up to execure such a file if one is put at that location and is made excutable. The following example disallows incoming IPv4 TCP connection attempts and disables forwarding, which is all that is really needed for a typical workstation. For IPv6 replace iptables with ip6tables.

# # /etc/rc.d/rc.firewall # case "$1" in 'start') iptables -t filter -P INPUT ACCEPT iptables -t filter -A INPUT -i lo -j ACCEPT iptables -t filter -A INPUT -p tcp --syn -j REJECT iptables -t filter -P OUTPUT ACCEPT iptables -t filter -P FORWARD DROP ;; 'stop') iptables -t filter -P INPUT ACCEPT iptables -t filter -P OUTPUT ACCEPT iptables -t filter -P FORWARD ACCEPT iptables -t filter -F INPUT iptables -t filter -F OUTPUT iptables -t filter -F FORWARD ;; *) echo "Usage: $0 {start|stop}" ;; esac

Wireless access

In Slackware 14.2 I used wicd which is a lightweight wired & wireless network manager, but presumably since it is Python2-based it has been dropped in favour of NetworkManager. For the latter there is either the graphical nm-applet or the text-based nmtui configuration interface. I prefer to avoid NetworkManager for desktop systems but for laptops hopping between wireless networks it is the lesser of evils.


Although the original intention was to carry over from previous Slackware 14.2 articles information on getting VirtualBox up and running as well as some laptop-specific bits'n'pieces I ultimately decided to limit the scope of this write-up to things that have been tested with Slackware 15 itself. Although the procedures presented here were checked with the release version of Slackware 15 most of the actual drafting was based in experience with earlier developmental versions of Slackware, mainly a touch over twelve months ago with the IPSec server on a RaspberryPi 4 and then further refined when I built my professional workstation about eight months ago. As a result a few of the work-arounds are quite likley redundant but nevertheless still included as testing with the actual Slackware 15 release has been limited; conversely there are some subtle issues when a previous Slackware-current installation is upgraded to Slackware 15 rather than being a fresh install which have been excluded.

Slackware has aged well but the time since 14.2 was released meant that it was getting that bit too stale so many people — myself included — ended up using the developmental version on production systems. In fact it looks like the updating of Slackware 14.2 had all but stopped once Slackware 15.0 went into release-candidate status. To my knowledge the cause of the long period of time between 14.2 and 15.0 was partly holding out for certain updates to critical software and partly due to personal issues with the Slackware maintainer Patrick Volkerding. I would have bought Slackwate 15.0 given the chance but there does not seem any way of doing this without some middle-man taking an unreasonable cut.