If you want to extend the applications on the Nanolinux CD you can make your own extensions and add them to the ISO. Explained below is how this can be done.
Extension files are compressed read-only file systems made with squashfs. To make new extensions you need to download and install the squashfs-tools-4.x.tcz extension from the repo.
The extensions you can download and install from the repo or which are already present in the "cde/optional" directory on the ISO are squashfs files that contain a directory structure relative to the root of the Nanolinux file system. When Nanolinux boots it will copy (or loopmount) this directory structure contained in the squashfs files into the Nanolinux root file system. So if you make the directory structure for your extension you have to keep that in mind so you will find the files at the expected locations after booting.
Example
Let's say you have made a nice script that you want to be able to call with a click from the Nanolinux desktop. For this example the name of this script shall be "showmac.sh". This script calls ifconfig to read out the mac address of the ethernet link. The new extension name shall be showmac.tgz.
So first make a directory called "showmac" in your home directory:
mkdir /home/tc/showmac
The files and directories in the showmac directory will be copied to root later by Nanolinux. If you want to put your script into "/usr/local/bin" you will have to make these directories in the showmac directory which results in the following structure:
mkdir -p /home/tc/showmac/usr/local/bin
and then put the showmac.sh file in there:
/home/tc/showmac/usr/local/bin/showmac.sh
You can and usually will add additional files and directories here. You can also write files into the home directory this way:
mkdir -p /home/tc/showmac/home/tc
If you arranged all the files and directories in the showmac directory you can make an extension with the following command:
sudo -s cd /home/tc mksquashfs showmac showmac.tcz
Mksquashfs will compress all the files and directories in the showmac directory into the showmac.tcz file which in this example is generated in the current directory /home/tc.
Then copy the showmac.tcz file into your “cde/optional” directory on your flash disk or - using e.g. the UltraISO editor - copy it into the Nanolinux ISO file. If you installed Nanolinux on a hard disk the extension files will be in the "tce/optional" directory.
To get Nanolinux to read and install the new extension when booting it also has to be added to the onboot.lst file in the cde directory. This can be done with an editor, however, do not put carriage return characters into the file. On Windows you could use the Dev-CPP editor for that which can be set to use LF only.
Put the extension name into a new line at the bottom of the onboot.lst file. This can also be done with UltraISO too. Nanolinux will install the extensions according to their names in the order A to Z, then a to z.
Inspect extensions
To check the file system in an extension you can enter the list command:
unsquashfs -l showmac.tcz
Unpack extensions
If you want to update e.g. the showmac.tcz extension and do not have the original files available you can unpack the extension using this command:
unsquashfs -f -d /home/tc/showmac/ showmac.tcz
Squashfs Dokumentation
Documentation for unsquashfs and mksquashfs can be found here:
New desktop entry
To configure a new icon for e.g. the showmac.sh script you could copy the script into the following directory:
/usr/bin/deskapps/nxterm/showmac.sh
Then make a new showmac.desktop entry in the "/usr/bin/desktop" directory that looks like this:
[Desktop Entry] Version=1.0 Type=Application Name=Showmac Comment=NXterm TryExec=/usr/bin/deskapps/nxterm/ Exec=nxterm /usr/bin/deskapps/nxterm/showmac.sh Path=/usr/bin/deskapps/nxterm/ Icon=
Both of these files can be added to the showmac.tcz file. Make sure to use the right directory structure for that.
When the SLWM desktop starts it will find the showmac.desktop entry and put a new icon on the desktop.
You can also add your own icon. This has to be a 32x32 pixel XPM image file.
When running Nanolinux you can move the icon to any position. SLWM will store this location in the "/usr/bin/desktop/slwm.cfg" file. You can save this file on a hard disk and then add this too to your showmac.tcz file. Then the icon will show up at the selected position.