1 --- lightdm-1.19.3/src/lightdm.c.1 2016-11-30 11:16:46.549436459 +0300
2 +++ lightdm-1.19.3/src/lightdm.c 2016-11-30 11:19:57.426432236 +0300
9 #include "configuration.h"
10 #include "display-manager.h"
16 +open_a_console (char *fnam)
20 + fd = open (fnam, O_RDONLY | O_NOCTTY);
21 + if (fd < 0 && errno == EACCES)
22 + fd = open (fnam, O_WRONLY | O_NOCTTY);
40 + /* Switch to VT1 before going down. */
41 + fd = open_a_console ("/dev/vt/active");
43 + fd = open_a_console ("/dev/vt/0");
49 + res = ioctl (fd, VT_ACTIVATE, 1);
52 + if (errno == ENOTSUP) {
53 + g_debug ("VT_ENABLE not supported, cannot switch to VT1");
60 display_manager_stopped_cb (DisplayManager *display_manager)
62 + g_debug ("Switching VT to VT1 before going down");
63 + switch_vt_console();
64 g_debug ("Stopping daemon");
65 g_main_loop_quit (loop);