Create an init ("rc") file for the medley command
I built medley from source and am running it using the medley/scripts/medley/medley.sh script.
I'd like it if the script could default to particular geometry so I don't need to provide the -g parameter with my preferred WxH every time I run it. I created my own shell script to do this, but it would be nice if there were a file to hold common settings - for example, a ~/.medleyrc file that says
-g 2560x1440 -noscroll -title "Medley Interlisp Rules OK"
@fghalasz suggested I open this issue so he can get it on his to-do list.
If you're running the X version, I believe it gets the default geometry from the X11 resource database.
if (XrmGetResource(rDB, "ldex.sysout", "Ldex.Sysout", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.title", "Ldex.Title", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.icontitle", "Ldex.icontitle", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.iconbitmap", "Ldex.Iconbitmap", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.geometry", "Ldex.geometry", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.screen", "Ldex.screen", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.NoFork", "Ldex.NoFork", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.noscroll", "Ldex.noscroll", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.memory", "Ldex.memory", str_type, &value) == True) {
if (XrmGetResource(rDB, "ldex.Init", "Ldex.Init", str_type, &value) == True) { for_makeinit = 1; }
if (XrmGetResource(rDB, "ldex.xsync", "Ldex.xsync", str_type, &value) == True) { xsync = True; }
if (XrmGetResource(rDB, "ldex.EtherNet", "Ldex.EtherNet", str_type, &value) == True) {
I would suggest not adding yet another way of specifying parameters, at least not without considering how that would/should interact with other existing mechanisms. There are some hardcoded defaults in the C code, some defaults in the run-medley script, defaults through the X resources, some in the medley.sh script, ...
Oh, that's really cool! I edited my ~/.Xresources to contain
ldex.screen: 2560x1440
I executed xrdb < ~/.Xresources and ran medley and it (a) worked and (b) taught me that there's a limit to the height of the screen.
Yeah, the maximum number of pixels on the screen is 2097152 (65536 * 16 * 2), distributed as you wish between the width and height, as long as the width is a multiple of 32 (or is it 16, bits of code disagree so let's say 32 to be sure), and you asked for 3686400 pixels, and some code doesn't check that that exceeds the limit (it should) so you're probably seeing some of MDS and/or cons pages on the end of the screen -- whatever is in the VM after the display space.
There are some cmdline args I'd love to stash away in an rc file that don't seem to be covered by the X resources (e.g., -a, -n, -e), but they're less of a hassle to type and/or hardcode in my own medley script.
Neither -n nor -nl are going to be helpful, since the loadups now take place in /tmp/loadups-nnnnn/ and sysouts never make it to $MEDLEYDIR/tmp/. Ah, but I see that -n in the run-medley script is different from -n in the medley.sh script -- but ldex.noscroll is a resource you can set if that's what you're looking for. Maiko doesn't know anything about -e, so it's presumably the choice of greet file or initial command that's handling that. -a is just the choice of initial sysout -- again, Maiko doesn't know about that, it just uses whatever is in the LDESRCESYSOUT, or resumes the last lisp.virtualmem, and writes back to LDEDESTSYSOUT.
i started making a https://github.com/masinter/homedir to allow me to share init files from different environments. I would regularly try out things on mac, win 10, win 11, linux, wsl, cygwin and raspberry pi.
Some things around startup ... i'd like resizing the medley window to happen at runtime, by doing (LOGOUT) and then restarting with a different size.
I'd like the 'repeatedly' option i've been thinking about having something analogous to rem.cm -- when you logout if you write a 'afterlogout-NNNNNN.cm' file then the script could restart with new parameters.
Does the new $MEDLEYDIR/.medley_config config file support address this issue? Can the issue be closed?
Closing as addresed by #1698.