<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Apr 2, 2006, at 14.42, A JM wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P><B>Q-43:</B> <FONT color="#007f00"> How can I run <B>x11vnc</B> as a "service" that is always available? </FONT> </P><P>Is anyone using X11VNC to run a headless Mythbox?<BR></P></BLOCKQUOTE>You mean a back-end? ;) Actually, lots of us around here run Myth systems that are headless. However, the majority of us prefer to use command-line interactions over SSH instead. For the most part, this is kind of off-topic, and you might find more help looking up a mailing list for X11VNC, or checking out their help documentation, but I'll help with what little expertise I can offer.<BR><BLOCKQUOTE type="cite"><P> how do I get it to startup after reboot and without having to login as a user??</P></BLOCKQUOTE><DIV>I'm not sure you can. X11VNC requires a running instance of X11 to manipulate, which, in turn, requires a user to be logged in. Of course, if you'd like to avoid that mess, consider just straight VNC. But, that would also require a user to activate it.</DIV><BR><BLOCKQUOTE type="cite">This is from the website but I'm not fluid enough to understand how to implement it? any would be appreciated. <BR><BR>Thanks,<BR><P style="font-style: italic;"><BR></P><P style="font-style: italic;"> There are a number of ways to do this. The primary thing you need to decide is whether you want <B>x11vnc</B> to connect to the X session on the machine 1) regardless of who (or if anyone) has the X session, or 2) only if a certain user has the X session. Because X sessions are protected by X permissions (MIT-MAGIC-COOKIE files <CODE>XAUTHORITY</CODE> and <CODE>$HOME/.Xauthority</CODE>) the automatically started <B>x11vnc</B> will of course need to have sufficient permissions to connect to the X display. </P><P style="font-style: italic;"> Here are some ideas: </P><UL style="font-style: italic;"><LI>Use the description under "Continuously" in the         <A href="http://karlrunge.com/x11vnc/#display-manager-continuously">FAQ on <B>x11vnc</B> and Display Managers</A></LI><LI>Use the description in the         <A href="http://karlrunge.com/x11vnc/#faq-inetd">FAQ on <B>x11vnc</B> and <CODE>inetd(1)</CODE></A></LI><LI>Start <B>x11vnc</B> from your <CODE>$HOME/.xsession</CODE> (or         <CODE>$HOME/.xinitrc</CODE>)</LI></UL></BLOCKQUOTE>Go to the home directory of the user you plan to be using, and exit the .xinitrc file. It might also be known as .xsession</DIV><DIV>Insert the proper command to activate x11vnc. I'm no expert on .xsession files, but I'm sure you can find a straight forward guide somewhere on the net.<BR><BLOCKQUOTE type="cite"><UL style="font-style: italic;"><LI>Although less reliable, see the <A href="http://karlrunge.com/x11vnc/#x11vnc_loop">x11vnc_loop</A>         <CODE>rc.local</CODE> hack below. </LI></UL><SPAN style="font-style: italic;"> The display manager scheme will not be specific to which user has the X session unless a test is specifically put into the display startup script (often named </SPAN><CODE style="font-style: italic;">Xsetup</CODE><SPAN style="font-style: italic;">). The </SPAN><CODE style="font-style: italic;">inetd(1)</CODE><SPAN style="font-style: italic;"> scheme may or may not be specific to which user has the X session (and it may not be able to do all users via the </SPAN><CODE style="font-style: italic;">XAUTHORITY</CODE><SPAN style="font-style: italic;"> permission issues). </SPAN><P style="font-style: italic;"> The <CODE>$HOME/.xsession</CODE> scheme is obviously is specific to a particular user. If you do not know what a <CODE>$HOME/.xsession</CODE> script is or how to use one, perhaps your desktop has a "session startup commands" configuration option. The command to be run in the <CODE>.xsession</CODE> or <CODE>.xinitrc</CODE> file may look like this:<BR></P></BLOCKQUOTE>This basically says, if you don't know how to edit a .xsession file, see if your window manager (KDE, Gnome, Fluxbox, etc.) has a configuration option to run certain commands when you load up X11 (kinda like Windows "startup" items)<BR><BLOCKQUOTE type="cite"><P style="font-style: italic;"> </P><PRE style="font-style: italic;">x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg<BR></PRE></BLOCKQUOTE>That's an example command.<BR><BLOCKQUOTE type="cite"><PRE style="font-style: italic;"></PRE><SPAN style="font-style: italic;">plus any other options you desire.</SPAN></BLOCKQUOTE></DIV></BODY></HTML>