|
| | | | A M I S C R E E N
| | | | |
amiscreen-0.3
--------------
---
Have you ever heard of 'screen'? It is a very nice prog that allows to
have virtual shells that can be detached from and attached to any terminal,
so that single shell process can act as a launch point for true background
processes. Many attempts were made to port 'screen' to Amiga, but this is
not an easy task, so i decided to take a different path and write a clone.
Please note that 'amiscreen' is not an exact 'screen' replica it just rips
the idea and that is all.
- Beware! This program is considered experimental! -
---
NOTES:
[*]
Requires 68020(no FPU)+, OS2.04(theoretically)+, 64+ kilo of free memory.
[*]
To detach use 'CTRL + F' key combination. I know this should be something
else, but as this is very experimental prog it will stay this way for now.
[*]
Programs who have quitted while being in detached mode will still be
visible on the list. You must attach to such instance and press 'Return'
key to kill it. This is very helpful because you can see what happened.
[*]
At present there can be up to 15 progs launched from under single process
whose output will be remembered. Current file I/O implementation in the
server does not allow more!
[*]
Server itself is a single tasking thing, so clients who do output large
amounts of text may slow down other clients. Lockup is not possible though
since server works in cooperative mode.
[*]
If you would like to use "File Descriptor Relay" in your scripts then use
the 'amiserver'. More on server can be found in the 'qdev' docs.
[*]
'amiscreen' uses its own shell that tries to emulate the behaviour of the
OS shell. This specifically means that whenever you run a script it will
not be executed in normal shell! This shell emulation does not operate on
stream but loads whole script into memory!
[*]
Certain resident commands cannot be used with 'amiscreen' and these include
'Execute' and 'Run'. Note that these commands can be used in the scripts
however! To run a script just provide its file name. Same applies to Arexx
scripts.
[*]
One great advantage over the 'Execute' is that with 'amiscreen' you can
catch the output of other scripts or programs within primary script without
the need to hack on redirection.
[*]
Many, many 'ncurses' based proggies do work like a charm. I think that most
of the ordinary ones too.
[*]
Important! Tapes are never erased and are organised on record by record
basis(clips). If you want to start a clean recording you will have to
empty or delete the file. Remember though that you will need to suffixize
the filename with '.tape' to activate VCR!
---
BUGS:
[*]
Arexx processes are not able to receive sigs as sent using 'CTRL + C,D,E,F'
key combination! This is because actual processes are 'RexxMast' processes
and the signals go to 'rx'...
[*]
Programs who make a copy of 'Input()' and/or 'Output()' may not work
properly or at all! Some 'ixemul' progs are known to copy the I/O at
startup...
[*]
Programs that are put in sub-scripts and who expect input will become
non-interactive!
[*]
Only top level 'Run' will find the right output and will be synchronised!
Every 'Run' that was invoked by inner script called with 'Execute' will be
forwarded to 'NIL:'! Maybe a feature?
[*]
Input handling is a bit buggy, some programs may interpret key presses
wrongly. This is related to ugly raw/cooked mode detection.
[*]
When started from an '.info' stub window may not be killable with the close
gadget. Use 'CTRL + \' to close it.
[*]
Currenly there is no way to detach when in cooked mode. You must finish
typing and press 'Return' key, so that signal will trigger action.
---
HELP:
> amiscreen ?
DT=DETACH/S,NO=NOWAIT/S,SI=SINGLE/S,NL=NOLINE/S,TO=TOFILE/K,
CL=CMDLINE/F
DT=DETACH/S - Detach as soon as the program gets loaded and launched.
NO=NOWAIT/S - Do not wait for user response if program has ended and
there is no terminal attached.
SI=SINGLE/S - Activate single instance mode, so that a single command
line input launches a prog. and after detaching allows
to reattach. This is especially useful when creating
Workbench '.info' stubs.
NL=NOLINE/S - Some programs do not 'SetMode()' to RAW on the default
streams and expect byte by byte input. Use this when
after pressing first character proggy assumes you typed
line feed. This switch is client related, so you can
attach with or without it at any time.
TO=TOFILE/K - Output everything to this file. This is not redirection
in the strict sense, normal output is still possible!
Think of it as a VCR more like and especially that when
file has a suffix of '.tape'. Use 'playamitape' to play
what was recorded with exact delays.
CL=CMDLINE/F - Command name and its optional arguments. Important! All
above options do not work when passed after this arg. ,
they need to be specified beforehand!
---
CLI USAGE:
; Below is a quick script, say 'autoavail'
lab begin
avail
echo "Press 'CTRL + D/C' to stop.*e[5A"
wait 1
skip back begin
; Lets run it in the background, like one would 'Run'
amiscreen >NIL: dt no autoavail
; Dump all available instances
amiscreen
; Created(ago) State Instance
; ---------------- ----------- ------------------
; 000:00:00:03 Detached $01_autoavail
; Attach this shell/terminal to the above instance
amiscreen $01_autoavail
; Suppose you want to play 'dopewars' through telnet
amiscreen nl dopewars
; But suddenly your connection timeouts... Now if
; you would run the game ordinarily then it would be
; all lost, but since we use virtual shell you can:
ktm [amiscreen] f
amiscreen nl $01_dopewars
; If you want to kill the server then send it F sig.
ktm [ASN0] f
---
WB USAGE:
1) Create a project icon(just an '.info' stub)
2) Use Workbench to inspect it(Information...)
3) Set the tooltypes to what you would type on
the command line
4) Set default tool to 'amiscreen' then hit
'Save'
5) Now just double click that icon and enjoy
---
megacz
| |
| | | | |
|