Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:pcbsd/pcbsd

  • Loading branch information...
commit dd823efe930c5392ca69c3d5881903de68d1db62 2 parents 4779efc + 4e655ec
@kmoore134 kmoore134 authored
Showing with 4 additions and 1 deletion.
  1. +1 −1  src-qt4/PCDM/PCDMd
  2. +3 −0  src-qt4/PCDM/src/main.cpp
View
2  src-qt4/PCDM/PCDMd
@@ -43,6 +43,6 @@ while [ ! -e /var/run/nologin ]; do
# Start VNC
(sleep 10 ; $vnccmd >/var/log/vncserver 2>/var/log/vncserver) &
fi
-
+ setenv XAUTHORITY ${PCDMAUTHFILE}
xinit /usr/local/bin/PCDM-session --once -- :0 -auth ${PCDMAUTHFILE} $XOPTS
done
View
3  src-qt4/PCDM/src/main.cpp
@@ -172,6 +172,8 @@ int main(int argc, char *argv[])
while(neverquit){
if(runonce){ neverquit = FALSE; }
qDebug() << " -- PCDM Session Starting...";
+ system("xauth -f "+TMPAUTHFILE.toUtf8()+" generate :0 ."); //Using MIT-MAGIC-COOKIE-1 protocol
+ //MIT-MAGIC-COOKIE-1 is good enough for our purposes since it is a single-user graphical system with no XDMCP
int sid = -1;
int pid = fork();
if(pid < 0){
@@ -197,5 +199,6 @@ int main(int argc, char *argv[])
qDebug() << "-- PCDM Session Ended --";
if(QFile::exists("/var/run/nologin")){ neverquit = FALSE; }
}
+ system("xauth -f "+TMPAUTHFILE.toUtf8()+" remove :0");
return 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.