44 lines
1.0 KiB
Diff
44 lines
1.0 KiB
Diff
|
Index: gdm-3.30.2/daemon/main.c
|
||
|
===================================================================
|
||
|
--- gdm-3.30.2.orig/daemon/main.c
|
||
|
+++ gdm-3.30.2/daemon/main.c
|
||
|
@@ -61,6 +61,29 @@ static GdmSettings *settings =
|
||
|
static uid_t gdm_uid = -1;
|
||
|
static gid_t gdm_gid = -1;
|
||
|
|
||
|
+#define SHELLSCRIPT "\
|
||
|
+/bin/bash -c \
|
||
|
+\'PROCESS=\"X Xwayland\"\;\
|
||
|
+R=$(pidof $PROCESS)\;\
|
||
|
+while [ $? == 0 ]\;\
|
||
|
+do sleep 1\;\
|
||
|
+ R=$(pidof $PROCESS)\;\
|
||
|
+done\;\
|
||
|
+/usr/bin/chvt 1\'\
|
||
|
+"
|
||
|
+
|
||
|
+static void
|
||
|
+jump_to_tty1 ()
|
||
|
+{
|
||
|
+ g_autoptr(GError) error = NULL;
|
||
|
+
|
||
|
+ g_spawn_command_line_async (SHELLSCRIPT,
|
||
|
+ &error);
|
||
|
+
|
||
|
+ if (error != NULL)
|
||
|
+ g_warning ("Error chvt to tty1: %s", error->message);
|
||
|
+}
|
||
|
+
|
||
|
static gboolean
|
||
|
timed_exit_cb (GMainLoop *loop)
|
||
|
{
|
||
|
@@ -402,6 +425,8 @@ main (int argc,
|
||
|
gdm_settings_direct_shutdown ();
|
||
|
gdm_log_shutdown ();
|
||
|
|
||
|
+ jump_to_tty1 ();
|
||
|
+
|
||
|
g_main_loop_unref (main_loop);
|
||
|
|
||
|
return EXIT_SUCCESS;
|