Reinstalling Slackware

So I reinstalled slackware on my machine and decided to take some rough notes of the most important steps I made. I did not document the steps in detail, and some are very specific for my setup. But maybe it can be useful for someone, or myself.

  1. Basic steps
    1. Make partitions
    2. Setup
    3. Config
    4. Install wicd, get online
    5. Custom Kernel
    6. Fix X
  2. Programs
    1. Firefox
    2. vim
    3. Skype
    4. Spotify
    5. Office
    6. cron
  3. Appearance
    1. xmonad
    2. Fonts
    3. Terminal
  4. Random Installs
    1. Slackbuilds
    2. Perl
    3. Multilib
    4. Better latex
    5. Groovebasin
    6. Java
    7. Anki
  5. Programming
    1. Hakyll
    2. SFML
  6. Games
    1. Minecraft

Basic steps

Make slackware usb loader

See README_USB.TXT in usb folder from slackware installation.

Create

dd if=usbboot.img of=/dev/sdX bs=1M {.bash}

Be sure /dev/sdX is the usb, dd will wipe everything! Simple way is to ls /dev {.bash} before and after plugging in device. Boot from bios (f2 or f10).

Make partitions

Make partitions http://slackbook.org/html/installation-partitioning.html

fdisk /dev/sda. Make sure sda is your harddrive. Print partitions p

Current setup:

Make sure that swap is of type Linux Swap, change with t. Approx 2 times your ram?

Setup

Boot and run setup.

Install from FTP/HTTP server:

  1. ftp://ftp.slackware.com
  2. /pub/slackware/slackware64-14.1/slackware64

For example.

Don’t pick KDE or Games. Use terse installation.

Config

Add a new user with adduser. Set zsh as basic shell. Set for root in /etc/passwd (or update user info there).

Add user to groups.

# usermod -a -G netdev username

Update name in /etc/HOSTNAME.

Install wicd, get online

Fetch package from /extra/wicd.

Custom Kernel

http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding

Fetch latest stable kernel source: https://www.kernel.org/

Use slackware custom as base:

Make sure to select processor type, preemptive low latency desktop. Remove nvidia and riba for nvidia binary blob usage later.

Update /etc/lilo.conf. This is mine:

Make sure to change image locations and drive location.

Then run lilo.

Fix X

Install NVIDIA drivers 337.25.

Use custom xorg.conf.

This is it:

Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 1080 480
    Screen 1 "Screen1" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Mouse0" "CorePointer"
    Option "Xinerama" "1"
EndSection

Section "Files"
    FontPath "/usr/lib64/X11/fonts/misc/:unscaled"
    FontPath "/usr/lib64/X11/fonts/100dpi/:unscaled"
    FontPath "/usr/lib64/X11/fonts/75dpi/:unscaled"
    FontPath "/usr/lib64/X11/fonts/misc/"
    FontPath "/usr/lib64/X11/fonts/Type1/"
    FontPath "/usr/lib64/X11/fonts/Speedo/"
    FontPath "/usr/lib64/X11/fonts/100dpi/"
    FontPath "/usr/lib64/X11/fonts/75dpi/"
    FontPath "/usr/lib64/X11/fonts/cyrillic/"
    FontPath "/usr/lib64/X11/fonts/TTF/"
EndSection

Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons" "no"
# Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "us"
EndSection

Section "InputClass"
    Identifier "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option "XkbLayout" "us"
EndSection

Section "Module"
    Load "dbe"
EndSection

Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "DELL U2211H"
    HorizSync 30.0 - 83.0
    VertRefresh 56.0 - 76.0
    Option "DPMS"
EndSection

Section "Monitor"
    Identifier "Monitor1"
    VendorName "Unknown"
    ModelName "DELL U2211H"
    HorizSync 30.0 - 83.0
    VertRefresh 56.0 - 76.0
    Option "DPMS"
    #Option "Rotate" "left"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce GTX 550 Ti"
    BusID "PCI:1:0:0"
    #Option "RandRRotation" "on"
    Screen 0
EndSection

Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce GTX 550 Ti"
    BusID "PCI:1:0:0"
    #Option "RandRRotation" "on"
    Screen 1
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option "TwinView" "0"
    Option "metamodes" "DFP-0: nvidia-auto-select +0+0"
    SubSection "Display"
        Depth 24
    EndSubSection
EndSection

Section "Screen"
    Identifier "Screen1"
    Device "Device1"
    Monitor "Monitor1"
    DefaultDepth 24
    Option "TwinView" "0"
    Option "metamodes" "DFP-2: nvidia-auto-select +0+0 { Rotation=left }"
    Option "Rotate" "cw"
    SubSection "Display"
        Depth 24
    EndSubSection
EndSection

Programs

Firefox

Download latest

Get libflashplayer.so into /usr/local/lib64/firefox/browser/plugins.

Restore bookmark backup from .mozilla/firefox/X.default/bookmarkbackups if you want.

vim

For xterm copying and support for more plugins. Get vim source.

Skype

Install Multilib. Install skype from slackbuilds, use 32bit mode.

Spotify

Install Multilib. Fetch from slackbuilds. I’m having some flickering issues, but no idea what to do.

Office

Install Java. Install libreoffice from slackbuilds.

cron

crontab -e

# Every 5 minutes
*/5 * * * * /home/tree/bin/ticker --update

Appearance

xmonad

  1. Install ghc linked from slackbuilds
  2. Install hscolour from slackbuilds (for haskell-platform warnings)
  3. Install haskell-platform from slackbuilds

As user:

Install conky with dependencies from slackbuilds. Build conky with lua support.

Install dzen2 by cloning from github. Edit config.mk, choose option 7 (XPM, XFT, Xinerama).

Get .backgrounds and .icons.

Could not get nitrogen to build properly (I stole it from my other installation…!!)

Fix borders on firefox etc with lxappearance, install from slackbuilds.

Fonts

Copy ttf fonts to /usr/share/fonts/TTF, in that dir run

In /usr/bin/startx mod a line with defaultserverargs="-dpi 96".

From http://www.linuxquestions.org/questions/slackware-14/how-to-optimize-fonts-in-slackware-640468/page29.html#post5067546, http://blog.lysender.com/2013/11/optimizing-fonts-for-slackware-14-1-without-infinality/

Enable subpixel rendering from source slackbuild http://ftp.slackware.com/pub/slackware/slackware-14.1/source/l/freetype/. Edit freetype.Slackbuild

Save as freetype_cleartype.diff:

diff -rupN freetype.orig/cleartype.diff freetype/cleartype.diff
--- freetype.orig/cleartype.diff	1969-12-31 16:00:00.000000000 -0800
+++ freetype/cleartype.diff	2013-11-19 15:32:04.811346576 -0800
@@ -0,0 +1,12 @@
+diff -rupN freetype-2.5.0.1.orig/include/freetype/config/ftoption.h freetype-2.5.0.1/include/freetype/config/ftoption.h
+--- freetype-2.5.0.1.orig/include/freetype/config/ftoption.h	2013-06-19 14:20:04.000000000 -0700
++++ freetype-2.5.0.1/include/freetype/config/ftoption.h	2013-11-19 15:27:47.456737625 -0800
+@@ -591,7 +591,7 @@ FT_BEGIN_HEADER
+   /*   This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be    */
+   /*   defined.                                                            */
+   /*                                                                       */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ 
+ 
+   /*************************************************************************/
diff -rupN freetype.orig/freetype.SlackBuild freetype/freetype.SlackBuild
--- freetype.orig/freetype.SlackBuild	2013-11-19 15:31:53.895891885 -0800
+++ freetype/freetype.SlackBuild	2013-11-19 15:33:17.885864416 -0800
@@ -78,7 +78,8 @@ zcat $CWD/freetype.illadvisederror.diff.
 # for doing so.
 # Please see this web site for more details:
 #   http://www.freetype.org/patents.html
-#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+patch -p1 --verbose < $CWD/cleartype.diff
 
 chown -R root:root .
 CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"

Then

Enable subpixel rendering. Test http://www.lagom.nl/lcd-test/subpixel.php, choose rgb, gbr, or whatever. Also useful: https://wiki.archlinux.org/index.php/Font_configuration

Also use ~/.config/fontconfig/fonts.conf:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
	<match target="font">
		<edit mode="assign" name="antialias">
			<bool>true</bool>
		</edit>
		<edit mode="assign" name="hinting">
			<bool>true</bool>
		</edit>

		<edit mode="assign" name="hintstyle">
			<const>hintslight</const>
		</edit>

		<!-- Ignore any embedded bitmaps in TTF, etc (Microsoft's Calibri and others from Office 07/Vista have these) -->
		<edit mode="assign" name="embeddedbitmap">
			<bool>false</bool>
		</edit>

		<!-- MS fonts use full hinting -->

		<test name="family">
			<string>Andale Mono</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Arial</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Arial Black</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Calibri</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Cambria</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Candara</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Comic Sans MS</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Consolas</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Constantia</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Corbel</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Courier New</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Georgia</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Impact</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Symbol</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Tahoma</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Times New Roman</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Trebuchet MS</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Verdana</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Webdings</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Wingdings</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
	</match>
</fontconfig>

Terminal

Fetch rxvt-unicode from slackbuilds. Make .Xresources.

Color schemes with ls listings will be ugly, so copy DIR_COLORS to .dir_colors

Set in .zshrc.

Fix git diff colors git config --global core.pager "less -r"

Also korean signs.

Stuff

Random Installs

Slackbuilds

Download from http://slackbuilds.org/. Install with installpkg. Remove with removepkg.

s3cmd, scrot, mirage, rtorrent

Perl

Install perl libs from cpan. As root:

Multilib

http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib Also add blacklist.

When installing 32bit run . /etc/profile.d/32dev.sh

Better latex

Install texlive from slackbuilds. Remove tetex first.

Groovebasin

Need libgroove. Which also needs speex from slackbuilds apart from the clear dependencies. Run groovebasin as user.

Java

Get OpenAL from slackbuilds. Get Java JDK http://docs.slackware.com/howtos:software:java, not OpenJDK.

Anki

Download anki.

mv anki-2.0.26 /usr/local/lib64
ln -s /usr/local/lib64/anki-2.0.26/runanki /usr/local/bin

Programming

Hakyll

For upload scripts fetch python-magic slackbuilds.

SFML

Get source. cmake and install.

Games

Minecraft

Requires Java. Launch with:

I copied .minecraft folder with saves etc.