By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 404
Collapse All | Expand All

(-)kdebase-workspace-4.5.1.orig/kdm/backend/dm.c (+91 lines)
Lines 1340-1345 Link Here
1340
    return activeVTs;
1340
    return activeVTs;
1341
}
1341
}
1342
1342
1343
/* Return the active VT as an integer */
1344
int
1345
getActiveVT(void)
1346
{
1347
    int console_fd;
1348
    struct vt_stat console_state = { 0 };
1349
    console_fd = open ("/dev/tty0", O_RDONLY | O_NOCTTY);
1350
    if (console_fd < 0) {
1351
        goto out;
1352
    }
1353
    if (ioctl (console_fd, VT_GETSTATE, &console_state) < 0) {
1354
        goto out;
1355
    }
1356
    out:
1357
    if (console_fd >= 0) {
1358
        close (console_fd);
1359
    }
1360
    return console_state.v_active;
1361
}
1362
1363
static int
1364
plymouthIsRunning(void)
1365
{
1366
    int status;
1367
    status = system ("/bin/plymouth --ping");
1368
1369
    return WIFEXITED (status) && WEXITSTATUS (status) == 0;
1370
}
1371
1372
static int
1373
plymouthHasActiveVT(void)
1374
{
1375
    int status;
1376
    status = system ("/bin/plymouth --has-active-vt");
1377
1378
    return WIFEXITED (status) && WEXITSTATUS (status) == 0;
1379
}
1380
1381
static int
1382
plymouthPrepareForTransition(void)
1383
{
1384
    int status;
1385
    status = system ("/bin/plymouth deactivate");
1386
1387
    return WIFEXITED (status) && WEXITSTATUS (status) == 0;
1388
}
1389
1390
int
1391
plymouthQuitWithTransition(void)
1392
{
1393
    int status;
1394
    status = system ("/bin/plymouth quit --retain-splash");
1395
1396
    return WIFEXITED (status) && WEXITSTATUS (status) == 0;
1397
}
1398
1399
int
1400
plymouthQuitWithoutTransition(void)
1401
{
1402
    int status;
1403
    status = system ("/bin/plymouth quit");
1404
1405
    return WIFEXITED (status) && WEXITSTATUS (status) == 0;
1406
}
1407
1343
static void
1408
static void
1344
allocateVT(struct display *d)
1409
allocateVT(struct display *d)
1345
{
1410
{
Lines 1349-1354 Link Here
1349
    if ((d->displayType & d_location) == dLocal &&
1414
    if ((d->displayType & d_location) == dLocal &&
1350
        d->status == notRunning && !d->serverVT && d->reqSrvVT >= 0)
1415
        d->status == notRunning && !d->serverVT && d->reqSrvVT >= 0)
1351
    {
1416
    {
1417
        d->plymouthIsRunning = plymouthIsRunning();
1418
        if (d->plymouthIsRunning) {
1419
            /* call plymouth deactivate */
1420
            plymouthPrepareForTransition();
1421
            if (plymouthHasActiveVT()) {
1422
                /* plymouth was displaying a splash screen and has
1423
                 * terminated leaving it on screen
1424
                 */
1425
                int vt;
1426
                vt = getActiveVT();
1427
                if (vt > 0) {
1428
                    /* start the X server on the active vt */
1429
                    d->serverVT = vt;
1430
                    return;
1431
                }
1432
            }
1433
            else {
1434
                /* plymouth might have been running but did not display
1435
                 * a splash screen.
1436
                 */
1437
1438
                /* call plymouth quit and start the X server as usual */
1439
                d->plymouthIsRunning = !plymouthQuitWithoutTransition();
1440
            }
1441
        }
1442
1352
        if (d->reqSrvVT && d->reqSrvVT < 16) {
1443
        if (d->reqSrvVT && d->reqSrvVT < 16) {
1353
            d->serverVT = d->reqSrvVT;
1444
            d->serverVT = d->reqSrvVT;
1354
        } else {
1445
        } else {
(-)kdebase-workspace-4.5.1.orig/kdm/backend/dm.h (+5 lines)
Lines 291-296 Link Here
291
    Xauth **authorizations;     /* authorization data */
291
    Xauth **authorizations;     /* authorization data */
292
    int authNum;                /* number of authorizations */
292
    int authNum;                /* number of authorizations */
293
    char *authFile;             /* file to store authorization in */
293
    char *authFile;             /* file to store authorization in */
294
    int plymouthIsRunning;      /* Plymouth's status */
294
    char *greeterAuthFile;      /* file to store authorization for greeter in */
295
    char *greeterAuthFile;      /* file to store authorization for greeter in */
295
};
296
};
296
297
Lines 404-409 Link Here
404
void forEachDisplay(void (*f)(struct display *));
405
void forEachDisplay(void (*f)(struct display *));
405
#ifdef HAVE_VTS
406
#ifdef HAVE_VTS
406
void forEachDisplayRev(void (*f)(struct display *));
407
void forEachDisplayRev(void (*f)(struct display *));
408
/* functions for plymouth */
409
int get_active_vt (void);
410
int plymouthQuitWithTransition(void);
411
int plymouthQuitWithoutTransition(void);
407
#endif
412
#endif
408
void removeDisplay(struct display *old);
413
void removeDisplay(struct display *old);
409
struct display
414
struct display
(-)kdebase-workspace-4.5.1.orig/kdm/backend/server.c (+23 lines)
Lines 44-49 Link Here
44
#include <stdlib.h>
44
#include <stdlib.h>
45
#include <signal.h>
45
#include <signal.h>
46
46
47
/* These are for bulletproof X */
48
#define SERVER_ATTEMPTS 3
49
char* failsafeXServer[] = {"/etc/gdm/failsafeXServer", 0};
47
50
48
struct display *startingServer;
51
struct display *startingServer;
49
time_t serverTimeout = TO_INF;
52
time_t serverTimeout = TO_INF;
Lines 51-56 Link Here
51
char **
54
char **
52
prepareServerArgv(struct display *d, const char *args)
55
prepareServerArgv(struct display *d, const char *args)
53
{
56
{
57
    debug( "Preparing X server arguments...\n" );
54
    char **argv;
58
    char **argv;
55
#ifdef HAVE_VTS
59
#ifdef HAVE_VTS
56
    char vtstr[8];
60
    char vtstr[8];
Lines 126-131 Link Here
126
{
130
{
127
    startingServer = d;
131
    startingServer = d;
128
    d->startTries = 0;
132
    d->startTries = 0;
133
    d->serverAttempts = SERVER_ATTEMPTS;
129
    startServerOnce();
134
    startServerOnce();
130
}
135
}
131
136
Lines 136-141 Link Here
136
        if (d->serverStatus != ignore) {
141
        if (d->serverStatus != ignore) {
137
            d->serverStatus = ignore;
142
            d->serverStatus = ignore;
138
            serverTimeout = TO_INF;
143
            serverTimeout = TO_INF;
144
            if (d->plymouthIsRunning) {
145
                /* The xserver was started successfully on 1st try
146
                 * as we stop plymouth before entering failsafe X
147
                 */
148
                debug("Quitting Plymouth with transition\n");
149
                d->plymouthIsRunning = !plymouthQuitWithTransition();
150
                debug("Is Plymouth still running? %s\n", d->plymouthIsRunning ? "yes" : "no");
151
            }
139
            debug("aborting X server start\n");
152
            debug("aborting X server start\n");
140
        }
153
        }
141
        startingServer = 0;
154
        startingServer = 0;
Lines 149-154 Link Here
149
    d->serverStatus = ignore;
162
    d->serverStatus = ignore;
150
    serverTimeout = TO_INF;
163
    serverTimeout = TO_INF;
151
    debug("X server ready, starting session\n");
164
    debug("X server ready, starting session\n");
165
    if (d->plymouthIsRunning) {
166
        debug("Quitting Plymouth with transition\n");
167
        d->plymouthIsRunning = !plymouthQuitWithTransition();
168
        debug("Is Plymouth still running? %s\n", d->plymouthIsRunning ? "yes" : "no");
169
    }
152
    startDisplayP2(d);
170
    startDisplayP2(d);
153
}
171
}
154
172
Lines 158-163 Link Here
158
    struct display *d = startingServer;
176
    struct display *d = startingServer;
159
    if (!d->serverAttempts || d->startTries < d->serverAttempts) {
177
    if (!d->serverAttempts || d->startTries < d->serverAttempts) {
160
        d->serverStatus = pausing;
178
        d->serverStatus = pausing;
179
        /* Run Failsafe X here */
180
        logError("Failed to start X server. Starting failsafe X server.\n");
181
        /* Stop plymouth before entering failsafe X */
182
        d->plymouthIsRunning = !plymouthQuitWithoutTransition();
183
        runAndWait(failsafeXServer, 0);
161
        serverTimeout = d->openDelay + now;
184
        serverTimeout = d->openDelay + now;
162
    } else {
185
    } else {
163
        d->serverStatus = ignore;
186
        d->serverStatus = ignore;

Return to bug 404