source: src-qt4/PCDM/PCDMd @ d4bc04b

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since d4bc04b was d4bc04b, checked in by Kris Moore <kris@…>, 18 months ago

Update PCDMd, add option to enable TCP listen, off by default

Also fix up main.cpp, make sure we set the screen resolution correctly, that
way we always come back to a full-screen widget

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