Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
134662b
First pass at museum mode where can specify a URL of a start script w…
fghalasz Oct 29, 2025
80bec28
Fix typo in server/js/medley.js
fghalasz Oct 29, 2025
6cf61ae
Fix typo in client/js/main.js
fghalasz Oct 29, 2025
f02e6cc
Fix up a small bit of code in /server/js/medley.js
fghalasz Oct 29, 2025
b04276c
Fix up typo in /server/js/medley.js
fghalasz Oct 29, 2025
75b4baa
Fix setting of START_SCRIPT in run-online-medley script
fghalasz Oct 30, 2025
a186c79
fix misformed medleyEnvs function.
fghalasz Oct 30, 2025
0e4191d
Updating ONLINE-INIT to latest
fghalasz Oct 30, 2025
47b4fbd
Create a start script for testing museum mode
fghalasz Oct 31, 2025
928b207
Adding some debugging code
fghalasz Oct 31, 2025
7cd2126
Adding some debugging code
fghalasz Oct 31, 2025
3d49391
Adding some debugging code
fghalasz Oct 31, 2025
9d36aa2
Adding some debugging code
fghalasz Oct 31, 2025
63c5b61
Removing some debugging code; fixing typo in medley.js
fghalasz Oct 31, 2025
991999b
Adding some debugging code
fghalasz Oct 31, 2025
9115104
Adding some debugging code
fghalasz Oct 31, 2025
cca61e6
Adding some debugging code
fghalasz Oct 31, 2025
5e398b8
Adding some debugging code
fghalasz Nov 1, 2025
6b78411
Debugging
fghalasz Nov 1, 2025
6c5faf3
Debugging
fghalasz Nov 1, 2025
ae08c15
Rename START_KINETIC to START-KINETIC
fghalasz Nov 1, 2025
040eb4d
Renaming START_KINETIC to START-KINETIC and adding ADD.PROCESS to it.
fghalasz Nov 1, 2025
7839dac
Fixing up delete of START_KINETIC from last commit
fghalasz Nov 1, 2025
43bee9e
Fixing START-KINETIC
fghalasz Nov 1, 2025
8d0b6e6
Add second mudeum-mode sample start script focused on pamoroso's INSP…
fghalasz Nov 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions docker_medley/init/ONLINE-INIT
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "18-Mar-2025 22:45:51" {DSK}<home>medley>il>ONLINE-INIT.;1 10668
(FILECREATED "29-Oct-2025 23:56:02" {DSK}<home>frank>il>medley>greetfiles>ONLINE-INIT.;2 11034

:EDIT-BY "guest"
:EDIT-BY "FGH"

:PREVIOUS-DATE "17-Mar-2025 17:06:18" {DSK}<home>medley>il>ONLINE-INIT.;1)
:CHANGES-TO (ADVICE (SAVEVM :IN \IDLER))
(FNS Online.SftpInitInfo Online.SftpUpdateInfo Online.SetUpNOTECARDSDIRECTORIES
Online.DoInit ONLINEP Online.FileButton)
(VARS ONLINE-INITCOMS)

:PREVIOUS-DATE "18-Mar-2025 22:45:51" {DSK}<home>frank>il>medley>greetfiles>ONLINE-INIT.;1)


(PRETTYCOMPRINT ONLINE-INITCOMS)
Expand Down Expand Up @@ -149,6 +154,8 @@
(Online.DoInit
[LAMBDA NIL

(* ;; "Edited 29-Oct-2025 23:55 by FGH")

(* ;; "Edited 16-Mar-2025 23:26 by guest")

(* ;; "Edited 25-Feb-2024 11:37 by fgh")
Expand Down Expand Up @@ -217,14 +224,15 @@
(RPLACA (CAR CHAT.DISPLAYTYPES)
NIL)

(* ;;
 "Setup NOTECARDSDIRECTORIES. Should be done it APPS-INIT. But until thats done, we'll do it here.")
(* ;; "Create File Import/Export Button")

(Online.SetUpNOTECARDSDIRECTORIES)
(Online.FileButton)

(* ;; "Create File Import/Export Button")
(* ;; "If there is a start-script file, load it ")

(Online.FileButton])
(LET [(START-SCRIPT (UNIX-GETENV 'START_SCRIPT]
(IF START-SCRIPT
THEN (LOAD START-SCRIPT])

(ONLINEP
[LAMBDA NIL (* ; "Edited 24-Feb-2024 22:31 by fgh")
Expand All @@ -239,7 +247,7 @@
(BKSYSBUF " ")
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1640 10532 (Online.SftpInitInfo 1650 . 2523) (Online.SftpUpdateInfo 2525 . 2780) (
Online.SetUpNOTECARDSDIRECTORIES 2782 . 4490) (Online.FileButton 4492 . 7320) (Online.DoInit 7322 .
10393) (ONLINEP 10395 . 10530)))))
(FILEMAP (NIL (1924 10898 (Online.SftpInitInfo 1934 . 2807) (Online.SftpUpdateInfo 2809 . 3064) (
Online.SetUpNOTECARDSDIRECTORIES 3066 . 4774) (Online.FileButton 4776 . 7604) (Online.DoInit 7606 .
10759) (ONLINEP 10761 . 10896)))))
STOP
Binary file modified docker_medley/init/ONLINE-INIT.LCOM
100755 → 100644
Binary file not shown.
14 changes: 14 additions & 0 deletions docker_medley/scripts/run-online-medley
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ if [ $# -gt 1 ] && [ "$2" = "custom" ]; then
fi
fi
#
unset START_SCRIPT
if [ -n "${START_SCRIPT_URL}" ]
then
export START_SCRIPT="${MEDLEY_USERDIR}/initdir/START-SCRIPT"
mkdir -p "$(dirname "${START_SCRIPT}")"
wget "${START_SCRIPT_URL}" -O "${START_SCRIPT}"
if [ $? -ne 0 ]
then
rm -f "${START_SCRIPT}"
unset START_SCRIPT
fi
fi
unset START_SCRIPT_URL
#
if [ $# -gt 2 ]; then
width=$3
else
Expand Down
55 changes: 55 additions & 0 deletions test/start-scripts/START-INSPHEX
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED " 5-Nov-2025 23:12:38" {DSK}<home>frank>il>medley>library>START-INSPHEX.;5 2142

:EDIT-BY "FGH"

:CHANGES-TO (FNS START-INSPHEX)
(VARS START-INSPHEXCOMS)
(FUNCTIONS TmpShellWget)

:PREVIOUS-DATE " 5-Nov-2025 19:57:59" {DSK}<home>frank>il>medley>library>START-INSPHEX.;1)


(PRETTYCOMPRINT START-INSPHEXCOMS)

(RPAQQ START-INSPHEXCOMS ((FUNCTIONS TmpShellWget)
(FNS START-INSPHEX)
(P (START-INSPHEX))))

(CL:DEFUN TmpShellWget (URL OUTFILENAME)
(LET* ((WGET (ShellWhich "wget"))
(OUTNAME (OUTFILEP OUTFILENAME))
(UNIXNAME (LET [(UN (UNIX-FILE-NAME OUTNAME 'OUTPUT]
(if (STREQUAL (SUBSTRING UN (NCHARS UN))
".")
then (SUBSTRING UN 1 -2)
else UN)))
(CMD (CONCAT WGET " " URL " -O " UNIXNAME)))
(if (NULL WGET)
then (ERROR "ShellWget - wget not available"))
(ShellCommand CMD)
OUTNAME))
(DEFINEQ

(START-INSPHEX
[LAMBDA NIL (* ; "Edited 5-Nov-2025 23:09 by FGH")
(LET ((INSPHEX.FILE (CONCAT LOGINDIR ">INSPHEX"))
INSPHEX.DFASL)
(TmpShellWget "https://raw.githubusercontent.com/pamoroso/insphex/refs/heads/main/INSPHEX"
INSPHEX.FILE)
(SETQ INSPHEX.DFASL (CL:COMPILE-FILE INSPHEX.FILE))
(LOAD INSPHEX.DFASL)
[ADVISE '(TEDIT IN INSPHEX::CREATE-HEX-WINDOW)
'BEFORE
'(SETQ WINDOW (CREATEW (CREATEREGION (FIX (TIMES 0.25 SCREENWIDTH))
(FIX (TIMES 0.25 SCREENHEIGHT))
(FIX (TIMES 0.5 SCREENWIDTH))
(FIX (TIMES 0.5 SCREENHEIGHT]
(ADD.PROCESS '(INSPHEX:HEXDUMP INSPHEX.DFASL T])
)

(START-INSPHEX)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (608 1201 (TmpShellWget 608 . 1201)) (1202 2098 (START-INSPHEX 1212 . 2096)))))
STOP
Binary file added test/start-scripts/START-INSPHEX.DFASL
Binary file not shown.
33 changes: 33 additions & 0 deletions test/start-scripts/START-KINETIC
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED " 1-Nov-2025 13:41:38" {DSK}<home>frank>il>medley>START-KINETIC.;2 1112

:EDIT-BY "FGH"

:CHANGES-TO (FNS START-KINETIC)

:PREVIOUS-DATE " 1-Nov-2025 13:21:22" {DSK}<home>frank>il>medley>START-KINETIC.;1)


(PRETTYCOMPRINT START-KINETICCOMS)

(RPAQQ START-KINETICCOMS ((FILES KINETIC)
(FNS START-KINETIC)
(P (START-KINETIC))))

(FILESLOAD KINETIC)
(DEFINEQ

(START-KINETIC
[LAMBDA NIL (* ; "Edited 1-Nov-2025 13:41 by FGH")
(* ; "Edited 1-Nov-2025 13:15 by FGH")
(ADD.PROCESS '(KINETIC (CREATEW (CREATEREGION (FIX (TIMES 0.25 SCREENWIDTH))
(FIX (TIMES 0.25 SCREENHEIGHT))
(FIX (TIMES 0.5 SCREENWIDTH))
(FIX (TIMES 0.5 SCREENHEIGHT])
)

(START-KINETIC)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (517 1068 (START-KINETIC 527 . 1066)))))
STOP
47 changes: 16 additions & 31 deletions web-portal/client/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,36 +159,7 @@ function startSession (interlispOrXterm) {
.then( data => {
const isRunning = data.isRunning;
const sessionType = data.target;
if(isRunning) {
new Promise((resolve, reject) => {
const dlg = document.getElementById("reconnect-dialog");
const typeEl = document.getElementById("rd-type-span");
typeEl.html = sessionType;
dlg.resolve = resolve;
dlg.reject = reject;
dlg.showModal();
}
)
.then(RorK => {
window.location.assign(
`/medley/${interlispOrXterm || "interlisp"}`
+ `?screen_width=${screenWidth}`
+ `&screen_height=${screenHeight}`
+ `&if=${RorK}`
+ `&resume=${resume || "false"}`
+ `&custom=${custom || "false"}`
+ `&custom_init=${customInit || "false"}`
+ `&notecards=${runNotecards || "false"}`
+ `&rooms=${runRooms || "false"}`
+ `&sftp=${startSftp || "false"}`
+ `&exec=${medleyExec || "inter"}`
+ ( isAutoLogin ? "&autologin" : "")
);
}
);
}
else {
window.location.assign(
const medley_url =
`/medley/${interlispOrXterm || "interlisp"}`
+ `?screen_width=${screenWidth}`
+ `&screen_height=${screenHeight}`
Expand All @@ -200,8 +171,22 @@ function startSession (interlispOrXterm) {
+ `&sftp=${startSftp || "false"}`
+ `&exec=${medleyExec || "inter"}`
+ ( isAutoLogin ? "&autologin" : "")
);
+ ( (alStart != "") ? `&start=${encodeURIComponent(alStart)}` : "" )
;

if(isRunning) {
new Promise((resolve, reject) => {
const dlg = document.getElementById("reconnect-dialog");
const typeEl = document.getElementById("rd-type-span");
typeEl.html = sessionType;
dlg.resolve = resolve;
dlg.reject = reject;
dlg.showModal();
}
)
.then(RorK => { window.location.assign(medley_url + `&if=${RorK}`); } );
}
else window.location.assign(medley_url);
},
reason => {}
);
Expand Down
1 change: 1 addition & 0 deletions web-portal/client/views/main.pug
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ block headeradds
const alNotecards = #{notecards};
const alRooms = #{rooms};
const alURL = "#{alURL}";
const alStart = "#{start}";

link(rel="stylesheet", href="/stylesheets/main.css")

Expand Down
4 changes: 3 additions & 1 deletion web-portal/server/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ app.get('/main',
isAutoLogin: isAutoLogin,
notecards: (req.query.notecards != undefined),
rooms: (req.query.rooms != undefined),
alURL: alURL || "dummy"
alURL: alURL || "dummy",
start: (req.query.start != undefined) && (req.query.start != "") ? req.query.start : ""
}
);
}
Expand All @@ -127,6 +128,7 @@ app.get('/guest',
newQuery.password = config.guestPassword;
if(req.query.notecards != undefined) newQuery.notecards="";
if(req.query.rooms != undefined) newQuery.rooms="";
if((req.query.start != undefined) && (req.query.start != "")) newQuery.start = req.query.start;
res.redirect(url.format({pathname:"/user/autologin", query: newQuery}));
}
);
Expand Down
8 changes: 8 additions & 0 deletions web-portal/server/js/medley.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ function medleyEnvs(req) {
const nc = (req.query.notecards && (req.query.notecards.toLowerCase() == "true")) ? "true" : "false";
const rooms = (req.query.rooms && (req.query.rooms.toLowerCase() == "true")) ? "true" : "false";
const exec = (req.query.exec && (req.query.exec.toLowerCase() == "common")) ? "common" : "inter";
var start = false;
var frank = 0;
try {
if ((req.query.start != undefined) && (req.query.start != ""))
start = req.query.start;
}
catch(e) { start = false; frank = 2;}
return ` --env MEDLEY_EMAIL='${u.username}'`
+ ` --env MEDLEY_UNAME='${u.uname || "medley" }'`
+ ` --env MEDLEY_FIRSTNAME='${u.firstname || "Medley"}'`
Expand All @@ -79,6 +86,7 @@ function medleyEnvs(req) {
+ ` --env RUN_ROOMS=${rooms}`
+ ` --env MEDLEY_EXEC=${exec}`
+ ` --env MEDLEY_MEMORY=${config.medleyMemoryArg}`
+ ( start ? ` --env START_SCRIPT_URL="${start}"` : "" )
;
}

Expand Down
2 changes: 2 additions & 0 deletions web-portal/server/js/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ function passportAuthenticate(req, res, next) {
newQuery.autologin="";
if(req.query.notecards != undefined) newQuery.notecards="";
if(req.query.rooms != undefined) newQuery.rooms="";
if((req.query.start != undefined) && (req.query.start != ""))
newQuery.start=req.query.start;
return res.redirect(url.format({pathname:"/main", query: newQuery}));
}
else
Expand Down