My Slackware configuration 5

About a month ago I installed Slackware64 14.2 on my laptop, a Dell Inspiron 7537. After a long period spent with Fedora it was time to come back home, so I thought it would be a good thing to write down some system configuration highlights.

Let’s see them together ;-)

Initial steps after a full clean Slackware installation

After a clean installation I perform some preliminary steps before starting with the real configuration:

  1. Create a new user using the adduser command
  2. Add the user just created to the following groups: audio cdrom floppy plugdev video power netdev lp scanner

  3. Start the X server with startx and change the keyboard layout to the correct one

  4. Change DPI settings forcing it to 120 (from 96)

  5. Set localization and enable UTF-8 into the files /etc/profile.d/{lang.sh,lang.csh}. For example (more details here):

    export LANG=it_IT.UTF-8     # in /etc/profile.d/lang.sh
    

    and

    setenv LANG it_IT.UTF-8     # in /etc/profile.d/lang.csh
    
  6. Give execution permissions to networkmanager with the command chmod +x /etc/rc.d/rc.networkmanager

Once finished I reboot the machine and I verify that all is ok. Then I start with the main configuration.

Clickpad

In some cases you may notice a bad functioning of these devices if you don’t provide any additional configuration to them. In my case the issue was that the behavior of the right click button was the same of the left one. The solution was pretty simple: copy the file 50-synaptics.conf in the right place and add some options at the end of that file

# cp /usr/share/X11/xorg.conf.d/50-synaptics.conf /etc/X11/xorg.conf.d/

The options to append at the end of the file are:

Option "ClickPad" "true"
Option "EmulateMidButtonTime" "0"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"

My brother suggested to me this trick and it seems to work fine for now (thank you bro!!!) ;-)

Remember to logout and login so that the changes take effect.

Kernel

The first thing I usually do is to backup /etc/lilo.conf even if, to be more precise, I usually backup all those configuration files I consider relevant :P

Then I generate the initrd (initial ramdisk) command for the current kernel:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14 -a "-o /boot/initrd-4.4.14.gz"

In my case the output is something like this:

# mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd-4.4.14.gz

At this point the initrd can be created by copying and executing the above command and then it is necessary to add a new entry into /etc/lilo.conf:

image = /boot/vmlinuz-generic-4.4.14
  initrd = /boot/initrd-4.4.14.gz
  root = /dev/sda2
  label = 4.4.14
  read-only

Test the new configuration with lilo -t. If all is ok update the bootloader with lilo -v and finally reboot.

Multilib support

A multilib system allows you to run both 64 bit and 32 bit programs. The commands you need to run are the following ones (you can read a more detailed explanation here):

# SLACKVER=14.2
# mkdir multilib
# cd multilib
# lftp -c "open http://bear.alienbase.nl/mirrors/people/alien/multilib/ ; mirror -c -e ${SLACKVER}"
# cd ${SLACKVER}
# upgradepkg --reinstall --install-new *.t?z
# upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z

Slackpkg and Slackpkg+

Slackpkg and Slackpkg+ (an extension of Slackpkg) are very useful to keep your system up to date and to install third-party software whose compilation is time-consuming (i.e. LibreOffice) although in most cases I use sbotools, which uses SlackBuilds instead of prebuilt packages.

NOTE: I usually use slackpkg+ with a third-party repository (alienbob in this specific case) only for packages with no dependencies (like LibreOffice, VLC, flash, etc…), so that I can keep separated the two sets of packages (the third-party repo and the SBo one).

Let’s start with Slackpkg. The steps to do are explained here below:

  1. Add a mirror by uncommenting only one line in /etc/slackpkg/mirrors (ftp is preferred).
  2. Backup the Slackpkg blacklist file: cp /etc/slackpkg/blacklist /etc/slackpkg/blacklist.orig
  3. Uncomment (remove the #) the following lines in /etc/slackpkg/blacklist, then save the file:
kernel-generic
kernel-generic-smp
kernel-huge
kernel-huge-smp
kernel-modules
kernel-modules-smp
kernel-source

I also blacklist all SBo packages by uncommenting this regular expression:

[0-9]+_SBo

Now we go on with Slackpkg+.

Download the package:

$ wget https://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.7.0-noarch-4mt.txz

Install it:

# installpkg slackpkg+-1.7.0-noarch-4mt.txz

Backup the Slackpkg+ configuration file:

# cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.orig

Modify the default configuration as follows (adds priority in order to avoid that multilib packages are overwritten):

PKGS_PRIORITY=( multilib alienbob )
REPOPLUS=( slackpkgplus multilib alienbob )

Uncomment these lines, then save and exit:

MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/14.2/
MIRRORPLUS['alienbob']=http://bear.alienbase.nl/mirrors/people/alien/sbrepos/14.2/x86_64/

Now run the following commands:

# slackpkg update gpg
# slackpkg update
# slackpkg upgrade-all
Different kernel patches living in parallel

Sometimes you need to install a kernel patch and maybe you want to keep the oldest versions of the kernel in parallel.

Let’s suppose we are running the 4.4.14 (default kernel with initrd) and we want to add the new version which is the 4.4.38.

The steps to follow are those here below:

  • Install all the updates with slackpkg (this will skip the blacklisted packages) with slackpkg update && slackpkg upgrade-all
  • Download the remaining files (those previously skipped):
$ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/linux-4.4.38/kernel-generic-4.4.38-x86_64-1.txz
$ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/linux-4.4.38/kernel-huge-4.4.38-x86_64-1.txz
$ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/linux-4.4.38/kernel-modules-4.4.38-x86_64-1.txz
$ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/linux-4.4.38/kernel-source-4.4.38-noarch-1.txz
  • Install all the packages with installpkg package_name.txz
  • Generate the initrd command for the new kernel:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.38 -a "-o /boot/initrd-4.4.38.gz"
  • Take the output and launch it to create the initrd
  • Add the right entry into /etc/lilo.conf:
image = /boot/vmlinuz-generic-4.4.38
  initrd = /boot/initrd-4.4.38.gz
  root = /dev/sda2
  label = 4.4.38
  read-only
  • Give lilo -t and then lilo -v.
  • Reboot and enjoy the new kernel patch ;-)

NVIDIA Optimus Technology

First of all you should download and install the xf86-video-nouveau-blacklist package. This will prevent to load the nouveau modules on startup, although the script used to install Bumblebee should do it automatically. You can obtain the package from any Slackware mirror. It is located under /extra.

$ wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/extra/xf86-video-nouveau-blacklist/xf86-video-nouveau-blacklist-noarch-1.txz
# installpkg xf86-video-nouveau-blacklist-noarch-1.txz

Use the automated way to install Bumblebee:

# curl https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/slackware/crazybee.sh | sh

When finished reboot.

A very very simple test
$ glxinfo | grep "OpenGL vendor string"
OpenGL vendor string: Intel Open Source Technology Center
$ primusrun glxinfo | grep "OpenGL vendor string"
OpenGL vendor string: NVIDIA Corporation

Graphical login

When you’re sure your graphic drivers work correctly, you can enable the graphical login by changing from 3 to 4 the number associated to the default runlevel in /etc/inittab:

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

Improve the battery life

In order to improve the battery life of my laptop I opted for the installation of TLP.

I also added this line in /etc/lilo.conf (for the entry I currently use):

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-4.4.38
  initrd = /boot/initrd-4.4.38.gz
  root = /dev/sda2
  label = 4.4.38
  read-only
  append = "acpi_osi=Linux"
image = /boot/vmlinuz-generic-4.4.14
  initrd = /boot/initrd-4.4.14.gz
  root = /dev/sda2
  label = 4.4.14
  read-only
image = /boot/vmlinuz
  root = /dev/sda2
  label = Linux
  read-only
# Linux bootable partition config ends

_____

I think that’s all for now. For any suggestion, please, leave a comment here below. You are welcome! :D

Did you like this post? Share it!
Share on email
Email
Share on twitter
Twitter
Share on facebook
Facebook
Share on linkedin
Linkedin
Share on print
Print

5 thoughts on “My Slackware configuration

  1. Reply Wahyu Kurniawan Sep 15,2018 12:40

    i use your guide.. but when i update gpg of slackpkg i get error message

    !!! W A R N I N G !!!
    Repository ‘slackpkgplus’ does NOT contain the GPG-KEY
    You SHOULD disable GPG check by setting ‘CHECKGPG=off’
    in /etc/slackpkg/slackpkg.conf or use slackpkg with
    ‘-checkgpg=off’ : ‘slackpkg -checkgpg=off install packge’

    It’s that okay or any tips?

    • Reply Cristiano Sep 16,2018 17:53

      Hi,
      does this issue persist also after running the following commands?

      slackpkg update gpg
      slackpkg update

      Another thing you can do is to change your mirror in /etc/slackpkg.conf /etc/slackpkg/mirrors and then retry with the commands here above.
      Let me know if you have solved.

      • Reply Wahyu Kurniawan Apr 1,2021 12:37

        Wow i didn’t have notification about this. sorry for late reply, I’m about to use your guide again. I’m decide to learn slackware again

  2. Reply Iuri Freire Jun 24,2019 16:11

    Works on Dell Vostro 5470.

  3. Reply Wahyu Kurniawan Apr 1,2021 12:36

    Wow i didn’t have notification about this. sorry for late reply, I’m about to use your guide again. I’m decide to learn slackware again

Leave a Reply