Interlisp / medley

The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
https://Interlisp.org
MIT License
376 stars 19 forks source link

TigerVNC server not installed error with medley -v + on Raspberry Pi #1841

Open pamoroso opened 1 month ago

pamoroso commented 1 month ago

On my Raspberry Pi 400 running 64-bit Raspberry Pi OS (Debian Bookworm 12.7) I used Clang to build Medley X11 from the latest sources. When I launch Medley with the -v + option I get this error (BTW the error has a typo: that that):

pi@raspberrypi:~ $ medley -a -e -n -v +
Error: The -v or --vnc flag was set.
But it appears that that TigerVNC server \(Xvnc\) has not been installed.
Please install the TigerVNC server and try again.  On Debian and Ubuntu, use:
"sudo apt install tigervnc-standalone-server". On most other Linux distros, use the
distro's package manager to install the "tigervnc-server" package.
Exiting.

All the required TigerVNC components are installed (installato: installed):

pi@raspberrypi:~ $ apt list tigervnc* 
Elencazione... Fatto
tigervnc-common/stable,now 1.12.0+dfsg-8 arm64 [installato, automatico]
tigervnc-common/stable 1.12.0+dfsg-8 armhf
tigervnc-scraping-server/stable 1.12.0+dfsg-8 arm64
tigervnc-scraping-server/stable 1.12.0+dfsg-8 armhf
tigervnc-standalone-server/stable,now 1.12.0+dfsg-8 arm64 [installato]
tigervnc-standalone-server/stable 1.12.0+dfsg-8 armhf
tigervnc-tools/stable,now 1.12.0+dfsg-8 arm64 [installato, automatico]
tigervnc-tools/stable 1.12.0+dfsg-8 armhf
tigervnc-viewer/stable,now 1.12.0+dfsg-8 arm64 [installato]
tigervnc-viewer/stable 1.12.0+dfsg-8 armhf
tigervnc-xorg-extension/stable,now 1.12.0+dfsg-8 arm64 [installato]
tigervnc-xorg-extension/stable 1.12.0+dfsg-8 armhf
pi@raspberrypi:~ $ vnc
vncagent                vncpamhelper            vncserver-x11
vncconfig               vncpasswd               vncserver-x11-core
vncfopshelper           vncserver               vncserver-x11-serviced
vncinitconfig           vncserverui             vncsession
vnclicense              vncserver-virtual       vncviewer
vnclicensewiz           vncserver-virtuald      

However, no Xvnc program is in the executable path.

fghalasz commented 1 month ago

Are you running X11 or Wayland?

What does which Xvnc return?

How about which Xtigervnc?

How did you install tigervnc - using apt-get or was it already installed as part of the RpiOS?

pamoroso commented 1 month ago

I'm running Wayland which is now the default on Raspberry Pi OS. To install TigerVNC I used the software manager GUI tool that comes with Pi OS: I just marked the relevant packages and activated the installation.

I was wrong about Xvnc not being in the path, here's the output of which:

pi@raspberrypi:~ $ which Xvnc
/usr/bin/Xvnc
pi@raspberrypi:~ $ which Xtigervnc
/usr/bin/Xtigervnc
pi@raspberrypi:~ $ Xvnc
Xvnc       Xvnc-core  

medley_vnc.sh calls Xvnc with the -version option which the Pi OS Xvnc doesn't recognize. Executing Xvnc -version yields the error Unrecognized option: -version and outputs a very long notice of which this is the relevant part: xvnc-output.txt

However, Xtigervnc does accept the -version option:

pi@raspberrypi:~ $ Xtigervnc -version

Xvnc TigerVNC 1.12.0 - built 2023-01-06 16:01
Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101006, X.Org
fghalasz commented 1 month ago

@pamoroso Could you let me know what the following return on your RPi: which xtigervncviewer which tigervncviewer ls -l /etc/alternatives/vncviewer

pamoroso commented 1 month ago

This is the output of the commands:

pi@raspberrypi:~ $ which xtigervncviewer
/usr/bin/xtigervncviewer
pi@raspberrypi:~ $ which tigervncviewer
pi@raspberrypi:~ $ ls -l /etc/alternatives/vncviewer
lrwxrwxrwx 1 root root 24  6 gen  2023 /etc/alternatives/vncviewer -> /usr/bin/xtigervncviewer

/usr/bin/xtigervncviewer is not a symlink. which tigervncviewer returns nothing.

fghalasz commented 1 month ago

@pamoroso Thanks. I submitted PR #1842 to fix this. Try it out and see if it works for you.

pamoroso commented 1 month ago

I applied the patch but this somehow messed with my Medley installation and I can no longer run it. So I need to do some Medley troubleshooting before trying VNC.

In medley/scripts/medley/ I renamed medley.command and medley_vnc.sh, downloaded the versions from the patch, and set the x permission of both scripts. When I ran Medley I got this error:

pi@raspberrypi:~ $ medley -a -e -n -v +
Warning: The -v or --vnc flag was set.
But the vnc option is only available when running on 
Windows System for Linux (wsl) on x86_64 machines.
Ignoring the -v or --vnc flag.

Error: only one sysout can be specified.  Two or more sysouts were speci
fied
via the -l (--lisp), -f (--full), -a (--apps) flags and/or a sysout file
name

I realized the system still had a .deb Medley package and uninstalled it but now I get this puzzling error when launching Medley (File o directory non esistente: unknown file or directory):

pi@raspberrypi:~/medley/medley/scripts/medley $ medley -a -e -n -v +
bash: /usr/local/bin/medley: File o directory non esistente

This is the content of medley/scripts/medley:

pi@raspberrypi:~/medley/medley/scripts/medley $ ls -l
totale 200
-rwxr-xr-x 1 pi pi   132 29 set 17.19 compile.sh
-rwxr-xr-x 1 pi pi 11850 29 set 17.19 inline.sh
-rwxr-xr-x 1 pi pi  9326 29 set 17.19 medley_args.sh
-rw-r--r-- 1 pi pi    36  9 nov  2023 medley.cmd
-rwxr-xr-x 1 pi pi 45956  1 ott 11.32 medley.command
-rwxr-xr-x 1 pi pi 46076 29 set 17.19 medley.command.old
-rw-r--r-- 1 pi pi  2087 29 set 17.19 medley_configfile.sh
-rwxr-xr-x 1 pi pi  2236 29 set 17.19 medley_geometry.sh
-rw-r--r-- 1 pi pi  1378 29 set 17.19 medley_header.sh
-rwxr-xr-x 1 pi pi  7107 29 set 17.19 medley_main.sh
-rwxr-xr-x 1 pi pi 12003  9 nov  2023 medley.ps1
-rw-r--r-- 1 pi pi  8822 29 set 17.19 medley_run.sh
lrwxrwxrwx 1 pi pi    14  9 nov  2023 medley.sh -> medley.command
-rw-r--r-- 1 pi pi  4012 29 set 17.19 medley_usage.sh
-rw-r--r-- 1 pi pi  4095 29 set 17.19 medley_utils.sh
-rwxr-xr-x 1 pi pi  7045  1 ott 11.32 medley_vnc.sh
-rwxr-xr-x 1 pi pi  7165 29 set 17.19 medley_vnc.sh.old
-rw-r--r-- 1 pi pi   273 29 set 17.19 README

I need to figure out why the scripts are calling /usr/local/bin/medley (no longer installed) and what went wrong.

fghalasz commented 1 month ago

Try executing medley using ./medley rather than just medley while connected to your top level medley directory, which looks like it is ~/medley/medley. This way any medley commands on your path will be ignored.

Also, not that it matters in this case, but you don't need to copy over medleyvnc.sh. All of the medley*.sh files are compiled into a single bash script called medley.command (aka medley.sh). The compile.sh script does this compilation.

pamoroso commented 1 month ago

Okay, I'll try. Do I need to rebuild Medley after saving the two modified files? I just copied the files to the proper directory.

pamoroso commented 1 month ago

Executing medley using ./medley while connected to the top level directory works and Medley runs. But when I launch it with the VNC option I get this error:

pi@raspberrypi:~/medley/medley $ ./medley -a -e -n -v +
Using DISPLAY=:1
Using VNC_PORT=5901
"/home/pi/medley/medley/../maiko/linux.aarch64/lde" "/home/pi/medley/medley/loadups/apps.sysout" -id "default" -title "Medley Interlisp " -g 1440x900 -sc 1440x900 -noscroll
MEDLEYDIR: "/home/pi/medley/medley"
LOGINDIR: "/home/pi/il"
GREET FILE: "/home/pi/medley/medley/greetfiles/APPS-INIT.LCOM"
VMEM FILE: "/home/pi/il/vmem/lisp.virtualmem"
Unable to open X11 display from DISPLAY
vncconfig: unable to open display ":1"

and this dialog box with an error (connessione rifiutata: connection refused):

medley-vnc-error

VNC is enabled in the system settings and, as far as I know, no firewall is active.