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
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@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@rowledge.org; http://www.rowledge.org/tim Do files get embarrassed when they get unzipped?
On Sat, Dec 03, 2022 at 01:42:43PM -0800, tim Rowledge wrote:
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.
I have been using vinagre as my VNC client for quite a few years, and it works fine for me. But according to the all-knowing internet, vinagre is now "discontinued" (https://en.wikipedia.org/wiki/Vinagre) so I don't know what to recommend for a modern Linux VNC client.
Dave
Hi,
for all my RasPis nowadays I'm tunnelling TigerVNV through Putty. TigerVNC is the successor of TightVNC, but both can be found via the 'add software'. RealVNC was said to eat too many resources (Raspi A+, 2013)
Somewhere I once read that RFB only supports 8 character passwords which I didn't find safe enough for a public Linux server. But I always only connect to one of the RasPis at a time so I can always use the same port.
Back when running a public AidaWeb server I used the Squeak RFBserver also tunnelled through Putty. But that had enough power.
The same setup works on my Linux and on my Windows laptop.
Cheers,
Herbert
Am 04.12.2022 um 04:19 schrieb David T. Lewis:
On Sat, Dec 03, 2022 at 01:42:43PM -0800, tim Rowledge wrote:
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.
I have been using vinagre as my VNC client for quite a few years, and it works fine for me. But according to the all-knowing internet, vinagre is now "discontinued" (https://en.wikipedia.org/wiki/Vinagre) so I don't know what to recommend for a modern Linux VNC client.
Dave
Thanks a lot, everyone, for documenting this method on the list! I really wish I would have known that earlier - for my TelegramBot, I always used to ssh -X to my raspi and then kill and restart the image. RFBServer sounds so much more convenient!
Maybe we should also put this into a Swiki.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2022-12-04T10:42:00+01:00, herbertkoenig@gmx.net wrote:
Hi,
for all my RasPis nowadays I'm tunnelling TigerVNV through Putty. TigerVNC is the successor of TightVNC, but both can be found via the 'add software'. RealVNC was said to eat too many resources (Raspi A+, 2013)
Somewhere I once read that RFB only supports 8 character passwords which I didn't find safe enough for a public Linux server. But I always only connect to one of the RasPis at a time so I can always use the same port.
Back when running a public AidaWeb server I used the Squeak RFBserver also tunnelled through Putty. But that had enough power.
The same setup works on my Linux and on my Windows laptop.
Cheers,
Herbert
Am 04.12.2022 um 04:19 schrieb David T. Lewis:
On Sat, Dec 03, 2022 at 01:42:43PM -0800, tim Rowledge wrote:
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.
I have been using vinagre as my VNC client for quite a few years, and it works fine for me. But according to the all-knowing internet, vinagre is now "discontinued" (https://en.wikipedia.org/wiki/Vinagre) so I don't know what to recommend for a modern Linux VNC client.
Dave
We also have some improvements from then-time on https://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/RFB -t
On 4. Dec 2022, at 16:26, christoph.thiede@student.hpi.uni-potsdam.de wrote:
Thanks a lot, everyone, for documenting this method on the list! I really wish I would have known that earlier - for my TelegramBot, I always used to ssh -X to my raspi and then kill and restart the image. RFBServer sounds so much more convenient!
Maybe we should also put this into a Swiki.
Best, Christoph
Sent from Squeak Inbox Talk
On 2022-12-04T10:42:00+01:00, herbertkoenig@gmx.net wrote:
Hi,
for all my RasPis nowadays I'm tunnelling TigerVNV through Putty. TigerVNC is the successor of TightVNC, but both can be found via the 'add software'. RealVNC was said to eat too many resources (Raspi A+, 2013)
Somewhere I once read that RFB only supports 8 character passwords which I didn't find safe enough for a public Linux server. But I always only connect to one of the RasPis at a time so I can always use the same port.
Back when running a public AidaWeb server I used the Squeak RFBserver also tunnelled through Putty. But that had enough power.
The same setup works on my Linux and on my Windows laptop.
Cheers,
Herbert
Am 04.12.2022 um 04:19 schrieb David T. Lewis:
On Sat, Dec 03, 2022 at 01:42:43PM -0800, tim Rowledge wrote:
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.
I have been using vinagre as my VNC client for quite a few years, and it works fine for me. But according to the all-knowing internet, vinagre is now "discontinued" (https://en.wikipedia.org/wiki/Vinagre) so I don't know what to recommend for a modern Linux VNC client.
Dave
On 2022-12-04, at 7:26 AM, christoph.thiede@student.hpi.uni-potsdam.de christoph.thiede@student.hpi.uni-potsdam.de wrote:
Thanks a lot, everyone, for documenting this method on the list! I really wish I would have known that earlier - for my TelegramBot, I always used to ssh -X to my raspi and then kill and restart the image. RFBServer sounds so much more convenient!
Maybe we should also put this into a Swiki.
See (and update!) http://wiki.squeak.org/squeak/834
The version Tobias mentioned is pretty old and has a lot of changes from the current version in the squeaksource repository. It would need somebody that has some recollection of what was done to tease out which items might be suitable improvements today. It's probably a good idea to feed everything back into the standalone package on squeaksource and SM too.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- IQ = dx / (1 + dx), where x = age.
On 2022-12-04, at 1:42 AM, Herbert König herbertkoenig@gmx.net wrote:
for all my RasPis nowadays I'm tunnelling TigerVNV through Putty. TigerVNC is the successor of TightVNC, but both can be found via the 'add software'. RealVNC was said to eat too many resources (Raspi A+, 2013)
Hmm, interesting. I just use the RealVNC provided in the standard Raspberry Pi OS distributions, with no problems - including on the ancient Pi A+ that lives in the roof of my workshop to run the weather sensors. I *did* have to use TigerVNC on my xubuntu box though because the tightvnc simply wouldn't work for me.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim There can never be a computer language in which you cannot write a bad program.
Oh. I thought you said you had upgraded squeaksource.com to utilize the new source.squeak.org/ss code, Personal SqueakSource. Is that not the case?
That code tackles this use-case from a 100% headless approach (no Morphs involved) by simply putting a "Smalltalk mitigateIfHeadless" as the first line within the Smalltalk run: [] block.
Smalltalk run: [ Smalltalk mitigateIfHeadless. ... ]
Here's that method: ____ mitigateIfHeadless self isHeadless ifTrue: [ self headlessMitigation ] ____ headlessMitigation "If I'm headless and RFB is present, start an RFBServer on port identified by rfbPort." (Smalltalk classNamed: #RFBServer) ifNotNil: [ : rfbServer | rfbServer allowRemoteConnections: false ; "<--- check this out" allowEmptyPasswords: true ; setFullPassword: nil ; setViewPassword: nil ; start: (self rfbPort ifNil: [ 5900 ])-5900 ]
By allowing only local connections (which is what Dave's ssh tunnel accomplishes -- even when the server is remote), the port is able to be left open all the time, so there's no need to signal the process, and no need to leave the server exposed even for 1 minute.
As you can see, this also allows multiple images on the same server to use different RFB ports / screens, instead of only 5901 / :1, by way of an "rfbPort" file.
A lot of work went into making Personal SqueakSource the most-thought-out, most-documented[1], easiest-to-setup, most-maintained and bug-free version of SqueakSource available. All the fixes and workspace scripts from the old squeaksource.com image were incorporated long ago. I thought you had already switched over to it, Dave. I believe community collaboration on a unified (vs. forked) code base for our SCM tool is beneficial. Personal SqueakSource is also the only one able to provide class and method-level revision history for one's own private code.
- Chris
[1] -- https://wiki.squeak.org/squeak/6365
On Sat, Dec 3, 2022 at 3:03 PM David T. Lewis lewis@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
- 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
Hi Chris,
On Sat, Dec 03, 2022 at 05:29:12PM -0600, Chris Muller wrote:
Oh. I thought you said you had upgraded squeaksource.com to utilize the new source.squeak.org/ss code, Personal SqueakSource. Is that not the case?
I think I said that it was now using the same SqueakSource package source, which I believe was somewhere around SqueakSource-dtl.1145 at that time. But I have to apologize and retract that.
The squeaksource.com image is running on SqueakSource.sscom-dtl.1138 right now. I apologize because I think I sent you an mail saying that I had switched to your package version, but apparently I didn't actually get around to doing that on the server. I looked at this again a couple of days ago so that I would respond to Tim's question about VNC and I realize that although we did merge the code, I never did actually activate the final version on squeaksource.com.
Unfortunately this turns out to be a good thing, because although the merged version runs fine, it does not seem to work properly when restarting a saved image.
If you would like to take a look at it that would be great. Install update.sscom-dtl.5.mcm in a clean image and work from there. You should be able to save the image, restart it, and everything should still keep working. Then try loading whichever package version you are using in the source.squeak.org image and see if it still works. There should be no errors or debuggers opening when you restart the saved image.
Dave
Hi Dave,
I think I sent you an mail saying that
I had switched to your package version, but apparently I didn't actually get around to doing that on the server.
No worries, my main question was about whether you had "changed your mind" about /ss.
I looked at this again a couple of days ago so that I would respond to Tim's question about VNC and I realize that although we did merge the code, I never did actually activate the final version on squeaksource.com.
Unfortunately this turns out to be a good thing, because although the merged version runs fine, it does not seem to work properly when restarting a saved image.
If you would like to take a look at it that would be great. Install update.sscom-dtl.5.mcm in a clean image and work from there. You should be able to save the image, restart it, and everything should still keep working. Then try loading whichever package version you are using in the source.squeak.org image and see if it still works. There should be no errors or debuggers opening when you restart the saved image.
The /ss code relies 100% on its code versioned in MC packages, and has zero dependence on image state. This was the #1 primary design goal in the 2011 upgrade. Loading the /ss code on top of the sscom-dtl code was never tested or expected to work. Instead, the initial image should be saved ONLY with the Personal SqueakSource code loaded, and NO servers started (RFB or web).
Then, the command-line to start the server should simply specify to use SSImagePersistence in the run.st script, like this: ____ Smalltalk run: [ : webPort | MCHttpRepository clearCredentials. Smalltalk mitigateIfHeadless. webPort ifNotNil: [ SSRepository port: webPort asInteger ]. (FileDirectory default fileExists: 'logo.jpg') ifTrue: [ SSFrame makeLogo: (FileDirectory default fullNameFor: 'logo.jpg') ]. SSRepository storage: SSImagePersistence new ; startServer: true ] ____
SSImagePersistence uses a Promise and ensures the image is saved with the server and domain and safely restartable. I tested with a full copy of squeaksource.com several years ago.
For extra safety, we might consider using a SSCompositeStorage composed of an SSImagePersistence and a SSFilesystem, so we have data.obj files as backups in case the image saves corrupted.
I'm happy to support getting this up and running as specified above, but I don't want to experiment with mixing the /ss code with the sscom-dtl code. I'd rather see the sscom-dtl code integrated into the /ss code, and the community coalesce on a single bespoke server codebase suitable for both instances.
Regards, Chris
Hi Dave,
Thanks for providing the instructions. I just tried them on Squeak6.1alpha-22300-64bit on macOS 12.6.1.
When loading update.sscom-dtl.5.mcm two modal dialogs are shown:
I entered admin and password. Then I get this:
Any idea what I might be missing?
Cheers, Bernhard
Am 03.12.2022 um 22:03 schrieb David T. Lewis lewis@mail.msen.com:
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
Hi Bernhard,
The two dialogs for entering user name and password are for the demonstration application that comes with the Seaside distribution. You can enter anything you like for these, I usually just enter 'admin' and 'password' to get through the dialogs.
The third dialog concerning 'data.obj does not exist' is something that I do not recognize. I don't see it on Linux so I am guessing that it may be related to the operating system. I don't have a Mac, but maybe someone else could try it to confirm?
I'm afraid that there is a fair amount of Linux-specific stuff that has crept into the the SqueakSource code base over time. Most likely there is something in the SqueakSource initialization code is trying to find a serialized copy of the repository, but I can't say why you are hitting that code path on macOS.
Dave
On Sun, Dec 04, 2022 at 07:36:57PM +0000, Bernhard Pieber wrote:
Hi Dave,
Thanks for providing the instructions. I just tried them on Squeak6.1alpha-22300-64bit on macOS 12.6.1.
When loading update.sscom-dtl.5.mcm two modal dialogs are shown:
I entered admin and password. Then I get this:
Any idea what I might be missing?
Cheers, Bernhard
Am 03.12.2022 um 22:03 schrieb David T. Lewis lewis@mail.msen.com:
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
squeak-dev@lists.squeakfoundation.org