Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: edmazing on March 15, 2026, 09:51:06 PM
-
So far I've managed to package a quick bash script to run a few commands. I tossed a few scripts into /usr/sbin
One to load a few packages and one to setup a p9 file system (setup & startp9 respectively)
xterm -title "setting up..." -e sh -c "tce-load -i gcc.tcz;tce-load -i linux-6.18_api_headers.tcz;" (and so on)xterm -e sh -c "sudo insmod /lib/modules/6.18.2-tinycore/kernel/net/9p/p9net_virtio.ko.gz; sudo mkdir /home/tc/p9; sudo mount -t 9p -o trans=virtio,version=9p2000.L host9p /home/tc/p9"
Then I packaged a simple script setupdev
#!/bin/sh
xterm -e sh -c "setup; startp9"
(I didn't put the tcz's in onboot because the start up time becomes >5minutes for all the extensions)
tl;dr: Adding a bash script to an extension seems to loop and open a never ending number of terminal windows with just a single click of the icon.
-
Hi edmazing
... xterm -title "setting up..." -e sh -c "tce-load -i gcc.tcz;tce-load -i linux-6.18_api_headers.tcz;" (and so on) ...
You don't need to call tce-load over and over again:
tce-load -i gcc linux-6.18_api_headers (and so on)You can list multiple extensions in one command.
You don't need to include the .tcz when calling tce-load.
If you are planning on compiling, the toolchain is called compiletc.
-
That's good news. Not planning on compiling anything, just want to run a script when an icon is clicked... maybe I should be adjusting .wbar but I don't see a safe way to add an entry and an icon. I figured I'd create an extension for it but the extension seems to endlessly run the script once the desktop icon is pressed.
-
Still no luck.
I tried adding if [ -f "home/tc/.wbar" ]; then to the bootlocal.sh script but it seems like it's not created the .wbar file yet.
Is there a better way to add an entry to .wbar when the flwm desktop starts up?
-
Why note create an extension containing your script, a minimal *.desktop file and an icon?
i.e.
/usr/local/bin/myscript.sh
/usr/local/share/applications/myscript.desktop
/usr/local/share/pixmaps/myscript.png
-
I did try that but clicking the icon the script then opens windows without stopping.
The contents of myscript.sh
#!/bin/sh
xterm -e sh -c "cd /usr/sbin; startp9; setup;" (setup and startp9 are both scripts I posted previously)
-
Ah I was using mksquashfs and it was just adding a user_1,user_2 folder to the existing myapp.tcz
There does seem to be a downside though that any dependencies need to be added to the onboot.lst so the boot time is huge once more.
-
Hi edmazing
Try setting it up like this:
setupP9.sh
#!/bin/sh
ExtensionList="gcc linux-6.18_api_headers (and so on)"
echo "setting up..."
# Install extensions required for setting up, filter out "already installed" messages.
tce-load -i "$ExtensionList" 2>&1 | grep -v "already installed"
startP9.sh
#!/bin/sh
sudo insmod /lib/modules/6.18.2-tinycore/kernel/net/9p/p9net_virtio.ko.gz
sudo mkdir /home/tc/p9
sudo mount -t 9p -o trans=virtio,version=9p2000.L host9p /home/tc/p9
P9.sh
#!/bin/sh
xterm -e sh -c "setupP9.sh; startP9.sh; exec sh" &
P9.desktop
[Desktop Entry]
Name=P9
Exec=P9.sh
Terminal=false
X-FullPathIcon=/usr/local/share/pixmaps/P9.png
Then:
chmod 755 P9.sh
chmod 755 setupP9.sh
chmod 755 startP9.sh
mkdir -p P9/usr/local/bin/
mkdir -p P9/usr/local/share/applications/
mkdir -p P9/usr/local/share/pixmaps/
cp *P9.sh P9/usr/local/bin/
cp P9.desktop P9/usr/local/share/applications/
# Copy the png for your icon to P9/usr/local/share/pixmaps/
mksquashfs P9 $P9.tcz -noappend
There should be no need to add anything to onboot.lst except P9.tcz.
-
FWIW, I use jwm as my window manager and I have some scripts hooked up to buttons in the "tray" area. The config goes into ~/.jwmrc-tray
<TrayButton icon="/home/tc/dolly_48.png">
<Button mask="1">exec:aterm --geometry 100x25 -e ~tc/bin/firefix</Button>
<Button mask="2">exec:aterm --geometry 100x25 -e ~tc/bin/firefix --update</Button>
</TrayButton>In the above example, left click invokes the script w/o arguments and middle click invokes it with the --update argument. The script opens in a terminal window which closes on exit. If there are messages that need user attention, the script holds the window open by waiting for input.
Of course, if not using jwm, none of this applies.
-
I went with the extension method.
I've mostly got things down pat but I'm loading the extensions in the wrong order I think? Just alphabetically since I've got a big list
acl adwaita-icon-theme at-spi2-core attr bash binutils cairo coreutils dbus desktop-file-utils fakeroot file flex fribidi gamin gcc_base-dev gcc_libs-dev gcc_libs gcc gdk-pixbuf2-xlib gdk-pixbuf2 glib2 glibc_base-dev gmp graphite2 gtk-update-icon-cache gtk2 harfbuzz hicolor-icon-theme isl libcroco libffi liblzma librsvg libstartup-notification libtiff libXcomposite libXdamage libXi libxml2 libXrandr libX11-dev libXtst libzstd linux-6.18_api_headers mpc mpfr nano pango pcre pcre21042 pixman readline shared-mime-info udev-lib util-linux xorg-proto xdg-utils geany spacefm;
Is there a simple way to sort dependencies? Or will I have to trial and error it?
-
Hi edmazing
... Is there a simple way to sort dependencies? Or will I have to trial and error it?
Yes there is.
mkdir deps
cd deps
# Place the attached MinimizeDeps.sh and Deps.lst files here.
chmod 755 MinimizeDeps.sh
./MinimizeDeps.sh
The Result.dep file produced is the minimum required to
satisfy all dependencies. Rename it to P9.tcz.dep.
Place it with P9.tcz in your tce directory.
When you tce-load -i P9 it should load all dependencies.
The script (MinimizeDeps.sh) has variables that are set for TC17 x86.
Deps.lst contains the names of all of the extensions you want to load.
Hopefully you used tce-load -w to download all your extensions
so you have .dep files for extensions that need them.