Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 746227 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/net-misc/tigervnc/files/tigervnc.confd (-3 lines)
Lines 4-9 Link Here
4
# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space.
4
# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space.
5
# DISPLAYS="myuser:1"
5
# DISPLAYS="myuser:1"
6
6
7
# Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information.
8
# VNC_OPTS=""
9
(-)/usr/portage/net-misc/tigervnc/files/tigervnc.initd (-18 / +2 lines)
Lines 36-58 Link Here
36
	checkconfig start || return 1
36
	checkconfig start || return 1
37
	ebegin "Starting TigerVNC server"
37
	ebegin "Starting TigerVNC server"
38
	for user in $DISPLAYS; do
38
	for user in $DISPLAYS; do
39
		usrname=${user%%:*}
39
		vncsession ${user%%:*} :${user##*:}
40
		usropts=VNC_OPTS_${usrname}
41
		usrdisp=${user##*:}
42
		usrvar=$usropts"["$usrdisp"]"
43
		[ -z ${!usrvar} ] && vnc_opts=$VNC_OPTS || vnc_opts=${!usrvar}
44
45
		# A user may have an invalid shell, so we default to /bin/sh if its the case
46
		if [ -x /usr/bin/getent ] ; then
47
			usrshell=`getent passwd ${user%%:*} | cut -d: -f 7`
48
			case "$usrshell" in
49
				*/bash|*/ksh|*/sh|*/csh|*/tcsh) ;;          
50
				*) shell="-s /bin/sh" ;;
51
			esac
52
			echo $usrshell $shell
53
		fi
54
55
		su ${shell} ${user%%:*} -c "source /etc/profile && cd ~${user%%:*} && vncserver :${user##*:} $vnc_opts" &>/dev/null
56
	done
40
	done
57
	eend $?
41
	eend $?
58
}
42
}
Lines 61-67 Link Here
61
	checkconfig stop || return 2
45
	checkconfig stop || return 2
62
	ebegin "Stopping TigerVNC server"
46
	ebegin "Stopping TigerVNC server"
63
	for user in $DISPLAYS; do
47
	for user in $DISPLAYS; do
64
		su -s /bin/sh ${user%%:*} -c "vncserver -kill :${user##*:}" &>/dev/null
48
		start-stop-daemon --stop --pidfile /var/run/vncsession-:${user##*:}.pid
65
	done
49
	done
66
	eend $?
50
	eend $?
67
}
51
}

Return to bug 746227