[HOWTO] Install software with slapt-mod

Post tutorials, HOWTO's and other useful resources here.
pterid
White ninja
White ninja
Posts: 19
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce

[HOWTO] Install software with slapt-mod

Post#1 by pterid » 01 Feb 2025, 22:13

Hello everyone! Thank you for your contributions to this great OS and its community. I am a technical writer, but new to using Linux/Porteus daily. I have written here an opinionated walkthrough example because I initially struggled to use slapt-mod effectively to install software other than the browser. My post follows a route that is not the shortest, but favours the GUI where possible, omits under-the-hood details, uses sudo rather than su to avoid the possibility of accidental harmful commands from the root terminal, and includes output logs and plenty of verification steps for those feeling tentative.

---

slapt-mod is a tool that you can use to install some software on Porteus 5.01. It can download packages from the Salix Package repository and convert them to the module format (.xzm) used by Porteus. slapt-mod was first announced in this forum topic, where its usage was described in brief. I hope this guide will help those who need their hand held a little more.

To practice using slapt-mod and activating a module, I will use a small, simple package called FIGlet. It turns text into ASCII art. (It is famous enough to have its own Wikipedia page and is built into some search engines). Figlet doesn't depend on lots of other packages, so it should be one of the easiest things to install.

I used the Xfce edition of Porteus to make these screenshots, but I hope you can follow this guide in other desktop environments too.

---

Step 1: Terminal

In Porteus, open a terminal window. Check that slapt-mod is present by typing this command and pressing Enter:

Code: Select all

slapt-mod
If slapt-mod is available, you will see an overview of command line options:

Code: Select all

   slapt-mod: A simple wrapper for slapt-get to build Porteus module. 
              All operations must be run as root user. 

   slapt-mod [-c] [-u] [-d|-m|-M|-n|-N PACKAGE_NAME] [-l PATTERN] [-s PATTERN]

Options:
  -c: Purge cached packages
  -d: Download only
  -m: Download and build module (ZSTD compression)
  -M: Download and build module (XZ compression)
  -n: Download and build module without dependencies (ZSTD compression)
  -N: Download and build module without dependencies (XZ compression)
  -l: List installed packages
  -s: Search package
  -u: Update database
  -h: This usage

   To change the temporary directory (default is /tmp), pass the TMP variable.
   $ TMP=/path/to/directory slapt-mod -m packagename

   Temporary directory is for storing downloaded packages, installing and converting them to modules.

   See /etc/slapt-get/slapt-modrc to set preferences for stripping and language of created modules.
Step 2: Update database

Run this command:

Code: Select all

sudo slapt-mod -u
You will need to input your root password every time you use a sudo command. This particular command will download information about the available packages. The output should look like:

Code: Select all

Retrieving package data [http://slackware.uk/salix/x86_64/slackware-15.0/]...Cached
Retrieving patch list [http://slackware.uk/salix/x86_64/slackware-15.0/]...Cached
Retrieving checksum list [http://slackware.uk/salix/x86_64/slackware-15.0/]...Cached
Retrieving checksum signature [http://slackware.uk/salix/x86_64/slackware-15.0/]...Cached
Verifying checksum signature [http://slackware.uk/salix/x86_64/slackware-15.0/]...No key for verification
Retrieving ChangeLog.txt [http://slackware.uk/salix/x86_64/slackware-15.0/]...Cached
Reading Package Lists...Done
Retrieving package data [http://slackware.uk/salix/x86_64/slackware-15.0/extra/]...Cached
Retrieving patch list [http://slackware.uk/salix/x86_64/slackware-15.0/extra/]...Done
Retrieving checksum list [http://slackware.uk/salix/x86_64/slackware-15.0/extra/]...Cached
Retrieving checksum signature [http://slackware.uk/salix/x86_64/slackware-15.0/extra/]...Cached
Verifying checksum signature [http://slackware.uk/salix/x86_64/slackware-15.0/extra/]...No key for verification
Retrieving ChangeLog.txt [http://slackware.uk/salix/x86_64/slackware-15.0/extra/]...Done
Reading Package Lists...Done
Retrieving package data [http://slackware.uk/salix/x86_64/15.0/]...Cached
Retrieving patch list [http://slackware.uk/salix/x86_64/15.0/]...Done
Retrieving checksum list [http://slackware.uk/salix/x86_64/15.0/]...Cached
Retrieving checksum signature [http://slackware.uk/salix/x86_64/15.0/]...Cached
Verifying checksum signature [http://slackware.uk/salix/x86_64/15.0/]...No key for verification
Retrieving ChangeLog.txt [http://slackware.uk/salix/x86_64/15.0/]...Cached
Reading Package Lists...Done
Retrieving package data [http://slackware.uk/salix/x86_64/extra-15.0/]...Cached
Retrieving patch list [http://slackware.uk/salix/x86_64/extra-15.0/]...Done
Retrieving checksum list [http://slackware.uk/salix/x86_64/extra-15.0/]...Cached
Retrieving checksum signature [http://slackware.uk/salix/x86_64/extra-15.0/]...Cached
Verifying checksum signature [http://slackware.uk/salix/x86_64/extra-15.0/]...No key for verification
Retrieving ChangeLog.txt [http://slackware.uk/salix/x86_64/extra-15.0/]...Cached
Reading Package Lists...Done
Step 3 (Optional): Find a package

If you want to keep a list of all the available x86 packages as a text file, you can write something like this:

Code: Select all

sudo slapt-mod -s x86 > my_slapt_list.txt
You can search for a package by name. Search for figlet:

Code: Select all

sudo slapt-mod -s figlet
Your output should include the following line:

Code: Select all

figlet-2.2.5-x86_64-1salix15.0  (program for making large letters out of ordinary text)
Alternatively, for packages stored on Salix, you can just go to the Salix Package Search website and browse.

Step 4: Download and make your module

Run this command:

Code: Select all

sudo slapt-mod -m figlet
In this command, you should just the short name of the package (excluding the version number etc).

Press y when prompted. The output should look something like:

Code: Select all

The following NEW packages will be installed:
  figlet 
0 upgraded, 0 reinstalled, 1 newly installed, 0 to remove, 0 not upgraded.
Need to get 98.0kB of archives.
Do you want to continue? [y/N] y
1/1 Get http://slackware.uk/salix/x86_64/extra-15.0/ figlet 2.2.5-x86_64-1salix15.0 [98.0kB]...Done

Done
Verifying package figlet-2.2.5-x86_64-1salix15.0.txz.
Installing package figlet-2.2.5-x86_64-1salix15.0.txz:
PACKAGE DESCRIPTION:
# figlet (program for making large letters out of ordinary text)
#
# Extra fonts are available on the the homepage.
# There is also a figlet mailing list.
#
# Homepage: http://www.figlet.org
#
Package figlet-2.2.5-x86_64-1salix15.0.txz installed.
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /tmp/figlet-2.2.5-x86_64-1salix15.0.xzm, block size 262144.
[=================================================================/] 62/62 100%

Exportable Squashfs 4.0 filesystem, zstd compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are removed
Filesystem size 90.89 Kbytes (0.09 Mbytes)
	14.15% of uncompressed filesystem size (642.23 Kbytes)
Inode table size 718 bytes (0.70 Kbytes)
	26.89% of uncompressed inode table size (2670 bytes)
Directory table size 778 bytes (0.76 Kbytes)
	50.10% of uncompressed directory table size (1553 bytes)
Number of duplicate files found 0
Number of inodes 82
Number of files 62
Number of fragments 3
Number of symbolic links 3
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 17
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
chown: warning: '.' should be ':': ‘guest.’
 
====> '/tmp/figlet-2.2.5-x86_64-1salix15.0.xzm' was created successfully.
If some of the above is missing, or you see error messages, then your package may not have been made correctly.

Step 5: Copy your module to the modules folder

Open a file manager as root. In my Xfce desktop, this is in the Start Menu under Accessories > Thunar File Manager (root). Type your root password when prompted.

Be careful what you do in this window. You have a lot of power. Do not delete any system files!

Go to File System > tmp. You should see your module as a .xzm file.

Image

Right-click it and Copy.

Navigate to your device on which you installed Porteus, then click to enter the porteus and modules folders. Right-click and Paste.

Your new module appears alongside any other installed modules you may have (e.g. your browser).

Image

Step 6: Activate your module

Open your Porteus Modules program. in my Xfce desktop, this is in Start Menu > System > Porteus Modules. Check that your new module appears in the list, with an "x" next to it.

Image

Double-click it to activate it. You might briefly see a dialog box that says "Well done! you have activated..."

Step 7: Use your new software

Open a terminal, check where figlet has been placed in the file system, and try it out:

Code: Select all

guest@porteus:~/Documents$ which figlet
/usr/bin/figlet
guest@porteus:~/Documents$ figlet -h
figlet: invalid option -- 'h'
Usage: figlet [ -cklnoprstvxDELNRSWX ] [ -d fontdirectory ]
              [ -f fontfile ] [ -m smushmode ] [ -w outputwidth ]
              [ -C controlfile ] [ -I infocode ] [ message ]
guest@porteus:~/Documents$ figlet Hello!
 _   _      _ _       _ 
| | | | ___| | | ___ | |
| |_| |/ _ \ | |/ _ \| |
|  _  |  __/ | | (_) |_|
|_| |_|\___|_|_|\___/(_)
                        
Now you have installed a simple program, you will hopefully feel confident to try to install other things. Good luck!

Step 8 (Optional): Cleanup

If you run:

Code: Select all

sudo slapt-mod -c
then slapt-mod will clean up its mess and remove the /tmp/GETMOD folder which contains the original files downloaded from the Salix repository. This will save you some disk space if your /tmp folder does not automatically purge on reboot. The command will not delete the .xzm module from /tmp, so having copied it over, you might like to delete it from there too.

---

Thanks to Ed_P for valuable feedback, and to imgbb.com for image hosting.
Last edited by pterid on 02 Feb 2025, 23:55, edited 3 times in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 8957
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] Install software with slapt-mod

Post#2 by Ed_P » 02 Feb 2025, 17:44

Step 1. Not "should", "will". ;)

Step 5 is wrong. It is not necessary to open the desktop's file manager as root to move the .xzm module from the /tmp folder to the /porteus/modules folder. Simply open the file manager as a normal user and Copy the /tmp module to the /porteus/modules folder. Safer, easier and more convenient. :happy62:

It is also possible to activate the module in the /tmp folder to see if it's worth moving it to the /modules folder and keeping it. :D

Step 8 is misleading. The /tmp folder is created new each time Porteus is started. Try it, you'll see. :) And to delete the /tmp module requires root level access, so easier to leave it.

Added in 46 minutes 37 seconds:
pterid wrote:
01 Feb 2025, 22:13
slapt-mod was first announced in this forum topic,
IMHO Would be better written as "slapt-mod was first announced here: " followed by the topic's specific url, nothing else. The forum sw will expand it.

pterid
White ninja
White ninja
Posts: 19
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce

[HOWTO] Install software with slapt-mod

Post#3 by pterid » 02 Feb 2025, 19:11

Hello again Ed, and thank you for your second round of feedback!

Re Step 1: I've changed the wording to "If slapt-mod is available, you will see.." This might seem like very cautious wording, because it will almost always be working, but for a nervous user, this frames the simple calling of slapt-mod as a success to build on.

Re Step 5: Changed section heading to "Copy your module to the modules folder". I had already changed "Cut" to "Copy" in the actual instructions, in response to your first round of feedback, because I agree that copying is safer. However, I cannot replicate your ability to copy a file from /tmp to /mnt/.../porteus/modules without root. For me, the permissions of the modules directory are r-xr-xr-x (see terminal screenshot). I have not edited these perms, so I assumed they were the default in Porteus and so for others.

Image

Re Step 8: again, perhaps there's something odd about my Porteus install, but for me, /tmp does not delete itself on reboot. I have Porteus installed on an MBR USB stick with a single ext4-formatted partition, and the APPEND line in porteus.cfg looks like:

Code: Select all

APPEND changes=/porteus
The screenshot below is my /tmp just after booting today. It has accumulated various things over the last week. It is reassuring to know I can clean them up myself.

Image

Anyway, wrt Step 8, I have made the language neutral, and it is clear that the step is optional. If you don't believe me, or if the devs would like to know more about this behaviour, I'd be happy to do more diagnostics or discuss it further, including a video call if you like.

User avatar
Ed_P
Contributor
Contributor
Posts: 8957
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] Install software with slapt-mod

Post#4 by Ed_P » 02 Feb 2025, 20:51

:o Well pterid your system is definitely different than mine. My USB drives are single partition FAT32 drives, and on the hard drive I boot ISOs, so less root requirements and nothing saved that doesn't need to be saved, or I manually save. Sorry for my misunderstanding the issues you encounter with EXT4 systems. :oops:

Did you see the addition to my prior posting?

pterid
White ninja
White ninja
Posts: 19
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce

[HOWTO] Install software with slapt-mod

Post#5 by pterid » 02 Feb 2025, 21:02

Dear Ed,

Thank you for your kind remarks! And there is no need to apologise. I guess one's experience of even seemingly simple processes like this can really depend on how one has launched Porteus, so it is a challenge to write a simple non-branching linear walkthrough that covers most users. I look forward to hearing from other users in future, especially ones for whom these steps don't succeed.

Re the link text describing a forum post: it is my habit to make the link text human-readable because in a previous academic-sector job I was held quite strictly to WCAG guidelines on descriptive link text!

Best regards,

pt

User avatar
Ed_P
Contributor
Contributor
Posts: 8957
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] Install software with slapt-mod

Post#6 by Ed_P » 02 Feb 2025, 21:20

Porteus forum is more helpful. This is what posting just the url expands to: [Porteus 5.01's Package Manager] slapt-mod: to build modules

pterid
White ninja
White ninja
Posts: 19
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce

[HOWTO] Install software with slapt-mod

Post#7 by pterid » 02 Feb 2025, 21:33

Ah, that is a nice feature!

User avatar
Amaya Nidjit
White ninja
White ninja
Posts: 22
Joined: 01 Nov 2024, 05:53
Distribution: Multiple Porteus-v5.01x32 live
Location: Left Coast of Canada

[HOWTO] Install software with slapt-mod

Post#8 by Amaya Nidjit » 03 Feb 2025, 06:57

Ed_P wrote:
02 Feb 2025, 20:51
:o Well pterid your system is definitely different than mine.
Just to confirm that on all my (several) Porteus solo-boot sticks and my single multiple-flavour Porteus boot stick, all installations act as pterid describes. ie, /tmp is not temporary and the boot drive is not writeable unless as root from a running Porteus instance.
All my installations are live frugal on ext4-formatted USB stix.

pterid thanks for this tutorial. I think this was needed. I also had trouble learning Porteus app installation methods but had not gotten around to writing out anything to help others. The unexpected differences in Porteus' method from the non-modular distros I've been using successfully really threw me off balance.

As has been said, "It's not what you don't know that gets ya - its what you know, but that just ain't so."
Amaya

User avatar
Amaya Nidjit
White ninja
White ninja
Posts: 22
Joined: 01 Nov 2024, 05:53
Distribution: Multiple Porteus-v5.01x32 live
Location: Left Coast of Canada

[HOWTO] Install software with slapt-mod

Post#9 by Amaya Nidjit » 03 Feb 2025, 07:30

pterid wrote:
02 Feb 2025, 21:02
I look forward to hearing from other users in future, especially ones for whom these steps don't succeed.
Your tutorial does describe exactly what I am currently doing, including that I have sometimes been too specific about the app filename. Your explicit instruction to use the general app name (eg abiword) rather than the specific package/file name listed by slapt-mod-s was helpful.
Amaya

User avatar
SEMERENDO.cr
Black ninja
Black ninja
Posts: 90
Joined: 08 Nov 2023, 20:36
Distribution: alt, Porteus 5 mixed + x0.9

[HOWTO] Install software with slapt-mod

Post#10 by SEMERENDO.cr » 03 Feb 2025, 22:54

OK but in the terminal:

Code: Select all

command not found
I actually use Porteux in my PC and search it in "/usr" also!

User avatar
Ed_P
Contributor
Contributor
Posts: 8957
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] Install software with slapt-mod

Post#11 by Ed_P » 03 Feb 2025, 23:04

This Tutorial section is for Porteus and slapt-mod is a Porteus app.

User avatar
SEMERENDO.cr
Black ninja
Black ninja
Posts: 90
Joined: 08 Nov 2023, 20:36
Distribution: alt, Porteus 5 mixed + x0.9

[HOWTO] Install software with slapt-mod

Post#12 by SEMERENDO.cr » 04 Feb 2025, 22:37

Yeah all going PERFECT!
... I've been using Debian 2010 "squeeze" for years because flew, booting in 6 seconds and consuming just 300 MB of RAM. I had my 64-bit OS on a virtual machine for multimedia editing and browsing -until the motherboard died-. NOW I HAVE EVERYTHING ON Porteus.
I just hope it doesn't get too bloated and remains minimal and clean, taking less than 700 MB on a CD.

Image
Ed_P wrote:
03 Feb 2025, 23:04
This Tutorial section is for Porteus and slapt-mod is a Porteus app.

Post Reply