AM_CONDITIONAL(ENABLE_TESTS,  [test "$enable_tests" = yes])
 
+AC_ARG_ENABLE(gdm-transition, AS_HELP_STRING([--enable-gdm-transition],[enable smooth transition to gdm]),enable_gdm_transition=$enableval,enable_gdm_transition=no)
+
+if test x$enable_gdm_transition = xyes; then
+  AC_DEFINE(PLY_ENABLE_GDM_TRANSITION, 1, [Enable smooth transition to GDM])
+fi
+
 AC_ARG_WITH(boot-entry, AS_HELP_STRING([--with-boot-entry],[create initrd and grub entry]),with_boot_entry=$withval,with_boot_entry=yes)
 
 AM_CONDITIONAL(ADD_BOOT_ENTRY,  [test "$with_boot_entry" = yes])
 
   return plugin;
 }
 
+#ifdef PLY_ENABLE_GDM_TRANSITION
+static void
+tell_gdm_to_transition (void)
+{
+  int fd;
+
+  fd = creat ("/var/spool/gdm/force-display-on-active-vt", 0644);
+  close (fd);
+}
+#endif
+
 void
 destroy_plugin (ply_boot_splash_plugin_t *plugin)
 {
   ply_throbber_free (plugin->throbber);
   ply_label_free (plugin->label);
 
+#ifdef PLY_ENABLE_GDM_TRANSITION
+  if (plugin->is_visible)
+    tell_gdm_to_transition ();
+#endif
 
   free (plugin);
 }