diff options
author | 2015-11-27 10:38:46 -0500 | |
---|---|---|
committer | 2015-11-27 17:20:46 +0000 | |
commit | eaf94805fbdfae94005b6798052091b40818eccb (patch) | |
tree | 59381981107c988a36cb0f17664cc0770b7dd6cc /x11-misc/x11vnc/files | |
parent | net-firewall/xtables-addons: version bump to 2.10 (diff) | |
download | gentoo-eaf94805fbdfae94005b6798052091b40818eccb.tar.gz gentoo-eaf94805fbdfae94005b6798052091b40818eccb.tar.bz2 gentoo-eaf94805fbdfae94005b6798052091b40818eccb.zip |
x11-misc/x11vnc: 0.9.14 bump, clean metadata.xml
Credit for init.d and conf.d script to:
Sal Gonzalez <sgonzalez@codejunkie.net>.
Package-Manager: portage-2.2.24
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'x11-misc/x11vnc/files')
-rw-r--r-- | x11-misc/x11vnc/files/x11vnc.conf.d | 37 | ||||
-rw-r--r-- | x11-misc/x11vnc/files/x11vnc.init.d | 70 |
2 files changed, 107 insertions, 0 deletions
diff --git a/x11-misc/x11vnc/files/x11vnc.conf.d b/x11-misc/x11vnc/files/x11vnc.conf.d new file mode 100644 index 000000000000..7df3a1317a97 --- /dev/null +++ b/x11-misc/x11vnc/files/x11vnc.conf.d @@ -0,0 +1,37 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Configuration for running x11vnc as a service. This allows VNC +# connections prior to logging in to the X display manager. + +# Password file location of the password file for VNC Connections +# Prior to first run, you must configure a password, to do so please +# run `x11vnc -storepasswd /etc/x11vnc.pass`. Replace /etc/x11vnc.pass +# ith the location you have specified below +#X11VNC_RFBAUTH="/etc/x11vnc.pass" + +# Port to listen on for incoming connections +#X11VNC_RFBPORT="5900" + +# Automatically probe for a free port to listen on for incoming connections +# starting from the port number specified +# Setting this will diable X11VNC_RFBPORT above +# See `man x11vnc`, option `-autoport` for more information +#X11VNC_AUTOPORT="" + +# X Display to attach to +# This should match the display your DM is running on +#X11VNC_DISPLAY=":0" + +# Location of the x11vnc logfile +#X11VNC_LOG="/var/log/x11vnc" + +# Miscelaneous options to pass to x11vnc. +# Do not set options that are configurable above. +# Check `x11vnc -help` or `man x11vnc` for more options. +# * Modern composting DMs/WMs will require "-noxdamage" +# * If you experience crashes on logging in, try "-noxfixes" +# * Other suggested options include "-noxrecord" and "-ncache ##" +# Refer to the x11vnc man page for further explanations. +#X11VNC_OPTS="" + diff --git a/x11-misc/x11vnc/files/x11vnc.init.d b/x11-misc/x11vnc/files/x11vnc.init.d new file mode 100644 index 000000000000..08968f032027 --- /dev/null +++ b/x11-misc/x11vnc/files/x11vnc.init.d @@ -0,0 +1,70 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="The x11vnc daemon init script" + +depend() { + need net + need xdm +} + +checkconfig() { + + # Set Defaults + X11VNC_RFBAUTH=${X11VNC_RFBAUTH:-/etc/x11vnc.pass} + X11VNC_RFBPORT=${X11VNC_RFBPORT:-5900} + X11VNC_DISPLAY=${X11VNC_DISPLAY:-:0} + X11VNC_LOG=${X11VNC_LOG:-/var/log/x11vnc} + + X11VNC_AUTH="/var/run/x11vnc-${X11VNC_DISPLAY}" + + if [ -n "${X11VNC_AUTOPORT}" ]; then + X11VNC_PORT="" + fi + + if [ ! -f "${X11VNC_RFBAUTH}" -o ! -s "${X11VNC_RFBAUTH}" ]; then + eerror "VNC Password not set, please set one by running: \`x11vnc -storepasswd ${X11VNC_RFBAUTH}\`" + return 1 + fi + checkpath -q -f -m 0600 -o root:root "${X11VNC_RFBAUTH}" + + # Attempt to find X-Auth file + if ! type xauth > /dev/null 2>&1 || + ! xauth -f /root/.Xauthority extract - "${X11VNC_DISPLAY}" > "${X11VNC_AUTH}" 2>/dev/null || + [ ! -s "${X11VNC_AUTH}" ]; then + # Let x11vnc guess at auth + X11VNC_AUTH_OPTS="--env FD_XDM=1 -auth guess" + else + # We found the proper auth + X11VNC_AUTH_OPTS="-auth ${X11VNC_AUTH}" + fi + + if [ ! -f "${X11VNC_AUTH}" ]; then + eerror "Specified X-Authority file '${X11VNC_AUTH}' not found!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start \ + --exec /usr/bin/x11vnc -- \ + ${X11VNC_AUTH_OPTS} \ + -rfbauth ${X11VNC_RFBAUTH} \ + ${X11VNC_RFBPORT:+-rfbport} ${X11VNC_RFBPORT} \ + ${X11VNC_AUTOPORT:+-autoport} ${X11VNC_AUTOPORT} \ + -display ${X11VNC_DISPLAY} \ + -o ${X11VNC_LOG} \ + -bg -forever \ + ${X11VNC_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop /usr/bin/x11vnc + eend $? +} |