[PC-BSD Commits] r21655 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Tue Feb 26 12:58:51 PST 2013
Author: kenmoore
Date: 2013-02-26 20:58:50 +0000 (Tue, 26 Feb 2013)
New Revision: 21655
Modified:
pcbsd-projects/PCDM/PCDMd
pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Get the new PCDM daemon working for non-XDMCP systems, and some initial testing with the XDMCP support
Modified: pcbsd-projects/PCDM/PCDMd
===================================================================
--- pcbsd-projects/PCDM/PCDMd 2013-02-26 19:49:47 UTC (rev 21654)
+++ pcbsd-projects/PCDM/PCDMd 2013-02-26 20:58:50 UTC (rev 21655)
@@ -7,12 +7,29 @@
}
-#Start the X server with XDMCP enabled (if setup that way)
+#See if XDMCP support is enabled for logging in to this system
+if [ "`cat /usr/local/share/PCDM/pcdm.conf | grep ALLOW_REMOTE_LOGIN=TRUE`" -eq "" ]; then
+ # XDMCP is enabled
+ xinit -- /usr/local/bin/PCDM-session :0 -displayfd /usr/local/share/PCDM/.xdisplay -indirect ${HOST}
+elif
+ # No XDMCP support
+ # Allow Auto-Login the first time PCDM starts
+ pcdm_ret = xinit /usr/local/bin/PCDM-session -AutoLogin -- :0
+ xinit /usr/local/bin/PCDM-session -AutoLogin -- :0
+ while [ ret -eq 0 ]; do
+ # Always return to PCDM after a logout (prevent root shell opening)
+ ret = xinit /usr/local/bin/PCDM-session -- :0
+ done
-# Allow Auto-Login the first time PCDM starts
-xinit /usr/local/bin/PCDM-session -AutoLogin -- :0
-while [ 1 ]; do
- # Always return to PCDM after a logout (prevent root shell opening)
- xinit /usr/local/bin/PCDM-session -- :0
-done
+ if [ ret -eq 1 ]; then
+ #Restart the computer
+ shutdown -r now
+ elif [ ret -eq 2 ]; then
+ #Shutdown the computer
+ shutdown -p now
+ fi
+
+
+fi
+
Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-26 19:49:47 UTC (rev 21654)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp 2013-02-26 20:58:50 UTC (rev 21655)
@@ -261,7 +261,7 @@
if(ret == QMessageBox::Yes){
Backend::log("PCDM: Shutting down computer");
- system("shutdown -p now");
+ //system("shutdown -p now");
QCoreApplication::exit(2);
close();
}
@@ -278,7 +278,7 @@
if(ret == QMessageBox::Yes){
Backend::log("PCDM: Restarting computer");
- system("shutdown -r now");
+ //system("shutdown -r now");
QCoreApplication::exit(1);
close();
}
More information about the Commits
mailing list