Rich Freeman on 25 Jan 2012 11:54:39 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] run x11vnc at startup


On Wed, Jan 25, 2012 at 2:57 PM, sean finney <seanius@seanius.net> wrote:
> On Tue, Jan 24, 2012 at 11:03:57AM -0600, Ron Kaye Jr wrote:
>>  I have successfully installed x11vnc ...i want it to auto-start in future sessions
>
> It depends on what desktop environment / window manager you're using.
>

I'd echo the previous poster's suggestion to put something like this
in a sysvinit script.  It sounds to me like he wants this to run
whether he is logged in or not - x11vnc is useful even on a headless
server (though xdmcp would arguably work that way also - not that
anybody seems to use it these days).

The previous suggestion was to stick it in rc.local (or whatever your
distro calls it).  That would work, but if you care about it enough
I'd write up a script and put it in /etc/init.d/ or whatever and add
it to your default runlevel.  Then you can start and stop it easily.
Another option is to stick it in inittab and if it dies it will get
restarted automatically.  If you use an init.d script then monit is a
useful tool for propping up dying services.

It is hard to get into more detail than that since every distro uses
its own sysvinit system.  In theory initiatives like systemd are
looking to fix that, but right now only Fedora ships that by default
(it is an unsupported option on Gentoo - but works fine as far as I
can tell - might make for a good talk someday).  With something like
systemd you set up a unit file that is just a few lines and put it in
the appropriate folder and enable it as a service, and it will run at
boot.  Most other sysvinit systems use bash-based scripts to
initialize services/etc so they're a little more complex, but if you
copy something simple in /etc/init.d you'll probably find it easy to
tweak.

Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug