I'm trying to get multiple gnuserv processes running on the same machine
at different ports so that I can selectively connect to a specific one.
The high-level specific purpose is to enable me to connect to *the*
XEmacs that is already running GNUS, or *the* XEmacs that already has my
dissertation text loaded. I typically want to connect via a
non-windowed attachment from home, ssh'd in to the machine on which the
XEmacsen are running.
My attempt to make this work has been to set GNU_PORT to a distinguished
number before starting the XEmacs processes. Then I was hoping to be able
to use, e.g.,
gnuclient -p 21033
and
gnuclient -p 21035
to connect to two different XEmacsen with GNU_PORT set to 21033 and
21035 respectively.
From what I can gather, though, /tmp/gsrvUID/gsrv is used to initiate
the connection *unless* I give the -h option to specify the hostname --
that then forces using internet sockets (and the GNU-SECURE-1 or MIT
Magic Cookie authentication method). (The source code to gnuserv leads
me to believe that the unix domain socket name cannot be altered.)
Unfortunately, the -h option to gnuclient then requires that the -nw
option (non-windowing) is *not* given. This is unfortunate, since it's
far more convenient to not start a full new frame over a slow modem
connection.
To work around this difficulty, I've re-built my gnuclient.c to have
line 464's conditional always fail to not report an error:
if (suppress_windows_system && hostarg && 0 /*GJB:: added && 0
*/)
{
fprintf (stderr, "%s: Remote editing is available only on X\n",
progname);
exit (1);
}
I don't doubt that there is some problem with -nw editing w/o X11, but
here the fact that the hostarg is given really shouldn't imply that
remote editing is requested-- perhaps the host IPs should be compared,
instead.
I.e., I'm using the -h argument strictly to permit the ability to use
internet sockets instead of a unix domain socket. Another, more-direct,
possibility to fix this difficulty is to simply permit naming the
unix-domain socket to use. I'm not sure of the security implication (if
any) of this suggestion, but it seems likely that mangling the UID +
some user-specified number would be a nice way to provide this
capability in a fairly clean way.
I'd love to see a suitable change in the next versions of
gnuclient/gnuserv to better support multiple servers.
Thanks,
Greg J. Badros
gjb(a)cs.washington.edu
Seattle, WA USA
http://www.cs.washington.edu/homes/gjb