Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
gdm.2185
gdm-plymouth-vt1.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdm-plymouth-vt1.patch of Package gdm.2185
Index: gdm-3.10.0.1/daemon/main.c =================================================================== --- gdm-3.10.0.1.orig/daemon/main.c +++ gdm-3.10.0.1/daemon/main.c @@ -33,6 +33,8 @@ #include <sys/wait.h> #include <locale.h> #include <signal.h> +#include <sys/ioctl.h> +#include <sys/vt.h> #include <glib.h> #include <glib/gi18n.h> @@ -311,6 +313,23 @@ is_debug_set (void) return debug; } +static void +jump_to_vt (int vt_number) +{ + int fd; + + fd = open ("/dev/tty0", O_RDWR | O_NOCTTY); + if (ioctl (fd, VT_ACTIVATE, vt_number) < 0) { + g_debug ("Gdm: couldn't initiate jump to VT %d: %m", + vt_number); + } else if (ioctl (fd, VT_WAITACTIVE, vt_number) < 0) { + g_debug ("Gdm: couldn't finalize jump to VT %d: %m", + vt_number); + } + close(fd); +} + + int main (int argc, char **argv) @@ -320,6 +339,7 @@ main (int argc, GError *error = NULL; int ret; gboolean res; + gboolean plymouth_running = FALSE; static gboolean do_timed_exit = FALSE; static gboolean print_version = FALSE; static gboolean fatal_warnings = FALSE; @@ -401,6 +421,8 @@ main (int argc, g_chdir ("/"); + plymouth_running = g_access("/run/plymouth/pid", F_OK) == 0; + main_loop = g_main_loop_new (NULL, FALSE); g_unix_signal_add (SIGTERM, on_shutdown_signal_cb, main_loop); @@ -431,6 +453,11 @@ main (int argc, g_printerr ("%s\n", error->message); g_clear_error (&error); } + + if (plymouth_running) { + jump_to_vt (1); + } + return ret; }
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