- Fix bug in last patch
This commit is contained in:
parent
32ae6ba5f6
commit
633208c39e
@ -42,7 +42,7 @@ index 1846ed2..ced03a3 100644
|
|||||||
-DPIXMAPDIR=\"$(pixmapdir)\" \
|
-DPIXMAPDIR=\"$(pixmapdir)\" \
|
||||||
-DSBINDIR=\"$(sbindir)\" \
|
-DSBINDIR=\"$(sbindir)\" \
|
||||||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||||
+ -DGDM_SPOOL_DIR=\"$(GDM_SPOOL_DIR)\" \
|
+ -DGDM_SPOOL_DIR=\"$(GDM_SPOOL_DIR)\" \
|
||||||
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
|
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
|
||||||
-DGDM_DEFAULTS_CONF=\"$(GDM_DEFAULTS_CONF)\" \
|
-DGDM_DEFAULTS_CONF=\"$(GDM_DEFAULTS_CONF)\" \
|
||||||
-DGDM_CUSTOM_CONF=\"$(GDM_CUSTOM_CONF)\" \
|
-DGDM_CUSTOM_CONF=\"$(GDM_CUSTOM_CONF)\" \
|
||||||
@ -66,51 +66,51 @@ index ca37a2a..e6f821f 100644
|
|||||||
+static gboolean
|
+static gboolean
|
||||||
+should_force_display_on_active_vt (void)
|
+should_force_display_on_active_vt (void)
|
||||||
+{
|
+{
|
||||||
+ gboolean should_force_display_on_active_vt;
|
+ gboolean should_force_display_on_active_vt;
|
||||||
+
|
+
|
||||||
+ should_force_display_on_active_vt = g_file_test (GDM_SPOOL_DIR "/force-display-on-active-vt",
|
+ should_force_display_on_active_vt = g_file_test (GDM_SPOOL_DIR "/force-display-on-active-vt",
|
||||||
+ G_FILE_TEST_EXISTS);
|
+ G_FILE_TEST_EXISTS);
|
||||||
+ g_unlink (GDM_SPOOL_DIR "/force-display-on-active-vt");
|
+ g_unlink (GDM_SPOOL_DIR "/force-display-on-active-vt");
|
||||||
+
|
+
|
||||||
+ return should_force_display_on_active_vt;
|
+ return should_force_display_on_active_vt;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static int
|
+static int
|
||||||
+get_active_vt (void)
|
+get_active_vt (void)
|
||||||
+{
|
+{
|
||||||
+ int console_fd;
|
+ int console_fd;
|
||||||
+ struct vt_stat console_state = { 0 };
|
+ struct vt_stat console_state = { 0 };
|
||||||
+
|
+
|
||||||
+ console_fd = open ("/dev/tty0", O_RDONLY | O_NOCTTY);
|
+ console_fd = open ("/dev/tty0", O_RDONLY | O_NOCTTY);
|
||||||
+
|
+
|
||||||
+ if (console_fd < 0) {
|
+ if (console_fd < 0) {
|
||||||
+ goto out;
|
+ goto out;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (ioctl (console_fd, VT_GETSTATE, &console_state) < 0) {
|
+ if (ioctl (console_fd, VT_GETSTATE, &console_state) < 0) {
|
||||||
+ goto out;
|
+ goto out;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+out:
|
+out:
|
||||||
+ if (console_fd >= 0) {
|
+ if (console_fd >= 0) {
|
||||||
+ close (console_fd);
|
+ close (console_fd);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return console_state.v_active;
|
+ return console_state.v_active;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static char *
|
+static char *
|
||||||
+get_active_vt_as_string (void)
|
+get_active_vt_as_string (void)
|
||||||
+{
|
+{
|
||||||
+ int vt;
|
+ int vt;
|
||||||
+
|
+
|
||||||
+ vt = get_active_vt ();
|
+ vt = get_active_vt ();
|
||||||
+
|
|
||||||
+ if (vt <= 0) {
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ return g_strdup_printf ("vt%d", vt);
|
+ if (vt <= 0) {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return g_strdup_printf ("vt%d", vt);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
@ -122,18 +122,18 @@ index ca37a2a..e6f821f 100644
|
|||||||
|
|
||||||
- /* fork X server process */
|
- /* fork X server process */
|
||||||
- res = gdm_server_spawn (server, NULL);
|
- res = gdm_server_spawn (server, NULL);
|
||||||
+ if (should_force_display_on_active_vt () || TRUE) {
|
+ if (should_force_display_on_active_vt ()) {
|
||||||
+ char *vt;
|
+ char *vt;
|
||||||
+
|
+
|
||||||
+ g_free (server->priv->command);
|
+ g_free (server->priv->command);
|
||||||
+ server->priv->command = g_strdup (X_SERVER " -nr -verbose");
|
+ server->priv->command = g_strdup (X_SERVER " -nr -verbose");
|
||||||
+ vt = get_active_vt_as_string ();
|
+ vt = get_active_vt_as_string ();
|
||||||
+ res = gdm_server_spawn (server, vt);
|
+ res = gdm_server_spawn (server, vt);
|
||||||
+ g_free (vt);
|
+ g_free (vt);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ /* fork X server process */
|
+ /* fork X server process */
|
||||||
+ res = gdm_server_spawn (server, NULL);
|
+ res = gdm_server_spawn (server, NULL);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ index 30e1f55..400c43d 100644
|
|||||||
-rf \
|
-rf \
|
||||||
$(DESTDIR)$(workingdir)/.gconf.mandatory \
|
$(DESTDIR)$(workingdir)/.gconf.mandatory \
|
||||||
$(DESTDIR)$(xauthdir)
|
$(DESTDIR)$(xauthdir)
|
||||||
+ $(DESTDIR)$(spooldir)
|
+ $(DESTDIR)$(spooldir)
|
||||||
|
|
||||||
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.path
|
install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.path
|
||||||
if test '!' -d $(DESTDIR)$(gdmconfdir); then \
|
if test '!' -d $(DESTDIR)$(gdmconfdir); then \
|
||||||
@ -161,11 +161,11 @@ index 30e1f55..400c43d 100644
|
|||||||
chown root:gdm $(DESTDIR)$(workingdir) || : ; \
|
chown root:gdm $(DESTDIR)$(workingdir) || : ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
+ if test '!' -d $(DESTDIR)$(spooldir); then \
|
+ if test '!' -d $(DESTDIR)$(spooldir); then \
|
||||||
+ $(mkinstalldirs) $(DESTDIR)$(spooldir); \
|
+ $(mkinstalldirs) $(DESTDIR)$(spooldir); \
|
||||||
+ chmod 1770 $(DESTDIR)$(spooldir); \
|
+ chmod 1770 $(DESTDIR)$(spooldir); \
|
||||||
+ chown root:gdm $(DESTDIR)$(spooldir) || : ; \
|
+ chown root:gdm $(DESTDIR)$(spooldir) || : ; \
|
||||||
+ fi
|
+ fi
|
||||||
+
|
+
|
||||||
$(INSTALL_DATA) $(srcdir)/gconf.path $(DESTDIR)$(workingdir)/.gconf.path
|
$(INSTALL_DATA) $(srcdir)/gconf.path $(DESTDIR)$(workingdir)/.gconf.path
|
||||||
gconftool-2 --direct --config-source=xml:merged:$(DESTDIR)$(workingdir)/.gconf.mandatory --recursive-unset /
|
gconftool-2 --direct --config-source=xml:merged:$(DESTDIR)$(workingdir)/.gconf.mandatory --recursive-unset /
|
||||||
|
5
gdm.spec
5
gdm.spec
@ -16,7 +16,7 @@
|
|||||||
Summary: The GNOME Display Manager
|
Summary: The GNOME Display Manager
|
||||||
Name: gdm
|
Name: gdm
|
||||||
Version: 2.23.92
|
Version: 2.23.92
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -304,6 +304,9 @@ fi
|
|||||||
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
|
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 12 2008 Ray Strode <rstrode@redhat.com> - 1:2.23.92-4
|
||||||
|
- Fix bug in last patch
|
||||||
|
|
||||||
* Thu Sep 11 2008 Ray Strode <rstrode@redhat.com> - 1:2.23.92-3
|
* Thu Sep 11 2008 Ray Strode <rstrode@redhat.com> - 1:2.23.92-3
|
||||||
- Add hook to allow for plymouth transition
|
- Add hook to allow for plymouth transition
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user