Changeset d0d990c


Ignore:
Timestamp:
07/12/13 11:52:25 (17 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
9de63e4b
Parents:
ccb464d
Message:

Add remote desktop support to PCDM via VNC. This will allow users
to enable VNC support and remote into their desktop system.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • build-files/ports-overlay/misc/pcbsd-base/Makefile

    r758e0db rd0d990c  
    125125                virtualbox-ose-kmod>=0:${PORTSDIR}/emulators/virtualbox-ose-kmod \ 
    126126                virtualbox-ose-additions>=0:${PORTSDIR}/emulators/virtualbox-ose-additions \ 
     127                x11vnc>=0:${PORTSDIR}/net/x11vnc \ 
    127128                grub-mkconfig:${PORTSDIR}/sysutils/grub2 
    128129 
  • src-qt4/PCDM/PCDMd

    r1cb19a8 rd0d990c  
    66PCDMCONF="/usr/local/etc/pcdm.conf" 
    77 
    8 #See if XDMCP support is enabled for logging in to this system 
    9 XDMCP=`grep "^ALLOW_REMOTE_LOGIN=" ${PCDMCONF} 2>/dev/null | cut -d '=' -f 2` 
    10 if [ "$XDMCP" = "TRUE" ]; then 
    11   # XDMCP is enabled 
    12   echo "Starting PCDM XDMCP Server" 
    13   while [ ! -e /var/run/nologin ]; do 
    14     xinit /usr/local/bin/PCDM-session --once -- /usr/local/bin/X :0 -displayfd /usr/local/share/PCDM/.xdisplay -indirect ${HOST} 
    15   done 
    16 else 
    17   # No XDMCP Enabled 
     8#See if VNC support is enabled for logging in to this system 
     9grep -q "^ALLOW_REMOTE_LOGIN=TRUE" ${PCDMCONF} 
     10if [ $? -eq 0 ]; then 
     11   # Setup default vnc server opts 
     12   vncopts="-forever " 
     13   grep -q "^REMOTE_SHARED_SCREEN=TRUE" ${PCDMCONF} 
     14   if [ $? -eq 0 ] ; then  
     15     vncopts="-shared " 
     16   else 
     17     vncopts="-nevershared " 
     18   fi 
     19   if [ -e "/usr/local/etc/vncpass" ] ; then 
     20     vnccmd="x11vnc -display :0 $vncopts -passwdfile /usr/local/etc/vncpass" 
     21   else 
     22     echo "WARNING: VNC enabled but no password in /usr/local/etc/vncpass!" 
     23     sleep 5 
     24   fi 
    1825 
    19   # Allow Auto-Login the first time PCDM starts 
    20   touch /tmp/.PCDMAutoLogin 
    21   # Now start the X Server 
    22   while [ ! -e /var/run/nologin ]; do 
    23     /usr/local/bin/pc-checkxdisplay 
    24     xinit /usr/local/bin/PCDM-session --once -- :0   
    25   done 
    2626fi 
    27          
     27 
     28 
     29# Allow Auto-Login the first time PCDM starts 
     30touch /tmp/.PCDMAutoLogin 
     31# Now start the X Server 
     32while [ ! -e /var/run/nologin ]; do 
     33  /usr/local/bin/pc-checkxdisplay 
     34 
     35  if [ -n "$vnccmd" ] ; then 
     36    # Start VNC 
     37    (sleep 10 ; $vnccmd >/var/log/vncserver 2>/var/log/vncserver) & 
     38  fi 
     39 
     40  xinit /usr/local/bin/PCDM-session --once -- :0   
     41done 
  • src-qt4/PCDM/pcdm.conf

    red87765 rd0d990c  
    1818AUTO_LOGIN_PASSWORD=no-password 
    1919 
    20 ## XDMCP SUPPORT ## 
     20## VNC Remote Desktop SUPPORT ## 
    2121## This presents a security risk - use carefully! ## 
    2222ALLOW_REMOTE_LOGIN=FALSE 
     23 
     24## Share the remote screen ## 
     25REMOTE_SHARED_SCREEN=FALSE 
    2326 
    2427## ADDITIONAL SETTINGS ## 
Note: See TracChangeset for help on using the changeset viewer.