Группа :: Графические оболочки/KDE
Пакет: kdebase
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: kdm-3.3.0-wmsession.patch
--- kdebase-3.3.0/kdm/kfrontend/kgreeter.cpp.orig 2004-09-30 13:53:42 +0400
+++ kdebase-3.3.0/kdm/kfrontend/kgreeter.cpp 2004-09-30 19:14:13 +0400
@@ -442,6 +442,7 @@ KGreeter::putSession(const QString &type
void
KGreeter::insertSessions()
{
+#if 0
for (char **dit = _sessionsDirs; *dit; ++dit) {
QStringList ents = QDir( *dit ).entryList();
for (QStringList::ConstIterator it = ents.begin(); it != ents.end(); ++it)
@@ -460,6 +461,30 @@ KGreeter::insertSessions()
putSession( "custom", i18n("Custom"), false, "custom" );
putSession( "failsafe", i18n("Failsafe"), false, "failsafe" );
qBubbleSort( sessionTypes );
+#endif
+ char *sesslist = "/usr/X11R6/bin/runwm --list";
+ FILE *status = popen(sesslist, "r");
+ if (status)
+ {
+ while (!feof(status))
+ {
+ char tmp[256];
+ QString tmpSess;
+ fgets(tmp, 256, status);
+ tmpSess = QString::fromLatin1(tmp).stripWhiteSpace();
+ if( tmpSess == "default" )
+ putSession( "default", i18n("Default"), false, "default" );
+ else
+ putSession( tmpSess, tmpSess, false, "custom" );
+ }
+ }
+ else
+ {
+ putSession( "default", i18n("Default"), false, "default" );
+ }
+ pclose(status);
+ putSession( "failsafe", i18n("Failsafe"), false, "failsafe" );
+
for (uint i = 0; i < sessionTypes.size() && !sessionTypes[i].hid; i++) {
sessMenu->insertItem( sessionTypes[i].name, i );
switch (sessionTypes[i].prio) {
--- kdebase-3.3.0/kdm/backend/client.c.orig 2004-09-30 13:53:40 +0400
+++ kdebase-3.3.0/kdm/backend/client.c 2004-09-30 19:04:33 +0400
@@ -1471,6 +1471,7 @@ StartClient ()
GSendStr (desksess);
close (mstrtalk.pipe->wfd);
userEnviron = setEnv (userEnviron, "DESKTOP_SESSION", desksess);
+#if 0
for (i = 0; td->sessionsDirs[i]; i++) {
fname = 0;
if (StrApp (&fname, td->sessionsDirs[i], "/", desksess, ".desktop", (char *)0)) {
@@ -1491,6 +1492,8 @@ StartClient ()
sessargs = desksess;
else
sessargs = "";
+#endif
+ sessargs = desksess;
gotit:
if (!(argv = parseArgs ((char **)0, td->session)) ||
!(argv = addStrArr (argv, sessargs, -1)))