KDEsu
Go to the documentation of this file.
17 #include <QtCore/QString>
18 #include <QtCore/QStringList>
19 #include <QtCore/QBool>
20 #include <QtCore/Q_PID>
27 namespace KDESuPrivate {
29 class KCookie::KCookiePrivate
34 QByteArray m_DisplayAuth;
41 : d( new KCookiePrivate )
61 return d->m_DisplayAuth;
65 void KCookie::getXCookie()
68 d->m_Display = qgetenv(
"DISPLAY");
70 d->m_Display = qgetenv(
"QWS_DISPLAY");
72 if (d->m_Display.isEmpty())
77 #ifdef Q_WS_X11 // No need to mess with X Auth stuff
78 QByteArray disp = d->m_Display;
79 if (disp.startsWith(
"localhost:"))
83 proc.start(
"xauth",
QStringList() <<
"list" << disp);
84 if (!proc.waitForStarted())
89 proc.waitForReadyRead(100);
90 QByteArray
output = proc.readLine().simplified();
102 d->m_DisplayAuth = (lst[1] +
' ' + lst[2]);
103 proc.waitForFinished(100);
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Apr 16 2013 19:14:27 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.