[squeak-dev] Controlling a headless server Squeak through VNC

tim Rowledge tim at rowledge.org
Sat Dec 3 21:42:43 UTC 2022


Nice description by Dave. 

A couple of extra points from my experience using the RFB server -

- the RealVNC viewer I use for my Pi systems doesn't connect properly, complaining about some rectangle protocol or other. Other people have mentioned I think 'vinegar' and 'remmini' viwers as working.
- my server images get a configure value in their config startup files to set the rfb port since there are multiple running servers and you don't want to try sharing the port.
- it works extremely well to debug across Canada. Mind you, I *do* have a 1.5 Gb fibre connection, which probably helps.
- if you (like me) unset the 'swap mouse buttons' setting so that you have the menu button in the *middle* as Larry Tester intended (and not on the right as chosen by evil demented whackaloons out to destroy all that is good) then you will need to have the same setting in your server images or things get a bit... confusing.
- copy/paste works, kinda. This is an issue that seems to be pretty uniform across every VNC type appllication I have ever used, for every machine. Sometimes you paste what you wanted, sometimes you paste something you copied from the other machine hours ago. I haven't ever built a satisfactory mental model.
- probably best to set the display background to a flat colour, turn off soft shadows, set the dock-clock to not show seconds.
- ssh port forwarding is freakin' awesome.

> On 2022-12-03, at 1:03 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> During a recent board discussion, Tim asked about experiences in using VNC
> to control server images. There are various ways to do this, but here is how
> it is done for the https://squeaksource.com server. The easiest way to see
> how it works is to try it out on your own computer, so here is what to do:
> 
> - Start with a fresh Squeak image.
> - Open a Monticello Browser, and add repository http://source.squeak.org/ss.
> - Open the repository and navigate to category update.sscom.
> - Select update.sscom-dtl.5.mcm and load it.
> 
> When loading is complete, you will see a notifier saying that SqueakSource
> is running on port 8888, as well as a pinnable morph for controlling the
> RFBServer (for VNC connections).
> 
> Pin the RFB control morph so that it stays active. If you close it by
> accident, do "RFBServer menu openInWorld" to get it back.
> 
> Save the image once and restart it to make sure the startup initialization
> is working.
> 
> You can now open a web browser on http://localhost:8888 to connect to
> the SqueakSource web interface. Only one account will be present in the
> repository, this is your administrative user with user name 'admin' and
> password 'password'. Changing that password (from the web interface) is
> a good idea.
> 
> The following will work only on Unix/Linux/OSX:
> 
> In the RFBServer menu, in the passwords menu, select "allow empty passwords"
> 
> In a terminal window (outside of Squeak), identify the pid of the Squeak VM
> process (pgrep -l squeak).
> 
> From the terminal, send a SIGUSR2 signal to the VM process. If the Squeak
> VM pid is 1234, then the command is "kill -SIGUSR2 1234".
> 
> Back in the Squeak image, you will see the VNC control change from
> "RFBServer (stopped)" to "RFBServer :1" to indicate that it is accepting
> VNC connections on display number 1. It will stay in this state for the
> next 60 seconds.
> 
> From a VNC client program running on the local machine, connect to
> localhost:1, and you should have an active connection to the Squeak image.
> 
> If you want to run your SqueakSource image on another server, run the
> VM with -vm-display-null and use ssh port forwarding if needed to access
> the VNC ports.
> 
> For example, I have a unix account on the server that hosts squeaksource.com.
> When I want to open the running SqueakSource image through VNC, I first
> log in to the Linux server with a command like this (except that 10.1.2.3
> is not the real address that we are using).
> 
> $ ssh -L8888:localhost:8888 -L5900:localhost:5900 -L5901:localhost:5901 10.1.2.3
> 
> Once logged in, I locate the Squeak VM process and send SIGUSR2 to it. I keep
> the login session open to handle the port forwarding while I use VNC.
> 
> Then back on my local computer, I open a VNC connection to localhost:1 to
> get a connection to the running image. This step needs to be done within 60
> seconds of the SIGUSR2, after than no further connections will be accepted.
> 
> I used to use a VNC password (settable from the RFBServer menu) but I decided
> that it was too much hassle given the 60 second connection enablement window,
> which can only be started by someone with login access to the server and
> sufficient privilege to send signals to the VM process.
> 
> If you want to copy any of these ideas for use in some other Squeak server
> application, the interesting bits are in class SSImageInit, especially
> SSImageInit class>>enableFRBServerOnSigUsr2.
> 
> I should note that RFBServer is written by Ian Piumarta. I don't recall
> where it was originally hosted, but a copy of RFB-ikp.8.mcz is in our
> source.squeak.org/ss repository, along with later updates that are currently
> in use for SqueakSource.
> 
> Dave
> 
> 


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Do files get embarrassed when they get unzipped?




More information about the Squeak-dev mailing list