[plt-scheme] headless mred on OS X? Or, way to decode (lib"read.ss""wxme") reader in mz?
On Sep 26, John Clements wrote:
>
> On Sep 26, 2007, at 1:23 PM, Eli Barzilay wrote:
>
> > On Sep 26, John Clements wrote:
> >>
> >>> (read (open-input-file "foo.scm"))
> >> foo.scm::1324: read: illegal use of "."
> >
> > Right -- IIRC, Matthew made it do something similar to the
> > wxme-to-text hack I wrote, and just read graphical objects as
> > "."s. This means that you could probably use mzscheme to run the
> > server, but only if you don't do any graphical stuff. (I need to
> > look into making it easier to use it with mzscheme.)
>
> Give me another breadcrumb; you seem to be suggesting that the read
> method of the wxme reader is already doing the right thing by
> parsing a graphical thing as a ".", but I'm not sure how to avoid
> the read error given above.
Well, I was only guessing here, since I didn't get to play with the new
wxme reader from mzscheme. My guess was that the reader is doing the
simple thing and grabs the textual representation of all snips, which
makes it see a "." where the input has an image. But I just tried it
and that's not the case, so I don't know what the problem was.
> >> 4) I can't run mred as a cron job, or (more specifically) any time
> >> that I'm not logged in.
> >
> > Besides what I'm going to say below, this sounds wrong. Why would you
> > run this in a cron job? The handin server is designed to check
> > submissions as they come in, not off-line in some cron job.
>
> Forgive me; of course, I'm running it as a daemon. My reference to a
> cron job occurs because the easiest way for me to test whether these
> things work is to set up a cron job on another account, log out, and
> then see whether it worked.
The whole point of running submissions in a sandbox is that you don't
need to create another account... (In any case, running things
through a cron job is likely to get you into more trouble.)
> > I'm not sure about what you're trying to do because of that cron
> > job remark, but the usual thing that I do, given that mred cannot
> > run without a display even if it doesn't actually do any GUI, is
> > run it in a VNC session. This way there is no problems running
> > mred.
>
> So, you have a VNC connection to a machine that ... has an X server
> running? Where you're logged in? Both of the above? My ignorance
> of the X Windows world is currently woefully complete.
(I keep forgetting that you Mac/Windows users have almost a hard-wired
view of a single-session per user...)
VNC servers can come in two flavors -- one is what you get on Windows
(and I can only assume the same on OSX if there is a VNC server for
Macs): the VNC server makes it possible to interact with your desktop
remotely. This means that using a viewer basically shows you the
screen, moves the local mouse pointer, and creates fake keyboard
events. (This is also available for some X setups, usually through
some hooks in the X server.)
The other mode, which is more common in linux (or at least *was* more
common, until the dumb-the-os-for-the-masses people started trying to
hammer it to behave like the above) is that you run a VNC server which
is its own X session. So you start it, then use a viewer to see the
session and run whatever in it -- and all that is independent from
what you actually have on your desktop. You can even kill your
desktop, or you can even start a server from a remote (X-less) ssh.
This has other advantages, like a persistent session (network problems
will disconnect the viewer, but things continue running inside as
usual).
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!