Permalink
Browse files

Move the xauth commands to when the xserver is not currently running …

…and see if this lets it work
  • Loading branch information...
1 parent ef8b856 commit d5549e0404303b87d5209401e164aa372b9659ef Ken Moore committed Oct 31, 2013
Showing with 4 additions and 2 deletions.
  1. +2 −0 src-qt4/PCDM/PCDMd
  2. +2 −2 src-qt4/PCDM/src/main.cpp
View
@@ -46,5 +46,7 @@ while [ ! -e /var/run/nologin ]; do
(sleep 10 ; $vnccmd >/var/log/vncserver 2>/var/log/vncserver) &
fi
setenv XAUTHORITY ${PCDMAUTHFILE}
+ xauth -f ${PCDMAUTHFILE} generate :0 .
xinit /usr/local/bin/PCDM-session --once -- :0 -auth ${PCDMAUTHFILE} $XOPTS
+ xauth -f ${PCDMAUTHFILE} remove :0
done
@@ -172,7 +172,7 @@ 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
+ //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();
@@ -199,6 +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");
+ //system("xauth -f "+TMPAUTHFILE.toUtf8()+" remove :0");
return 0;
}

0 comments on commit d5549e0

Please sign in to comment.