source: src-qt4/PCDM/PCDMd @ 9899f70

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since 9899f70 was 9899f70, checked in by Ken Moore <ken@…>, 13 months ago

Try a different syntax for turning on the SECURITY extension, since it looks like the "-x" flag is not recognized on FreeBSD

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#!/bin/sh
2# Login daemon for PCDM
3# This listens for system login prompts and starts the main PCDM UI appropriately
4#------------------------------------
5
6PCDMCONF="/usr/local/etc/pcdm.conf"
7PCDMAUTHFILE="/tmp/.PCDMAuth"
8
9XOPTS=""
10grep -q "^ENABLE_TCP_LISTEN=TRUE" ${PCDMCONF}
11if [ $? -ne 0 ]; then
12  XOPTS="-nolisten tcp" 
13fi
14
15#See if VNC support is enabled for logging in to this system
16grep -q "^ALLOW_REMOTE_LOGIN=TRUE" ${PCDMCONF}
17if [ $? -eq 0 ]; then
18   # Setup default vnc server opts
19   vncopts="-forever "
20   grep -q "^REMOTE_SHARED_SCREEN=TRUE" ${PCDMCONF}
21   if [ $? -eq 0 ] ; then
22     vncopts="-shared "
23   else
24     vncopts="-nevershared "
25   fi
26   if [ -e "/usr/local/etc/vncpass" ] ; then
27     vnccmd="x11vnc -display :0 $vncopts -passwdfile /usr/local/etc/vncpass"
28   else
29     echo "WARNING: VNC enabled but no password in /usr/local/etc/vncpass!"
30     sleep 5
31   fi
32
33fi
34
35
36# Allow Auto-Login the first time PCDM starts
37touch /tmp/.PCDMAutoLogin
38# Make sure the authorization file exists
39touch ${PCDMAUTHFILE}
40# Now start the X Server
41while [ ! -e /var/run/nologin ]; do
42  /usr/local/bin/pc-checkxdisplay
43
44  if [ -n "$vnccmd" ] ; then
45    # Start VNC
46    (sleep 10 ; $vnccmd >/var/log/vncserver 2>/var/log/vncserver) &
47  fi
48  xinit /usr/local/bin/PCDM-session --once -- :0 +extension SECURITY -auth ${PCDMAUTHFILE} $XOPTS
49done
Note: See TracBrowser for help on using the repository browser.