Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:yukoff:openSUSE:Leap:42.1:Backports
gdm.4892
gdm-look-at-runlevel.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdm-look-at-runlevel.patch of Package gdm.4892
Index: gdm-2.28.0/daemon/gdm-static-display.c =================================================================== --- gdm-2.28.0.orig/daemon/gdm-static-display.c +++ gdm-2.28.0/daemon/gdm-static-display.c @@ -26,6 +26,7 @@ #include <fcntl.h> #include <pwd.h> #include <unistd.h> +#include <utmp.h> #include <string.h> #include <signal.h> #include <sys/stat.h> @@ -96,6 +97,29 @@ gdm_static_display_manage (GdmDisplay *d } static gboolean +gdm_static_display_should_manage_again (void) +{ + struct utmp *ut; + + setutent(); + while ((ut = getutent()) != NULL) { + if (ut->ut_type == RUN_LVL) { + char current; + current = ut->ut_pid % 256; + endutent(); + + if (current == '0' || current == '6') + return FALSE; + return TRUE; + } + } + + endutent(); + + return TRUE; +} + +static gboolean gdm_static_display_finish (GdmDisplay *display) { int status; @@ -108,9 +132,11 @@ gdm_static_display_finish (GdmDisplay *d /* restart static displays */ gdm_display_unmanage (display); - status = gdm_display_get_status (display); - if (status != GDM_DISPLAY_FAILED) { - gdm_display_manage (display); + if (gdm_static_display_should_manage_again ()) { + status = gdm_display_get_status (display); + if (status != GDM_DISPLAY_FAILED) { + gdm_display_manage (display); + } } return TRUE;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor