Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 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
826768a
Updated START-INSPHEX start-script - this time it actually works
fghalasz Nov 7, 2025
43d785e
Scooching INSPHEX window over a bit in START-INSPHEX start script
fghalasz Nov 7, 2025
d9d797b
Move start-scripts to top level of online repo. Add URLs used with t…
fghalasz Nov 7, 2025
48fb93b
Fix start-script URLs
fghalasz Nov 7, 2025
67ee9ae
Update URL to use 'github.com' instead of 'raw.githubusercontent.com'
fghalasz Nov 7, 2025
72b293c
Merge branch 'main' into fgh_museum-mode
fghalasz Nov 8, 2025
958349c
Add new routes for autologin, /demo/guest is equivalent to the curren…
fghalasz Nov 8, 2025
3906ca4
Fixing res.redirect statements to include query
fghalasz Nov 8, 2025
2299b53
Debugging /demo/login route
fghalasz Nov 8, 2025
73bd1b9
Fix typo
fghalasz Nov 8, 2025
cedf381
Debugging /demo/login route
fghalasz Nov 8, 2025
08f5e50
Debugging /demo/login route
fghalasz Nov 8, 2025
e7b0bb6
Redoing routing for /demo/guest and /demo/login paths.
fghalasz Nov 9, 2025
b1ef52c
Add relogin route for /demo routes.
fghalasz Nov 10, 2025
fb52628
Fix typo
fghalasz Nov 10, 2025
4c13770
Fix relogin page; fix adding autologin=true to originalURL
fghalasz Nov 10, 2025
d891c83
Fix typo
fghalasz Nov 10, 2025
2557e31
Fixing handling of encode and decode of URLS
fghalasz Nov 10, 2025
4402053
Debugging relogin route
fghalasz Nov 10, 2025
8ded780
Still debugging /demo/login
fghalasz Nov 10, 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
60 changes: 60 additions & 0 deletions start-scripts/START-INSPHEX
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED " 7-Nov-2025 10:43:14" {DSK}<home>frank>il>online>test>start-scripts>START-INSPHEX.;10 2342

:EDIT-BY "FGH"

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

:PREVIOUS-DATE " 6-Nov-2025 20:45:51"
{DSK}<home>frank>il>online>test>start-scripts>START-INSPHEX.;2)


(PRETTYCOMPRINT START-INSPHEXCOMS)

(RPAQQ START-INSPHEXCOMS ((P (DEFPACKAGE "INSPHEX" (:USE "LISP" "XCL")))
(FUNCTIONS TmpShellWget)
(FNS START-INSPHEX)
(P (START-INSPHEX))))

(DEFPACKAGE "INSPHEX" (:USE "LISP" "XCL"))

(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 7-Nov-2025 10:43 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.35 SCREENWIDTH))
(FIX (TIMES 0.25 SCREENHEIGHT))
(FIX (TIMES 0.5 SCREENWIDTH))
(FIX (TIMES 0.5 SCREENHEIGHT]
(ADD.PROCESS (LIST (CL:INTERN "HEXDUMP" (CL:FIND-PACKAGE "INSPHEX"))
(KWOTE INSPHEX.DFASL)
T])
)

(START-INSPHEX)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (706 1299 (TmpShellWget 706 . 1299)) (1300 2298 (START-INSPHEX 1310 . 2296)))))
STOP
Binary file added start-scripts/START-INSPHEX.DFASL
Binary file not shown.
2 changes: 2 additions & 0 deletions start-scripts/START-INSPHEX.URL
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://online.interlisp.org:8081/guest?start=https%3A%2F%2Fgithub.com%2FInterlisp%2Fonline%2Fraw%2Frefs%2Fheads%2Ffgh_museum-mode%2Fstart-scripts%2FSTART-INSPHEX.DFASL

33 changes: 33 additions & 0 deletions 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
1 change: 1 addition & 0 deletions start-scripts/START-KINETIC.URL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://online.interlisp.org:8081/guest?start=https%3A%2F%2Fgithub.com%2FInterlisp%2Fonline%2Fraw%2Frefs%2Fheads%2Ffgh_museum-mode%2Fstart-scripts%2FSTART-KINETIC
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
2 changes: 1 addition & 1 deletion web-portal/client/views/again.pug
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ block headeradds
block content

.row.text-center#again-button
button.main-button(type="button" onclick='window.location.assign(decodeURI(alURL));')!= "Run Medley Again"
button.main-button(type="button" onclick='window.location.assign(decodeURIComponent(alURL));')!= "Run Medley Again"

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
46 changes: 46 additions & 0 deletions web-portal/client/views/relogin.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//-
/***************************************************************************
*
* relogin.pug: relogin page for online.interlisp.org web portal.
*
* 2025-11-09 Frank Halasz
*
*
* Copyright: 2025 by Interlisp.org
*
*
**************************************************************************/

extends layout

block variables

block headeradds

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

script.

document.getElementById("username").innerHTML = "#{loggedUsername}";

function Yes() { window.location.assign("#{redirectYes}"); }

function No() { window.location.assign("#{redirectNo}"); }

block content

div#page-title Change Login?

div#logged-in-as-div
p Currently logged in as: <span id="username"></span>
p
p
p Keep current login?
p
p
.row
.text-center#yes_no_button_div
button(type="button" id="yes_button" onclick="Yes()").main-button No, log in again
button(type="button" id="no_button" onclick="No()").main-button Yes, continue with current login


66 changes: 51 additions & 15 deletions web-portal/server/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,62 @@ 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 : ""
}
);
}
);
app.get('/guest',
(req, res) => {

const cookieUrl = encodeURI(`${req.protocol}://${req.get('host')}${req.originalUrl}`);
res.cookie('autologinURL', cookieUrl);

const newQuery = {};
newQuery.autologin = "";
newQuery.username = config.guestUsername;
newQuery.password = config.guestPassword;
if(req.query.notecards != undefined) newQuery.notecards="";
if(req.query.rooms != undefined) newQuery.rooms="";
res.redirect(url.format({pathname:"/user/autologin", query: newQuery}));
}

function autologinGoToMain(req, res, next) {
const cookieUrl = encodeURIComponent(`${req.protocol}://${req.get('host')}${req.originalUrl}`);
res.cookie('autologinURL', cookieUrl);
res.redirect(url.format({pathname:"/main", query: req.query}));
}

function autologinReturnTo(req) {
return req.originalUrl + (req.originalUrl.includes("?") ? "&" : "?") + "autologin=true";
}

app.get([ '/guest', '/demo', '/demo/guest' ],
(req, res, next) => {
if(req.query.autologin === undefined) {
if (req.isAuthenticated && req.isAuthenticated()) {
req.logout();
}
req.session.returnTo = autologinReturnTo(req);
let newQuery = {};
newQuery.username = config.guestUsername;
newQuery.password = config.guestPassword;
res.redirect(url.format({pathname:"/user/autologin", query: newQuery}));
}
else next();
},
autologinGoToMain
);

app.get([ '/demo/login' ],
(req, res, next) => {
if(req.query.autologin === undefined) {
req.session.returnTo = autologinReturnTo(req);
if (req.isAuthenticated && req.isAuthenticated()) {
if (req.user.username == config.guestUsername)
res.redirect(url.format({ pathname:"/user/autologin", query:{logout: "true"} }));
else res.render('relogin',
{
loggedUsername: req.user.username,
redirectNo: url.format({ pathname:"/user/autologin", query:{} }),
redirectYes: url.format({ pathname:"/user/autologin", query:{logout: "true"} })
}
);
}
else res.redirect(url.format({ pathname:"/user/autologin", query:{} }));
}
else next();
},
autologinGoToMain
);

app.use('/user', userRouter);
app.use('/medley', ensureLoggedIn(), medleyRouter);
app.use('/client', ensureLoggedIn(), clientRouter);
Expand Down
Loading