[squeak-dev] How to shutdown Raspbian from within Squeak?

David T. Lewis lewis at mail.msen.com
Thu Mar 9 01:17:06 UTC 2017


On Wed, Mar 08, 2017 at 07:33:18PM -0500, David T. Lewis wrote:
> On Wed, Mar 08, 2017 at 04:23:45PM -0800, tim Rowledge wrote:
> > 
> > > On 08-03-2017, at 4:07 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> > > 
> > > 
> > > Having said that, I suspect that the reboot is going to be tricky.
> > > The sudo command is designed for security, and it is smart enough not
> > > to let the password input come from some arbitrary input stream such as
> > > the one connected to your Squeak image. I'll try tinkering around with
> > > it a bit, but I'm afraid this may not be not as simple as you might expect.
> > Actually on a Pi ???sudo??? is normally password-free, wjich is probably enough to make some people???s heads explode, but there y???are.
> >
> 
> Yes, on raspbian it will probably work. The tricky bit is that if you do
> need to enter a password, sudo will read the password from the controlling
> terminal the Squeak VM process, represented by /dev/tty. That more or less
> equates to your keyboard. There is no easy way for Squeak to insert a keyboard
> wedge to supply the password keystrokes, which of course is exactly what
> was intended from a security point of view.
>

Actually, that reminds me - and I want to mention it now before I forget about
it yet again - I think that the sudo password input issue might be effectively
handled with the unix pseudo terminal interface (man 7 pty). Ian Piumarta made
a plugin for this along with his really quite amazingly good telnet terminal
emulator.

That stuff, along with other things such as the VNC server, is still available here:

  http://squeakvm.org/unix/goodies.html

I also recall Ian asking me a long time ago why I didn't add pty support to
the OSProcess plugin, which was a very good question, and I probably should have
paid attention to it.

Dave
 


More information about the Squeak-dev mailing list