I've worked-up something similar to this, using dj berstein's 'svscan'
utilities. It works great, for keeping xemacs running (it's almost
like a user-level 'init'), and for automatically bringing it back up
when it crashes. I hadn't used Xvfb yet, but it could be useful for
this.
My little hack only works when running gnuclient under XFree.
Here's the command i use to launch gnuserv, with the svscan 'run'
script, when starting it under xfree86 (with a valid $DISPLAY available)
exec xemacs -unampped -f gnuserv-start
This doesn't work when starting it under a plain linux console, using
the same command, running under 'svscan' (not in an interactive shell).
When trying to do so, i get this message:
"standard input is not a tty"
I wasn't sure what to do to get xemacs to not worry about it, to
not map an initial frame, and to just sit there and wait for
gnuclient connections.
Hope this helps someone,
--
sean
schamp(a)users.sourceforge.net
On Mon, Feb 24, 2003 at 02:01:43AM -0500
Content-Description: forwarded message
Subject: XEmacs running as a gnuserv daemon.
From: Aidan Kehoe <kehoea(a)parhasard.net>
To: XEmacs Beta List <xemacs-beta(a)xemacs.org>
Date: Fri, 14 Feb 2003 10:01:18 +0000 (GMT)
Reply-To: Aidan Kehoe <kehoea(a)parhasard.net>
Hi,
Umm, I considered sending this to xemacs-design, but on reflection,
it's probably not something that needs huge changes. I'd like to be
able to run an XEmacs process, with an associated GNUserv, as a
daemon, not necessarily with any open frames. Currently, to achieve
something like the following, I do this, where `daemon' does what the
corresponding 4.4BSD library function does, and Xvfb launches a "fake"
Xserver;
$ daemon Xvfb -screen 0 50x50x1 :30
$ echo '(setq inhibit-startup-message t)' >> ~/.xemacs/init.el
$ DISPLAY=:30 daemon xemacs
wait til I see gnuserv in the process list, and connect to it using
gnuclient. Then, when my network connection goes down, I can
reconnect, and go back to what I was doing with minimal hassle.
What would be needed to be done to support this? I suppose a "-daemon"
option, with a warning in the docs that the process will exit if
gnuserv-start isn't specified in the init file, or using -f .
Thanks,
Aidan Kehoe
--
"I have heard the swelling cry of the English speaking peoples of the
world, and it tells me their cause is served best by flaming the few
complacent asses on usenet." -- T. Samant, 29 June 1997