Gregg's MOTD

Tips & Tricks that I've Encountered Over the Years...

Install sbopkg on Slackware

September 23, 2023 — Gregg Szumowski

Sbopkg is a command‐line and dialog‐based tool to interact with the SlackBuilds.org repository, a collection of third‐party SlackBuild scripts to build Slackware packages.

Here are the steps for installing the latest version of sbopkg with Slackware.

  1. Download the latest Slackware package from https://www.sbopkg.org/downloads.php using whatever method you find most convenient. At the time of this writing the latest version is https://github.com/sbopkg/sbopkg/releases/download/0.38.2/sbopkg-0.38.2-noarch-1_wsr.tgz. I will use that version in the commands below. If the version has changed, you would use the new filename in the commands. You can also use wget <packagename> to download it directly.

  2. Open your favorite terminal and su to root.

  3. Change to the directory where you downloaded the package.

  4. Run the command installpkg sbopkg-0.38.2-noarch-1_wsr.tgz

If all goes well, sbopkg will now be installed.

To run sbopkg, open your favorite terminal, su - to root, and type sbopkg.

As usual, see the man or info page for more information.

Tags: cli, slackware, sbopkg, motd

Swapping the CMD and Control Keys on a Macbook Running Linux

September 19, 2023 — Gregg Szumowski

I find it annoying not having a CTRL key available for both hands so I tend to swap the Command and CTRL key settings on my 2012 “Slackbook”.

  1. Launch a terminal
  2. Edit the X11 Keyboard Extension

# vim /usr/share/X11/xkb/symbols/pc

  1. Make the following changes. Ensure your file looks like this:

key <LCTL> { [ Super_L ] };
key <LWIN> { [ Control_L ] };
...
key <RCTL> { [ Super_R ] };
key <RWIN> { [ Control_R ] };

  1. Clear xkb’s cache

# rm -rf /var/lib/xkb/*

  1. If the keys are not swapped after Step 4, restart your session or your computer.

Tags: cli, slackware, xkb, motd

Install Epson ET-3850 Printer Driver on Slackware 15.0

September 03, 2023 — Gregg Szumowski

I recently bought an Epson ET-3850 printer from Costco to replace my HP OfficeJet which was about 10 years old and the family was starting to have issues with establishing a wi-fi connection to it on their Windoze laptops. It took quite a while to setup. The Epson seems to be doing the job. Time will tell, however I discovered that setting it up for Slackware would also take a bit of effort. Drivers are only available on the Epson website in RPM or DEB format so I had to create a Slackware package to install it. Here’s how I went about doing that.

  1. First, download the RPM package from the Epson Support website.
  2. Convert the RPM to a Slackware .txz package using the rpm2txz utility with the following options:
  • -c: to make sure the file permissions are set correctly
  • -S: to extract the install scripts from the RPM (be careful with this)
  • -n: name the package using standard Slackware format
  • -d: make a slack-desc from the RPM’s metadata

# rpm2txz -c -S -n -d epson-inkjet-printer-escpr2-1.2.4-1.x86_64.rpm

  1. Now review the script. Make any changes, if necessary (I didn’t need to), and update the converted package:

# mkdir temp && cd temp
# explodepkg ../epson-inkjet-printer-escpr2-1.2.4-x86_64-1.txz
# makepkg -l y -c y ../epson-inkjet-printer-escpr2-1.2.4-x86_64-1.txz

  1. Once that is done you can install it:

# cd ..
# installpkg epson-inkjet-printer-escpr2-1.2.4-x86_64-1.txz

The printer did not show up as available to install in the “System Settings” app so go to the local CUPS webpage at http://localhost:631 and do the setup from there. Print a few test pages. It seems to be working fine on my Slackware laptop. You can move the package to your other Slackware machines and install there too.

Tags: cli, slackware, printers, epson, motd

Install Joplin on Slackware 15.0

August 30, 2023 — Gregg Szumowski

On a recent episode of Hacker Public Radio, the host, Lee listed several note-taking apps that he had tried to use. One of them was Joplin which I have been using for several years now. I feel that it is probably one of the best note-taking apps available that:

  • Supports Markdown
  • Is cross-platform
  • Supports vim keyboard mappings (I can’t live without this)
  • Integrates with multiple cloud storage environments.

I use it on a daily basis for almost all of my notes but it also supports checklists on my iPhone, iPad, Windoze laptop, and all of my Slackware devices (desktop and laptops). Give it a try!

As of yet, it is not available as a SlackBuild, but you can install it on Slackware quite easily using the CLI with:

$ wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash

Have fun!

Tags: cli, joplin, slackware, note-apps, motd

SlackBuilds: Where Are They Located?

August 29, 2023 — Gregg Szumowski

You should find a file in /var/log/packages for each SlackBuild that you have installed. You can distinguish the SlackBuilds package from standard Slackware packages by the substring SBo embedded in the filename. So you can create a list of all of the SlackBuilds installed on your machine by just doing an ls *SBo* in that directory.

ls /var/log/packages | grep SBo

or

ls /var/log/packages/*SBo

If you plan on reinstalling it may be a good idea to pipe that information out to a text file.

ls /var/log/packages | grep SBo > SBo_packages.txt

If you cat one of those files you will display a text file that lists certain information about the package, the location of the package and a brief description. For example, the file for sigil package starts like this:

PACKAGE NAME: sigil-0.9.12-x86_64-1_SBo
COMPRESSED PACKAGE SIZE: 7.7M
UNCOMPRESSED PACKAGE SIZE: 25M
PACKAGE LOCATION: /tmp/sigil-0.9.12-x86_64-1_SBo.tgz
PACKAGE DESCRIPTION:
sigil: sigil (Multi-platform WYSIWYG ebook editor)
sigil:
sigil: Sigil is a multi-platform WYSIWYG ebook editor. It is designed to
sigil: edit books in ePub format.
sigil:
sigil: Homepage: https://sigil-ebook.com/
sigil:

It then goes on and displays a file list of all of the files contained by the package and where they were installed.

Armed with the above information, you can the cd to the /tmp directory and find the package itself:

$ cd /tmp
$ ls -l sigil-0.9.12-x86_64-1_SBo.tgz
-rw-r--r-- 1 root root 8070041 May 29 16:24 sigil-0.9.12-x86_64-1_SBo.tgz
$

Tags: cli, slackware, slackbuilds, motd

Slackware Kernel Upgrade (elilo)

August 28, 2023 — Gregg Szumowski

If you are using elilo with Slackware, after running the slackpkg --upgrade-all script and you see that a new kernel was installed, you need to run the following commands to move the latest kernel to its proper location in order to boot:

geninitrd
cp /boot/vmlinuz-generic /boot/efi/EFI/Slackware/vmlinuz
cp /boot/initrd.gz /boot/efi/EFI/Slackware/initrd.gz

Tags: cli, slackware, motd

Installing and Using sbotools in Slackware 15.0

August 08, 2023 — Gregg Szumowski

Slackware was the first Linux distribution that I ever used but I was always curious and did a lot of distro-hopping from Slackware, Caldera, Turbo Linux, Mandrake, Red Hat, Ubuntu, multiple Ubuntu derivatives, then Fedora for quite a while until I finally settled on…(drum roll please)…Slackware! Yeah, I’ve come full circle.

One of the reasons why I was doing so much hopping around is that I was never really happy with something about the distribution that I was currently using. Maybe it was the default colors (Ubuntu, come on with all of that orange stuff), choice of default software, difficulty with setting it up. Whatever. With Slackware it was always the (lack of) a decent package management system. That is until I found “sbotools”.

Yeah, slackpkg is there. So are a few others, like (list a few of them here). But the lack of a distribution that didn’t have dependency management in its package manager is a real pain in the backside.

So what’s the big deal? Well, one of the points of running Slackware is installing packages that you choose to install and not letting the package manager run amuck and automatically select and install a full list of dependencies without letting the user know what they are and what they do. That’s where sbotools comes in.

Klaatu talks about sbotools in his Gnu World Order Episode 473 so you can find more information about it in his review.

As sbotools is highly influenced by FreeBSD’s ports system and its pkgtools, the interface will be more or less familiar to anyone familiar with portupgrade, etc.

When you use sbotools it finds the dependencies for the software you want to install and for each one, displays what it is, what it does, and prompts you if you want to install it or not. Also, if the dependency has optional parameters it asks you if you want to see them and gives you a choice to modify them or not.

Now all of this is done in the console, which is another thing that I like about sbotools. No fancy ncurses or GUI dialogs. Just a simple console program which is handy if you’re using a headless server.

Once you are done selecting your package and providing whatever responses are required, sbotools downloads the Slackbuilds and the source code from wherever it needs to and compiles the packages one by one in the order required and installs them. If a compilation fails then it asks you if you wish to continue or quit. Then you have the option to try figuring out what went wrong but looking at the build logs or by scrolling back on the console output.

The sbotools package is not a single program but a collection of about a half a dozen programs that work very much like the BSD ports. You have a tool to initialize and fetch the latest list of packages, another to check to see if you need to update your locally installed programs, another to search for them and one to install new packages.

Installing sbotools is rather simple if you’re use to installing packages by hand in Slackware. It comes as a tz package that you install using the ‘installpkg’ command.

First you need to install the sbotools package. Then you need to “sync” the SlackBuild repository to your machine using the command:

# sbosnap fetch

This will create a git repository of all of the SlackBuilds supported by this tool (which is a lot). Now you can use the sbofind command to search for a package.

Next we will run sbocheck to see if there are any updates since the last time. In this case since this is the first time we’re using it we shouldn’t expect anything new. The example below shows the results when you do have new results:

# sbocheck
Updating SlackBuilds tree...
Updating files: 100% (44404/44404), done.
HEAD is now at 49808a413d 20230729.1 global branch merge.
Checking for updated SlackBuilds...

plexmediaserver 1.32.5.7328_2632c9d3a < needs updating (1.32.5.7349_8f4248874 from SBo)

A copy of the above result is kept in /var/log/sbocheck.log

If the above command indicates that there are updates then you can initiate an upgrade using the following command:

# sboupgrade --all
Checking for updated SlackBuilds...

OK, so now your repository is set up. Let’s use it.

Suppose we want to find a software package that can read guitar tabs:

# sbofind guitar
SBo: tuxguitar 1.5.1
Path: /usr/sbo/repo/audio/tuxguitar

SBo: guitarix 0.44.1
Path: /usr/sbo/repo/audio/guitarix

We received two results. Let’s query their details:

# sbofind -r guitarix
SBo: guitarix 0.44.1
Path: /usr/sbo/repo/audio/guitarix
README:
guitarix (virtual guitar amplifier for jack)

guitarix offers the range of sounds you would expect from a
full-featured universal guitar-amp. You can get crisp clean-sounds,
nice overdrive, fat distortion and a diversity of crazy sounds never
heard before. Guitarix can be used as a standalone application, as
LADSPA plugins, or as LV2 plugins.

For 32-bit x86, a CPU with SSE instructions is required. For other
architectures, SSE will be used if available.

meterbridge is an optional runtime dependency.

Starting with version 0.35.4, guitarix's 'Online presets' feature no
longer requires webkitgtk. See README.online for more information.

This package uses POSIX filesystem capabilities to execute with
elevated privileges (required for realtime audio processing). This
may be considered a security/stability risk. Please read
http://www.slackbuilds.org/caps/ for more information. To disable
capabilities, pass SETCAP=no to the script.

root@slacker:~# sbofind -r tuxguitar
SBo: tuxguitar 1.5.1
Path: /usr/sbo/repo/audio/tuxguitar
README:
TuxGuitar is a multitrack guitar tablature editor and player written
in Java-SWT. It can open GuitarPro, PowerTab, and TablEdit files.

Ah, looks like tuxguitar is the one we want. So let’s install it:

# sboinstall tuxguitar

This is a SlackBuild to repackage the Azul's Zulu build of OpenJDK that
is compliant with the Java SE 8 standard.

Before installing this package please consider any other jdk's/jre's
that you have already installed as they may cause conflicts with the
PATH, JAVA_HOME and MANPATH variables.

After installing the package you will need to logout/reboot your machine
as it will add files to the /etc/profile.d folder.

Note: zulu-openjdk8 does not have a browser plugin nor support for Java
Network Launching Protocol (JNLP).

Proceed with zulu-openjdk8? [y] n

I already have a different version of Java installed so I will skip this part

TuxGuitar is a multitrack guitar tablature editor and player written
in Java-SWT. It can open GuitarPro, PowerTab, and TablEdit files.

Proceed with tuxguitar? [y]
tuxguitar added to install queue.

Install queue: tuxguitar

Are you sure you wish to continue? [y]

Slackware package /tmp/tuxguitar-1.5.1-x86_64-1_SBo.tgz created.


+==============================================================================
| Installing new package /tmp/tuxguitar-1.5.1-x86_64-1_SBo.tgz
+==============================================================================

Verifying package tuxguitar-1.5.1-x86_64-1_SBo.tgz.
Installing package tuxguitar-1.5.1-x86_64-1_SBo.tgz:
PACKAGE DESCRIPTION:
# tuxguitar (A Multitrack tablature editor and player)
#
# TuxGuitar is a multitrack guitar tablature editor and player
# written in Java-SWT. It can open GuitarPro, PowerTab, and
# TablEdit files.
#
Executing install script for tuxguitar-1.5.1-x86_64-1_SBo.tgz.
Package tuxguitar-1.5.1-x86_64-1_SBo.tgz installed.
Cleaning for tuxguitar-1.5.1...
#

So, sboinstall will not install any package without telling you first and it will describe what the packages does and if there are any additional (optional or otherwise) command line parameters which it will prompt you for.

Once you respond to the last prompt it will download and install (and compile if necessary) all of the packages you requested. If it fails one of the installations it will ask you if it should continue. If it succeeds in installing all of the packages then you’re ready to start using your software.

Each of the command line tools has it’s own manpage. Have fun!

Tags: cli, slackware, sbotools, slackbuilds, motd

Slackware Current: Minimal Installation

July 05, 2023 — Gregg Szumowski

I’ve been looking for a way to install a minimal version of Slackware (current) in a VM and the smallest that I’ve safely come up with so far is this:

  • Package group A
  • Package group AP
  • Package group D
  • Package group F
  • Package group K
  • Package group L
  • Package group N

I will try to get it smaller but I need this startup environment for another experiment so I’ll settle for this. Yes, it is still a wopping 12GB. Geez…

More info here

Tags: slackware, distros, motd

Install KDbg - A KDE gdb GUI on Slackware 15.0

June 18, 2023 — Gregg Szumowski

What is KDbg?

From the homepage:

KDbg is a graphical user interface to gdb, the GNU debugger. It provides an intuitive interface for setting breakpoints, inspecting variables, and stepping through code.

KDbg requires KDE, the K Desktop Environment, but you can of course debug any program.

Here’s how to install it on Slackware 15 but this should work on any system that has KDE:

$ git clone -b maint https://github.com/j6t/kdbg.git
$ cd kdbg/
$ cmake .
$ make
$ su -c "make install"

Tags: debugging, gdb, kde, slackware, motd

Install mimic Text-To-Speech on Slackware 15

June 13, 2023 — Gregg Szumowski

Per the manpage: Mimic is a command line tool for synthesizing speech from text. If outfile.wav is omitted mimic will output the utterance using the computer sound card.

Mimic is based on flite and strives to extend functionality and add more languages while keeping the application fast and light.

Mandatory arguments to long options are mandatory for short options too.

$ git clone https://github.com/MycroftAI/mimic1.git
$ cd mimic1/
$ ./dependencies.sh --prefix="/usr/local"
$ ./autogen.sh
$ ./configure --prefix="/usr/local"
$ make
$ make check
$ su -c "make install"

You can list the default voices that are installed with mimic by passing it the -lv command line parameter.

$ mimic -lv
Voices available: ap slt slt_hts kal awb kal16 rms awb_time

Which tells you that there are 8 voices available.

You should now be able to do some testing at the command line:

$ mimic -t "Hello world"
$ mimic -t "Hello world"
$ mimic -t 'Hello, this is a test of the emergency broadcasting system'
$ mimic -t 'Hello, this is a test of the emergency broadcasting system' -voice slt

See the manpage for more info and options.

Tags: text-to-speech, mimic, slackware, motd

Unable to Burn .ISO File to DVD With K3B

June 09, 2023 — Gregg Szumowski

If you’re having a problem as a ‘regular’ Slackware user burning an ISO file to a blank DVD, this may resolve your issue:

# chown root:cdrom /usr/bin/cdrecord /usr/bin/cdrdao
# chmod 4750 /usr/bin/cdrecord /usr/bin/cdrdao

Tags: dvd, k3b, slackware, kde, motd

LXC in Slackware

June 08, 2023 — Gregg Szumowski

Following directions from: lxc for Slackware 14.2. I haven’t tested on Slackware 15 yet. You will have to set this up while running as root.

  1. Create the file '/etc/default/lxc-net' and add the line USE_LXC_BRIDGE="true" to it.

  2. Create the directory '/var/lib/misc'

  3. Start the service: # /usr/libexec/lxc/lxc-net start

  4. Create a config file:

# cat >slac-xlc.con <<“EOF”
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
EOF

  1. Create the container:

# arch=x86_64 release=14.2 MIRROR=http://mirrors.us.kernel.org/slackware lxc-create -n Slackware64-14.2 -t slackware -f slack-xlc.conf

  1. Start the container for the first time:

# lxc-start -n Slackware64-14.2

  1. Login to the container:

# lxc-console -n Slackware64-14.2

or

# lxc-attach -n Slackware64-14.2

The difference between these two methods is that using the first you will require a username and password (root and root, in this case) and with the latter you won’t.

  1. The first thing you will need to do is set up the container to connect to the network. Edit '/etc/rc.d/rc.inet1.conf' and update the USE_DHCP entry for 'eth0' to USE_DHCP[0]="yes".

  2. Restart the container and verify connectivity.

# lxc-stop -n Slackware64-14.2 && lxc-start -n Slackware64-14.2

  1. Login to the container and use ‘ping’ to verify connectivity.

Tags: slackware, lxc, containers, motd

Install Openbox on Slackware

June 04, 2023 — Gregg Szumowski

I have been running blackbox on my Slackware desktop and decided that I’d try a different ‘flavor’ called openbox which are in the SBo repositories. I started by executing sbopkg at the root prompt and found these packages available:

There is the primary openbox package and there are 4 optional packages listed:

  • openbox
  • libfm-extra
  • lxmenu-data
  • menu-cache
  • openbox-menu

And several theme packages:

  • arc-openbox
  • openbox-simple-theme

The openbox-menu and openbox-simple-theme downloads failed but I was able to get away with using obconf and obmenu tools.

Configuration files are stored in /etc/xdg/openbox and you should copy the menu.xml file to ~/.config/openbox/ so that you can customize your menu.

Tags: slackware, openbox, motd

Update Slackware Broadcom Driver

May 31, 2023 — Gregg Szumowski

It doesn’t happen often, but whenever there’s a new kernel package for Slackware on my laptop I need to update the Broadcom driver. To do this:

  1. Update your OS, as usual.
  2. Reboot
  3. Plug in the ethernet cable, if necessary
  4. Login as root
  5. Perform sbopkg -i broadcom-sta
  6. Done

You can read more about it on the Slackware wiki here

Tags: slackware, broadcom, motd

Installing Foliate Ebook Reader on Slackware 15

May 30, 2023 — Gregg Szumowski

I don't know about you, but I love reading ebooks and I've used Foliate before on other distributions but can't find it for my OS of choice, Slackware. So, here's how to install it from source:

  1. Download the foliate software tarball from here
  2. Install appstream-glib (which provides dependency appstream-util) using sboinstall
  3. Install webkit2gtk (which provides dependency WebKit2) using sboinstall
  4. Build foliate. Instructions are on the GitHub page or just extract the tarball, cd into the directory and then execute the following on the command line:

$ tar zxvf foliate-2.6.4.tar.gz
$ cd foliate-2.6.4
$ meson build --prefix=/usr
$ ninja -c build
$ ninja -C build
$ su -c "ninja -C build install"

Tags: cli, ebooks, slackware, motd