<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2871&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Create new service from systemd x11vnc.service]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2871</link>
		<description><![CDATA[The most recent posts in Create new service from systemd x11vnc.service.]]></description>
		<lastBuildDate>Mon, 27 May 2019 22:06:02 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Create new service from systemd x11vnc.service]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=16261#p16261</link>
			<description><![CDATA[<p>Thanks, GNUser,</p><p>Your script was very usefull.<br />A few adaptations needed like use of Define LSB log_* functions, or start-stop-daemon function.<br />I created my own x11vnc.sh script to invoke /usr/bin/x11vnc with adequate parameters and shell background invocation.</p><p>I do use x11vnc because this indirection allows me to display the same screen I have on my desktop on the smart tv screen without smart tv screen definition restriction (I have a very large smart tv so this solution enables a partially visual disabled user to develop on devuan.</p><p>If someone needs more explaination on how to use this x11vnc scripts, please ask on this forum.</p><p>Best regards,<br />ea4170@0c5</p>]]></description>
			<author><![CDATA[dummy@example.com (ea4170@0c5)]]></author>
			<pubDate>Mon, 27 May 2019 22:06:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=16261#p16261</guid>
		</item>
		<item>
			<title><![CDATA[Re: Create new service from systemd x11vnc.service]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=16232#p16232</link>
			<description><![CDATA[<p>Hi, ea4170. I did some copy and pasting and came up with this. It is untested, but something to get you started:</p><div class="codebox"><pre><code>#!/bin/sh
### BEGIN INIT INFO
# Provides:		x11vnc
# Required-Start:
# Required-Stop:
# Should-Start:	     
# Should-Stop:       
# X-Start-After:	lightdm
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6		
# Short-Description:	VNC Server for X11
# Description:		VNC Server for X11 
### END INIT INFO

case &quot;$1&quot; in
  start)
	while true; do
		/usr/bin/x11vnc -xkb -repeat -allow 127.0.0.1 -display :0 -auth guess -rfbauth /etc/X11/x11vnc.passwd -rfbport 5900 -forever -loop -o /var/log/x11vnc.log
	done
	;;
  stop)
	pkill x11vnc
	sleep 1
	pkill -KILL x11vnc
	;;
esac

exit 0</code></pre></div><p>To test it:<br />1. Replace lightdm if appropriate (run <span class="bbc"># service --status-all</span> or <span class="bbc">$ ls /etc/init.d</span> to find the name of your display manager service)<br />2. Name the above script x11vnc, put it in /etc/init.d/, and make it executable<br />3. <span class="bbc"># update-rc.d x11vnc defaults</span></p><p>Good luck. Let me know how it goes.</p><p>P.S. I haven&#039;t used any vnc applications in a long time. If <span class="bbc">-forever -loop</span> already gives you automatic restarting, delete the <span class="bbc">while true; do</span> and <span class="bbc">done</span> lines from my script.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 24 May 2019 13:53:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=16232#p16232</guid>
		</item>
		<item>
			<title><![CDATA[Create new service from systemd x11vnc.service]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=16224#p16224</link>
			<description><![CDATA[<p>Hello folks,</p><p>I use x11vnc on devuan.<br />I can manually launch x11vnc and then connect from another computer to the devuan computer.<br />But when I exit the connection, the x11vnc terminates.<br />Then I found debian users creating a <strong>service</strong> configuration file for automatic restarting the x11vnc program after exiting, and automatic start when booting.<br />I would like to adapt this &quot;x11vnc.service&quot; for devuan but I did not find how to do this on Dev1 Galaxy.<br />Please tell me how to adapt the following x11vnc.service (systemd syntax)</p><div class="codebox"><pre><code>[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=display-manager.service
BindsTo=display-manager.service
PartOf=display-manager.service

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -xkb -repeat -allow 127.0.0.1 -display :0 -auth guess -rfbauth /etc/X11/x11vnc.passwd -rfbport 5900 -forever -loop -o /var/log/x11vnc.log
Restart=on-failure
RestartSec=10</code></pre></div><p>This topic can be generalized to any new service needing portability from systemd or any system service manager.</p><p>Best regards,<br />from ea4170@0c5</p>]]></description>
			<author><![CDATA[dummy@example.com (ea4170@0c5)]]></author>
			<pubDate>Thu, 23 May 2019 21:19:23 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=16224#p16224</guid>
		</item>
	</channel>
</rss>
