source: src-qt4/PCDM/PCDMd @ f5122ae

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

Add PCDM-xloop xinit script, allows us to run a single PCDM session and
not keep restarting X when we logout of a desktop.

Needs bugfixing, PCDM is broken when it comes to cleanup :-/

  • 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/sbin/PCDM-xloop -- :0 $XOPTS
47done
Note: See TracBrowser for help on using the repository browser.