Tiny Core Extensions > TCE Talk

Aterm -hold v1.00.01

(1/1)

edmazing:
I was trying to open another terminal window to run a script, then pause after execution to allow the user to exit after seeing the status of the commands. Aterm has no -hold option. I tried the most simple thing I could think of

--- Code: ---xterm -e 'sleep 5'
--- End code ---
as well as

--- Code: ---xterm -e 'ls -a && read -p "Press Anykey..."'
--- End code ---
and some variations. While

--- Code: ---read -p "Some example text"
--- End code ---
works in the primary terminal there doesn't seem to be a way I can find to spawn another terminal and have it stay open.

Is there a simple way to do this?
My solution is just to remove aterm.tcz and use xterm.tcz instead.

CNK:
Try removing the quotes. It's looking for a command named "sleep 5" instead of running the "sleep" command with "5" as an argument:


--- Code: ---$ aterm -e sleep 5

--- End code ---

Rich:
Hi edmazing
This seems to work:

--- Code: ---/usr/local/bin/aterm -e sh -c "MyScript.sh; exec sh" &
--- End code ---
For some reason  aterm  doesn't recognize command line switches
if called without a full path on my TC10 x86 system.

The aterm.tcz extension also includes an xterm link which worked for me:

--- Code: ---xterm -e sh -c "MyScript.sh; exec sh" &
--- End code ---

Leee:
In a moment of annoyance, I wrote a little wrapper script called htfto (Hold The F*ing Terminal Open that just runs the script and reads a junk variable afterward:

--- Code: ---#!/bin/sh
# htfto - hold the f*ing terminal open                 lem 2026-03-15 14:06
#         start a script in a new terminal window and don't close the
#         window when the script ends.
# ARGS: a script names, with its arguments
#
[ -z "${1}" ] && echo "htfto: ERR - no program given" && exit 10

$*
read junk

--- End code ---

Rich:
Hi edmazing
Update:

--- Quote from: Rich on March 14, 2026, 08:44:51 PM ---This seems to work:

--- Code: ---/usr/local/bin/aterm -e sh -c "MyScript.sh; exec sh" &
--- End code ---
For some reason  aterm  doesn't recognize command line switches
if called without a full path on my TC10 x86 system. ...
--- End quote ---
Turns out the problem was in my  .ashrc  file.

Sometime in the past I added this for some reason:

--- Code: ---alias aterm='aterm &'
--- End code ---

Removing it fixed the issue so now this works correctly:

--- Code: ---aterm -e sh -c "MyScript.sh; exec sh" &
--- End code ---

Navigation

[0] Message Index

Go to full version