Compare commits
No commits in common. "a9-testing" and "c8" have entirely different histories.
a9-testing
...
c8
@ -1 +1 @@
|
|||||||
761f14d38e1714a013ee93d6076ae55283189e2c SOURCES/gdm-40.1.tar.xz
|
05c48de8765bde97768b6740417ad6c374c20763 SOURCES/gdm-40.0.tar.xz
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/gdm-40.1.tar.xz
|
SOURCES/gdm-40.0.tar.xz
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f6ebcec5d48aeff718a9db9b8ff812fd404a61ed Mon Sep 17 00:00:00 2001
|
From a447cd87b99868348ecf69479eb7958f20a318a2 Mon Sep 17 00:00:00 2001
|
||||||
From: Rui Matos <tiagomatos@gmail.com>
|
From: Rui Matos <tiagomatos@gmail.com>
|
||||||
Date: Mon, 23 Jan 2017 20:19:51 +0100
|
Date: Mon, 23 Jan 2017 20:19:51 +0100
|
||||||
Subject: [PATCH] Honor initial setup being disabled by distro installer
|
Subject: [PATCH] Honor initial setup being disabled by distro installer
|
||||||
@ -18,10 +18,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=777708
|
|||||||
1 file changed, 29 insertions(+)
|
1 file changed, 29 insertions(+)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
|
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
|
||||||
index 34467856..9438fe72 100644
|
index 687e7da4b..b3bdf066d 100644
|
||||||
--- a/daemon/gdm-display.c
|
--- a/daemon/gdm-display.c
|
||||||
+++ b/daemon/gdm-display.c
|
+++ b/daemon/gdm-display.c
|
||||||
@@ -1621,103 +1621,132 @@ kernel_cmdline_initial_setup_force_state (gboolean *force_state)
|
@@ -1591,103 +1591,132 @@ kernel_cmdline_initial_setup_force_state (gboolean *force_state)
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gchar *contents = NULL;
|
gchar *contents = NULL;
|
||||||
gchar *setup_argument = NULL;
|
gchar *setup_argument = NULL;
|
||||||
@ -155,5 +155,5 @@ index 34467856..9438fe72 100644
|
|||||||
auth_file = gdm_display_access_file_get_path (priv->access_file);
|
auth_file = gdm_display_access_file_get_path (priv->access_file);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.32.0
|
2.28.0
|
||||||
|
|
||||||
|
@ -0,0 +1,241 @@
|
|||||||
|
From 85951a0384cb7f37d99669575fad4aea155f25a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Wed, 5 May 2021 10:50:56 -0400
|
||||||
|
Subject: [PATCH 1/5] Revert "gdm-{wayland,x}-session: don't overwrite user env
|
||||||
|
with fallback vars"
|
||||||
|
|
||||||
|
This reverts commit ccecd9c975d04da80db4cd547b67a1a94fa83292.
|
||||||
|
---
|
||||||
|
daemon/gdm-wayland-session.c | 22 +---------------------
|
||||||
|
daemon/gdm-x-session.c | 22 +---------------------
|
||||||
|
2 files changed, 2 insertions(+), 42 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
|
||||||
|
index d0404d2c1..35679b194 100644
|
||||||
|
--- a/daemon/gdm-wayland-session.c
|
||||||
|
+++ b/daemon/gdm-wayland-session.c
|
||||||
|
@@ -262,112 +262,92 @@ on_session_finished (GSubprocess *subprocess,
|
||||||
|
|
||||||
|
state->session_exit_status = exit_status;
|
||||||
|
} else {
|
||||||
|
int signal_number;
|
||||||
|
|
||||||
|
signal_number = g_subprocess_get_term_sig (subprocess);
|
||||||
|
g_debug ("session was killed with status %d", signal_number);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_clear_object (&state->session_subprocess);
|
||||||
|
out:
|
||||||
|
g_main_loop_quit (state->main_loop);
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
spawn_session (State *state,
|
||||||
|
GCancellable *cancellable)
|
||||||
|
{
|
||||||
|
GSubprocessLauncher *launcher = NULL;
|
||||||
|
GSubprocess *subprocess = NULL;
|
||||||
|
GError *error = NULL;
|
||||||
|
gboolean is_running = FALSE;
|
||||||
|
int ret;
|
||||||
|
char **argv = NULL;
|
||||||
|
static const char *session_variables[] = { "DISPLAY",
|
||||||
|
"XAUTHORITY",
|
||||||
|
"WAYLAND_DISPLAY",
|
||||||
|
"WAYLAND_SOCKET",
|
||||||
|
"GNOME_SHELL_SESSION_MODE",
|
||||||
|
NULL };
|
||||||
|
- /* The environment variables listed below are those we have set (or
|
||||||
|
- * received from our own execution environment) only as a fallback to
|
||||||
|
- * make things work, as opposed to a information directly pertaining to
|
||||||
|
- * the session about to be started. Variables listed here will not
|
||||||
|
- * overwrite the existing environment (possibly) imported from the
|
||||||
|
- * systemd --user instance.
|
||||||
|
- * As an example: We need a PATH for some of the launched subprocesses
|
||||||
|
- * to work, but if the user (or the distributor) has customized the PATH
|
||||||
|
- * via one of systemds user-environment-generators, that version should
|
||||||
|
- * be preferred. */
|
||||||
|
- static const char *fallback_variables[] = { "PATH", NULL };
|
||||||
|
|
||||||
|
g_debug ("Running wayland session");
|
||||||
|
|
||||||
|
ret = g_shell_parse_argv (state->session_command,
|
||||||
|
NULL,
|
||||||
|
&argv,
|
||||||
|
&error);
|
||||||
|
|
||||||
|
if (!ret) {
|
||||||
|
g_debug ("could not parse session arguments: %s", error->message);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_NONE);
|
||||||
|
|
||||||
|
if (state->environment != NULL) {
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; state->environment[i] != NULL; i++) {
|
||||||
|
g_auto(GStrv) environment_entry = NULL;
|
||||||
|
|
||||||
|
if (state->environment[i][0] == '\0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
environment_entry = g_strsplit (state->environment[i], "=", 2);
|
||||||
|
|
||||||
|
if (environment_entry[0] == NULL || environment_entry[1] == NULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Merge the environment block imported from systemd --user with the
|
||||||
|
- * environment we have set for ourselves (and thus pass on to the
|
||||||
|
- * launcher process). Variables we have set have precedence, as to not
|
||||||
|
- * import stale data from prior user sessions, with the exception of
|
||||||
|
- * those listed in fallback_variables. See the comment there for more
|
||||||
|
- * explanations. */
|
||||||
|
- g_subprocess_launcher_setenv (launcher,
|
||||||
|
- environment_entry[0],
|
||||||
|
- environment_entry[1],
|
||||||
|
- g_strv_contains (fallback_variables, environment_entry[0]));
|
||||||
|
+ g_subprocess_launcher_setenv (launcher, environment_entry[0], environment_entry[1], FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't allow session specific environment variables from earlier sessions to
|
||||||
|
* leak through */
|
||||||
|
for (i = 0; session_variables[i] != NULL; i++) {
|
||||||
|
if (g_getenv (session_variables[i]) == NULL) {
|
||||||
|
g_subprocess_launcher_unsetenv (launcher, session_variables[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state->bus_address != NULL) {
|
||||||
|
g_subprocess_launcher_setenv (launcher, "DBUS_SESSION_BUS_ADDRESS", state->bus_address, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
subprocess = g_subprocess_launcher_spawnv (launcher,
|
||||||
|
(const char * const *) argv,
|
||||||
|
&error);
|
||||||
|
g_strfreev (argv);
|
||||||
|
|
||||||
|
if (subprocess == NULL) {
|
||||||
|
g_debug ("could not start session: %s", error->message);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
state->session_subprocess = g_object_ref (subprocess);
|
||||||
|
|
||||||
|
g_subprocess_wait_async (state->session_subprocess,
|
||||||
|
cancellable,
|
||||||
|
(GAsyncReadyCallback)
|
||||||
|
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
|
||||||
|
index 5962da572..b15483614 100644
|
||||||
|
--- a/daemon/gdm-x-session.c
|
||||||
|
+++ b/daemon/gdm-x-session.c
|
||||||
|
@@ -588,102 +588,82 @@ on_session_finished (GSubprocess *subprocess,
|
||||||
|
|
||||||
|
state->session_exit_status = exit_status;
|
||||||
|
} else {
|
||||||
|
int signal_number;
|
||||||
|
|
||||||
|
signal_number = g_subprocess_get_term_sig (subprocess);
|
||||||
|
g_debug ("session was killed with status %d", signal_number);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_clear_object (&state->session_subprocess);
|
||||||
|
out:
|
||||||
|
g_main_loop_quit (state->main_loop);
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
spawn_session (State *state,
|
||||||
|
gboolean run_script,
|
||||||
|
GCancellable *cancellable)
|
||||||
|
{
|
||||||
|
GSubprocessLauncher *launcher = NULL;
|
||||||
|
GSubprocess *subprocess = NULL;
|
||||||
|
GError *error = NULL;
|
||||||
|
gboolean is_running = FALSE;
|
||||||
|
const char *vt;
|
||||||
|
static const char *session_variables[] = { "DISPLAY",
|
||||||
|
"XAUTHORITY",
|
||||||
|
"WAYLAND_DISPLAY",
|
||||||
|
"WAYLAND_SOCKET",
|
||||||
|
"GNOME_SHELL_SESSION_MODE",
|
||||||
|
NULL };
|
||||||
|
- /* The environment variables listed below are those we have set (or
|
||||||
|
- * received from our own execution environment) only as a fallback to
|
||||||
|
- * make things work, as opposed to a information directly pertaining to
|
||||||
|
- * the session about to be started. Variables listed here will not
|
||||||
|
- * overwrite the existing environment (possibly) imported from the
|
||||||
|
- * systemd --user instance.
|
||||||
|
- * As an example: We need a PATH for some of the launched subprocesses
|
||||||
|
- * to work, but if the user (or the distributor) has customized the PATH
|
||||||
|
- * via one of systemds user-environment-generators, that version should
|
||||||
|
- * be preferred. */
|
||||||
|
- static const char *fallback_variables[] = { "PATH", NULL };
|
||||||
|
|
||||||
|
g_debug ("Running X session");
|
||||||
|
|
||||||
|
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_NONE);
|
||||||
|
|
||||||
|
if (state->environment != NULL) {
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; state->environment[i] != NULL; i++) {
|
||||||
|
g_auto(GStrv) environment_entry = NULL;
|
||||||
|
|
||||||
|
if (state->environment[i][0] == '\0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
environment_entry = g_strsplit (state->environment[i], "=", 2);
|
||||||
|
|
||||||
|
if (environment_entry[0] == NULL || environment_entry[1] == NULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Merge the environment block imported from systemd --user with the
|
||||||
|
- * environment we have set for ourselves (and thus pass on to the
|
||||||
|
- * launcher process). Variables we have set have precedence, as to not
|
||||||
|
- * import stale data from prior user sessions, with the exception of
|
||||||
|
- * those listed in fallback_variables. See the comment there for more
|
||||||
|
- * explanations. */
|
||||||
|
- g_subprocess_launcher_setenv (launcher,
|
||||||
|
- environment_entry[0],
|
||||||
|
- environment_entry[1],
|
||||||
|
- g_strv_contains (fallback_variables, environment_entry[0]));
|
||||||
|
+ g_subprocess_launcher_setenv (launcher, environment_entry[0], environment_entry[1], FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't allow session specific environment variables from earlier sessions to
|
||||||
|
* leak through */
|
||||||
|
for (i = 0; session_variables[i] != NULL; i++) {
|
||||||
|
if (g_getenv (session_variables[i]) == NULL) {
|
||||||
|
g_subprocess_launcher_unsetenv (launcher, session_variables[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_subprocess_launcher_setenv (launcher, "DISPLAY", state->display_name, TRUE);
|
||||||
|
g_subprocess_launcher_setenv (launcher, "XAUTHORITY", state->auth_file, TRUE);
|
||||||
|
|
||||||
|
if (state->bus_address != NULL) {
|
||||||
|
g_subprocess_launcher_setenv (launcher, "DBUS_SESSION_BUS_ADDRESS", state->bus_address, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
vt = g_getenv ("XDG_VTNR");
|
||||||
|
|
||||||
|
if (vt != NULL) {
|
||||||
|
g_subprocess_launcher_setenv (launcher, "WINDOWPATH", vt, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (run_script) {
|
||||||
|
subprocess = g_subprocess_launcher_spawn (launcher,
|
||||||
|
&error,
|
||||||
|
GDMCONFDIR "/Xsession",
|
||||||
|
state->session_command,
|
||||||
|
NULL);
|
||||||
|
--
|
||||||
|
2.30.1
|
||||||
|
|
86
SOURCES/0001-build-Support-keyutils-1.5.11-and-older.patch
Normal file
86
SOURCES/0001-build-Support-keyutils-1.5.11-and-older.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
From 2fc7d94280a82e079129468d9b0db312725e5926 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Mon, 12 Dec 2022 15:37:38 -0500
|
||||||
|
Subject: [PATCH 1/2] build: Support keyutils 1.5.11 and older
|
||||||
|
|
||||||
|
keyutils didn't get a pkgconfig file until 1.6.
|
||||||
|
|
||||||
|
This commit looks for the library directly if it can't find
|
||||||
|
the pkgconfig file.
|
||||||
|
---
|
||||||
|
meson.build | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 4a286f97..1a557e9a 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -26,60 +26,65 @@ lang_config_file = (get_option('lang-file') != '')? get_option('lang-file') : gd
|
||||||
|
pam_mod_dir = (get_option('pam-mod-dir') != '')? get_option('pam-mod-dir') : gdm_prefix / get_option('libdir') / 'security'
|
||||||
|
dbus_sys_dir = (get_option('dbus-sys') != '')? get_option('dbus-sys') : get_option('sysconfdir') / 'dbus-1' / 'system.d'
|
||||||
|
gdm_defaults_conf = (get_option('defaults-conf') != '')? get_option('defaults-conf') : gdm_prefix / get_option('datadir') / 'gdm' / 'defaults.conf'
|
||||||
|
gdm_custom_conf = (get_option('custom-conf') != '')? get_option('custom-conf') : gdmconfdir / 'custom.conf'
|
||||||
|
gnome_settings_daemon_dir = (get_option('gnome-settings-daemon-dir') != '')? get_option('gnome-settings-daemon-dir') : gdm_prefix / get_option('libexecdir')
|
||||||
|
gdm_run_dir = (get_option('run-dir') != '')? get_option('run-dir') : gdm_prefix / get_option('localstatedir') / 'run' / 'gdm'
|
||||||
|
gdm_runtime_conf = (get_option('runtime-conf') != '')? get_option('runtime-conf') : gdm_run_dir / 'custom.conf'
|
||||||
|
gdm_pid_file = (get_option('pid-file') != '')? get_option('pid-file') : gdm_run_dir / 'gdm.pid'
|
||||||
|
ran_once_marker_dir = (get_option('ran-once-marker-dir') != '')? get_option('ran-once-marker-dir') : gdm_run_dir
|
||||||
|
working_dir = (get_option('working-dir') != '')? get_option('working-dir') : gdm_prefix / get_option('localstatedir') / 'lib' / 'gdm'
|
||||||
|
gdm_xauth_dir = (get_option('xauth-dir') != '')? get_option('xauth-dir') : gdm_run_dir
|
||||||
|
gdm_screenshot_dir = (get_option('screenshot-dir') != '')? get_option('screenshot-dir') : gdm_run_dir / 'greeter'
|
||||||
|
|
||||||
|
# Common variables
|
||||||
|
config_h_dir = include_directories('.')
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
udev_dep = dependency('udev')
|
||||||
|
|
||||||
|
glib_min_version = '2.56.0'
|
||||||
|
|
||||||
|
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
||||||
|
gobject_dep = dependency('gobject-2.0', version: '>=' + glib_min_version)
|
||||||
|
gio_dep = dependency('gio-2.0', version: '>=' + glib_min_version)
|
||||||
|
gio_unix_dep = dependency('gio-unix-2.0', version: '>=' + glib_min_version)
|
||||||
|
gtk_dep = dependency('gtk+-3.0', version: '>= 2.91.1')
|
||||||
|
libcanberra_gtk_dep = dependency('libcanberra-gtk3', version: '>= 0.4')
|
||||||
|
accountsservice_dep = dependency('accountsservice', version: '>= 0.6.35')
|
||||||
|
xcb_dep = dependency('xcb')
|
||||||
|
keyutils_dep = dependency('libkeyutils', required: false)
|
||||||
|
+
|
||||||
|
+if not keyutils_dep.found()
|
||||||
|
+ keyutils_dep = cc.find_library('libkeyutils')
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
libselinux_dep = dependency('libselinux', required: get_option('selinux'))
|
||||||
|
|
||||||
|
# udev
|
||||||
|
if udev_dir == ''
|
||||||
|
if udev_dep.found()
|
||||||
|
udev_prefix = udev_dep.get_pkgconfig_variable('udevdir')
|
||||||
|
else
|
||||||
|
udev_prefix = gdm_prefix / 'lib' / 'udev'
|
||||||
|
endif
|
||||||
|
udev_dir = udev_prefix / 'rules.d'
|
||||||
|
endif
|
||||||
|
|
||||||
|
# X11
|
||||||
|
x_deps = declare_dependency(
|
||||||
|
dependencies: [
|
||||||
|
dependency('x11'),
|
||||||
|
dependency('xau'),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
# Xserver 1.17 & later default to -nolisten and require -listen for remote access
|
||||||
|
xserver_deps = dependency('xorg-server', version : '>=1.17', required : false)
|
||||||
|
xserver_has_listen = xserver_deps.found()
|
||||||
|
find_x_server_script = find_program('build-aux/find-x-server.sh', native: true)
|
||||||
|
find_x_server_out = run_command(find_x_server_script).stdout().strip()
|
||||||
|
if find_x_server_out != ''
|
||||||
|
x_bin = find_x_server_out
|
||||||
|
x_bin_path_split = x_bin.split('/')
|
||||||
|
i = 0
|
||||||
|
x_path = '/'
|
||||||
|
foreach dir : x_bin_path_split
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
570
SOURCES/0001-daemon-Don-t-error-on-shutdown.patch
Normal file
570
SOURCES/0001-daemon-Don-t-error-on-shutdown.patch
Normal file
@ -0,0 +1,570 @@
|
|||||||
|
From fbdb5fdfc5f4c5569643239cae1d6fe5fac13717 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Mon, 12 Dec 2022 10:52:58 -0500
|
||||||
|
Subject: [PATCH] daemon: Don't error on shutdown
|
||||||
|
|
||||||
|
Right now we complain if shutdown happens while the display is
|
||||||
|
comming up.
|
||||||
|
|
||||||
|
This commit detects that case and avoids the error in that case.
|
||||||
|
---
|
||||||
|
daemon/gdm-display.c | 28 +++++++++++++++++++++++++++-
|
||||||
|
daemon/gdm-manager.c | 11 +++++++----
|
||||||
|
2 files changed, 34 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
|
||||||
|
index 9438fe72..a93857e9 100644
|
||||||
|
--- a/daemon/gdm-display.c
|
||||||
|
+++ b/daemon/gdm-display.c
|
||||||
|
@@ -66,86 +66,88 @@ typedef struct _GdmDisplayPrivate
|
||||||
|
char *x11_display_name;
|
||||||
|
int status;
|
||||||
|
time_t creation_time;
|
||||||
|
|
||||||
|
char *x11_cookie;
|
||||||
|
gsize x11_cookie_size;
|
||||||
|
GdmDisplayAccessFile *access_file;
|
||||||
|
|
||||||
|
guint finish_idle_id;
|
||||||
|
|
||||||
|
xcb_connection_t *xcb_connection;
|
||||||
|
int xcb_screen_number;
|
||||||
|
|
||||||
|
GDBusConnection *connection;
|
||||||
|
GdmDisplayAccessFile *user_access_file;
|
||||||
|
|
||||||
|
GdmDBusDisplay *display_skeleton;
|
||||||
|
GDBusObjectSkeleton *object_skeleton;
|
||||||
|
|
||||||
|
GDBusProxy *accountsservice_proxy;
|
||||||
|
|
||||||
|
/* this spawns and controls the greeter session */
|
||||||
|
GdmLaunchEnvironment *launch_environment;
|
||||||
|
|
||||||
|
guint is_local : 1;
|
||||||
|
guint is_initial : 1;
|
||||||
|
guint allow_timed_login : 1;
|
||||||
|
guint have_existing_user_accounts : 1;
|
||||||
|
guint doing_initial_setup : 1;
|
||||||
|
guint session_registered : 1;
|
||||||
|
+ guint shutting_down : 1;
|
||||||
|
|
||||||
|
GStrv supported_session_types;
|
||||||
|
} GdmDisplayPrivate;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
PROP_ID,
|
||||||
|
PROP_STATUS,
|
||||||
|
PROP_SEAT_ID,
|
||||||
|
PROP_SESSION_ID,
|
||||||
|
PROP_SESSION_CLASS,
|
||||||
|
PROP_SESSION_TYPE,
|
||||||
|
PROP_REMOTE_HOSTNAME,
|
||||||
|
PROP_X11_DISPLAY_NUMBER,
|
||||||
|
PROP_X11_DISPLAY_NAME,
|
||||||
|
PROP_X11_COOKIE,
|
||||||
|
PROP_X11_AUTHORITY_FILE,
|
||||||
|
PROP_IS_CONNECTED,
|
||||||
|
PROP_IS_LOCAL,
|
||||||
|
PROP_LAUNCH_ENVIRONMENT,
|
||||||
|
PROP_IS_INITIAL,
|
||||||
|
PROP_ALLOW_TIMED_LOGIN,
|
||||||
|
PROP_HAVE_EXISTING_USER_ACCOUNTS,
|
||||||
|
PROP_DOING_INITIAL_SETUP,
|
||||||
|
PROP_SESSION_REGISTERED,
|
||||||
|
PROP_SUPPORTED_SESSION_TYPES,
|
||||||
|
+ PROP_SHUTTING_DOWN,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void gdm_display_class_init (GdmDisplayClass *klass);
|
||||||
|
static void gdm_display_init (GdmDisplay *self);
|
||||||
|
static void gdm_display_finalize (GObject *object);
|
||||||
|
static void queue_finish (GdmDisplay *self);
|
||||||
|
static void _gdm_display_set_status (GdmDisplay *self,
|
||||||
|
int status);
|
||||||
|
static gboolean wants_initial_setup (GdmDisplay *self);
|
||||||
|
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GdmDisplay, gdm_display, G_TYPE_OBJECT)
|
||||||
|
|
||||||
|
GQuark
|
||||||
|
gdm_display_error_quark (void)
|
||||||
|
{
|
||||||
|
static GQuark ret = 0;
|
||||||
|
if (ret == 0) {
|
||||||
|
ret = g_quark_from_static_string ("gdm_display_error");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
time_t
|
||||||
|
gdm_display_get_creation_time (GdmDisplay *self)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDM_IS_DISPLAY (self), 0);
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
@@ -665,61 +667,61 @@ gdm_display_disconnect (GdmDisplay *self)
|
||||||
|
}
|
||||||
|
|
||||||
|
xcb_flush (priv->xcb_connection);
|
||||||
|
|
||||||
|
g_clear_pointer (&priv->xcb_connection, xcb_disconnect);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_display_unmanage (GdmDisplay *self)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE);
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
|
||||||
|
gdm_display_disconnect (self);
|
||||||
|
|
||||||
|
if (priv->user_access_file != NULL) {
|
||||||
|
gdm_display_access_file_close (priv->user_access_file);
|
||||||
|
g_object_unref (priv->user_access_file);
|
||||||
|
priv->user_access_file = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->access_file != NULL) {
|
||||||
|
gdm_display_access_file_close (priv->access_file);
|
||||||
|
g_object_unref (priv->access_file);
|
||||||
|
priv->access_file = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!priv->session_registered) {
|
||||||
|
+ if (!priv->session_registered && !priv->shutting_down) {
|
||||||
|
g_warning ("GdmDisplay: Session never registered, failing");
|
||||||
|
_gdm_display_set_status (self, GDM_DISPLAY_FAILED);
|
||||||
|
} else {
|
||||||
|
_gdm_display_set_status (self, GDM_DISPLAY_UNMANAGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_display_get_id (GdmDisplay *self,
|
||||||
|
char **id,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE);
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
if (id != NULL) {
|
||||||
|
*id = g_strdup (priv->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_display_get_x11_display_name (GdmDisplay *self,
|
||||||
|
char **x11_display,
|
||||||
|
GError **error)
|
||||||
|
@@ -851,60 +853,70 @@ _gdm_display_set_x11_cookie (GdmDisplay *self,
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
g_free (priv->x11_cookie);
|
||||||
|
priv->x11_cookie = g_strdup (x11_cookie);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_gdm_display_set_is_local (GdmDisplay *self,
|
||||||
|
gboolean is_local)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
g_debug ("GdmDisplay: local: %s", is_local? "yes" : "no");
|
||||||
|
priv->is_local = is_local;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_gdm_display_set_session_registered (GdmDisplay *self,
|
||||||
|
gboolean registered)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
g_debug ("GdmDisplay: session registered: %s", registered? "yes" : "no");
|
||||||
|
priv->session_registered = registered;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+_gdm_display_set_shutting_down (GdmDisplay *self,
|
||||||
|
+ gboolean shutting_down)
|
||||||
|
+{
|
||||||
|
+ GdmDisplayPrivate *priv;
|
||||||
|
+
|
||||||
|
+ priv = gdm_display_get_instance_private (self);
|
||||||
|
+ priv->shutting_down = shutting_down;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
_gdm_display_set_launch_environment (GdmDisplay *self,
|
||||||
|
GdmLaunchEnvironment *launch_environment)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
|
||||||
|
g_clear_object (&priv->launch_environment);
|
||||||
|
|
||||||
|
priv->launch_environment = g_object_ref (launch_environment);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_gdm_display_set_is_initial (GdmDisplay *self,
|
||||||
|
gboolean initial)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
g_debug ("GdmDisplay: initial: %s", initial? "yes" : "no");
|
||||||
|
priv->is_initial = initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_gdm_display_set_allow_timed_login (GdmDisplay *self,
|
||||||
|
gboolean allow_timed_login)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
@@ -962,60 +974,63 @@ gdm_display_set_property (GObject *object,
|
||||||
|
case PROP_REMOTE_HOSTNAME:
|
||||||
|
_gdm_display_set_remote_hostname (self, g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
case PROP_X11_DISPLAY_NUMBER:
|
||||||
|
_gdm_display_set_x11_display_number (self, g_value_get_int (value));
|
||||||
|
break;
|
||||||
|
case PROP_X11_DISPLAY_NAME:
|
||||||
|
_gdm_display_set_x11_display_name (self, g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
case PROP_X11_COOKIE:
|
||||||
|
_gdm_display_set_x11_cookie (self, g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
case PROP_IS_LOCAL:
|
||||||
|
_gdm_display_set_is_local (self, g_value_get_boolean (value));
|
||||||
|
break;
|
||||||
|
case PROP_ALLOW_TIMED_LOGIN:
|
||||||
|
_gdm_display_set_allow_timed_login (self, g_value_get_boolean (value));
|
||||||
|
break;
|
||||||
|
case PROP_LAUNCH_ENVIRONMENT:
|
||||||
|
_gdm_display_set_launch_environment (self, g_value_get_object (value));
|
||||||
|
break;
|
||||||
|
case PROP_IS_INITIAL:
|
||||||
|
_gdm_display_set_is_initial (self, g_value_get_boolean (value));
|
||||||
|
break;
|
||||||
|
case PROP_SESSION_REGISTERED:
|
||||||
|
_gdm_display_set_session_registered (self, g_value_get_boolean (value));
|
||||||
|
break;
|
||||||
|
case PROP_SUPPORTED_SESSION_TYPES:
|
||||||
|
_gdm_display_set_supported_session_types (self, g_value_get_boxed (value));
|
||||||
|
break;
|
||||||
|
+ case PROP_SHUTTING_DOWN:
|
||||||
|
+ _gdm_display_set_shutting_down (self, g_value_get_boolean (value));
|
||||||
|
+ break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_display_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GdmDisplay *self;
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
self = GDM_DISPLAY (object);
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_ID:
|
||||||
|
g_value_set_string (value, priv->id);
|
||||||
|
break;
|
||||||
|
case PROP_STATUS:
|
||||||
|
g_value_set_int (value, priv->status);
|
||||||
|
break;
|
||||||
|
case PROP_SEAT_ID:
|
||||||
|
g_value_set_string (value, priv->seat_id);
|
||||||
|
break;
|
||||||
|
case PROP_SESSION_ID:
|
||||||
|
g_value_set_string (value, priv->session_id);
|
||||||
|
@@ -1043,60 +1058,63 @@ gdm_display_get_property (GObject *object,
|
||||||
|
priv->access_file?
|
||||||
|
gdm_display_access_file_get_path (priv->access_file) : NULL);
|
||||||
|
break;
|
||||||
|
case PROP_IS_LOCAL:
|
||||||
|
g_value_set_boolean (value, priv->is_local);
|
||||||
|
break;
|
||||||
|
case PROP_IS_CONNECTED:
|
||||||
|
g_value_set_boolean (value, priv->xcb_connection != NULL);
|
||||||
|
break;
|
||||||
|
case PROP_LAUNCH_ENVIRONMENT:
|
||||||
|
g_value_set_object (value, priv->launch_environment);
|
||||||
|
break;
|
||||||
|
case PROP_IS_INITIAL:
|
||||||
|
g_value_set_boolean (value, priv->is_initial);
|
||||||
|
break;
|
||||||
|
case PROP_HAVE_EXISTING_USER_ACCOUNTS:
|
||||||
|
g_value_set_boolean (value, priv->have_existing_user_accounts);
|
||||||
|
break;
|
||||||
|
case PROP_DOING_INITIAL_SETUP:
|
||||||
|
g_value_set_boolean (value, priv->doing_initial_setup);
|
||||||
|
break;
|
||||||
|
case PROP_SESSION_REGISTERED:
|
||||||
|
g_value_set_boolean (value, priv->session_registered);
|
||||||
|
break;
|
||||||
|
case PROP_ALLOW_TIMED_LOGIN:
|
||||||
|
g_value_set_boolean (value, priv->allow_timed_login);
|
||||||
|
break;
|
||||||
|
case PROP_SUPPORTED_SESSION_TYPES:
|
||||||
|
g_value_set_boxed (value, priv->supported_session_types);
|
||||||
|
break;
|
||||||
|
+ case PROP_SHUTTING_DOWN:
|
||||||
|
+ g_value_set_boolean (value, priv->shutting_down);
|
||||||
|
+ break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
handle_get_id (GdmDBusDisplay *skeleton,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
char *id;
|
||||||
|
|
||||||
|
gdm_display_get_id (self, &id, NULL);
|
||||||
|
|
||||||
|
gdm_dbus_display_complete_get_id (skeleton, invocation, id);
|
||||||
|
|
||||||
|
g_free (id);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
handle_get_remote_hostname (GdmDBusDisplay *skeleton,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
char *hostname;
|
||||||
|
|
||||||
|
gdm_display_get_remote_hostname (self, &hostname, NULL);
|
||||||
|
|
||||||
|
@@ -1397,60 +1415,68 @@ gdm_display_class_init (GdmDisplayClass *klass)
|
||||||
|
g_param_spec_boolean ("session-registered",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_LAUNCH_ENVIRONMENT,
|
||||||
|
g_param_spec_object ("launch-environment",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
GDM_TYPE_LAUNCH_ENVIRONMENT,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_STATUS,
|
||||||
|
g_param_spec_int ("status",
|
||||||
|
"status",
|
||||||
|
"status",
|
||||||
|
-1,
|
||||||
|
G_MAXINT,
|
||||||
|
GDM_DISPLAY_UNMANAGED,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_SUPPORTED_SESSION_TYPES,
|
||||||
|
g_param_spec_boxed ("supported-session-types",
|
||||||
|
"supported session types",
|
||||||
|
"supported session types",
|
||||||
|
G_TYPE_STRV,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||||
|
+
|
||||||
|
+ g_object_class_install_property (object_class,
|
||||||
|
+ PROP_SHUTTING_DOWN,
|
||||||
|
+ g_param_spec_boolean ("shutting-down",
|
||||||
|
+ NULL,
|
||||||
|
+ NULL,
|
||||||
|
+ FALSE,
|
||||||
|
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_display_init (GdmDisplay *self)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
|
||||||
|
priv->creation_time = time (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_display_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GdmDisplay *self;
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (object != NULL);
|
||||||
|
g_return_if_fail (GDM_IS_DISPLAY (object));
|
||||||
|
|
||||||
|
self = GDM_DISPLAY (object);
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
|
||||||
|
g_return_if_fail (priv != NULL);
|
||||||
|
|
||||||
|
g_debug ("GdmDisplay: Finalizing display: %s", priv->id);
|
||||||
|
g_free (priv->id);
|
||||||
|
g_free (priv->seat_id);
|
||||||
|
g_free (priv->session_class);
|
||||||
|
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||||
|
index c70248f3..05851001 100644
|
||||||
|
--- a/daemon/gdm-manager.c
|
||||||
|
+++ b/daemon/gdm-manager.c
|
||||||
|
@@ -2759,117 +2759,120 @@ gdm_manager_init (GdmManager *manager)
|
||||||
|
NULL,
|
||||||
|
(GDestroyNotify)
|
||||||
|
g_object_unref);
|
||||||
|
manager->priv->transient_sessions = g_hash_table_new_full (NULL,
|
||||||
|
NULL,
|
||||||
|
(GDestroyNotify)
|
||||||
|
NULL,
|
||||||
|
(GDestroyNotify)
|
||||||
|
g_object_unref);
|
||||||
|
g_signal_connect (G_OBJECT (manager->priv->display_store),
|
||||||
|
"display-added",
|
||||||
|
G_CALLBACK (on_display_added),
|
||||||
|
manager);
|
||||||
|
|
||||||
|
g_signal_connect (G_OBJECT (manager->priv->display_store),
|
||||||
|
"display-removed",
|
||||||
|
G_CALLBACK (on_display_removed),
|
||||||
|
manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
unexport_display (const char *id,
|
||||||
|
GdmDisplay *display,
|
||||||
|
GdmManager *manager)
|
||||||
|
{
|
||||||
|
if (!g_dbus_connection_is_closed (manager->priv->connection))
|
||||||
|
g_dbus_object_manager_server_unexport (manager->priv->object_manager, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
-finish_display (const char *id,
|
||||||
|
- GdmDisplay *display,
|
||||||
|
- GdmManager *manager)
|
||||||
|
+shut_down_display (const char *id,
|
||||||
|
+ GdmDisplay *display,
|
||||||
|
+ GdmManager *manager)
|
||||||
|
{
|
||||||
|
gdm_display_stop_greeter_session (display);
|
||||||
|
+
|
||||||
|
+ g_object_set (G_OBJECT (display), "shutting-down", TRUE, NULL);
|
||||||
|
+
|
||||||
|
if (gdm_display_get_status (display) == GDM_DISPLAY_MANAGED)
|
||||||
|
gdm_display_unmanage (display);
|
||||||
|
gdm_display_finish (display);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_manager_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
GdmManager *manager;
|
||||||
|
|
||||||
|
g_return_if_fail (object != NULL);
|
||||||
|
g_return_if_fail (GDM_IS_MANAGER (object));
|
||||||
|
|
||||||
|
manager = GDM_MANAGER (object);
|
||||||
|
|
||||||
|
g_return_if_fail (manager->priv != NULL);
|
||||||
|
|
||||||
|
gdm_manager_stop (manager);
|
||||||
|
|
||||||
|
g_clear_weak_pointer (&manager->priv->automatic_login_display);
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBXDMCP
|
||||||
|
g_clear_object (&manager->priv->xdmcp_factory);
|
||||||
|
#endif
|
||||||
|
g_clear_object (&manager->priv->local_factory);
|
||||||
|
g_clear_pointer (&manager->priv->open_reauthentication_requests,
|
||||||
|
g_hash_table_unref);
|
||||||
|
g_clear_pointer (&manager->priv->transient_sessions,
|
||||||
|
g_hash_table_unref);
|
||||||
|
|
||||||
|
g_list_foreach (manager->priv->user_sessions,
|
||||||
|
(GFunc) gdm_session_close,
|
||||||
|
NULL);
|
||||||
|
g_list_free_full (manager->priv->user_sessions, (GDestroyNotify) g_object_unref);
|
||||||
|
manager->priv->user_sessions = NULL;
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (manager->priv->display_store),
|
||||||
|
G_CALLBACK (on_display_added),
|
||||||
|
manager);
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (manager->priv->display_store),
|
||||||
|
G_CALLBACK (on_display_removed),
|
||||||
|
manager);
|
||||||
|
|
||||||
|
if (!g_dbus_connection_is_closed (manager->priv->connection)) {
|
||||||
|
gdm_display_store_foreach (manager->priv->display_store,
|
||||||
|
(GdmDisplayStoreFunc)unexport_display,
|
||||||
|
manager);
|
||||||
|
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager));
|
||||||
|
}
|
||||||
|
|
||||||
|
gdm_display_store_foreach (manager->priv->display_store,
|
||||||
|
- (GdmDisplayStoreFunc) finish_display,
|
||||||
|
+ (GdmDisplayStoreFunc) shut_down_display,
|
||||||
|
manager);
|
||||||
|
|
||||||
|
gdm_display_store_clear (manager->priv->display_store);
|
||||||
|
|
||||||
|
g_dbus_object_manager_server_set_connection (manager->priv->object_manager, NULL);
|
||||||
|
|
||||||
|
g_clear_object (&manager->priv->connection);
|
||||||
|
g_clear_object (&manager->priv->object_manager);
|
||||||
|
g_clear_object (&manager->priv->display_store);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gdm_manager_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
GdmManager *
|
||||||
|
gdm_manager_new (void)
|
||||||
|
{
|
||||||
|
if (manager_object != NULL) {
|
||||||
|
g_object_ref (manager_object);
|
||||||
|
} else {
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
|
manager_object = g_object_new (GDM_TYPE_MANAGER, NULL);
|
||||||
|
g_object_add_weak_pointer (manager_object,
|
||||||
|
(gpointer *) &manager_object);
|
||||||
|
res = register_manager (manager_object);
|
||||||
|
if (! res) {
|
||||||
|
g_object_unref (manager_object);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.37.0.rc1
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
From 7084aea50bdc16ccecb4474ca79403429e79ec0e Mon Sep 17 00:00:00 2001
|
From ff689b18fd0a5fd03e5941723cb2adff3b7e4b24 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Wed, 29 Sep 2021 11:03:41 -0400
|
Date: Wed, 29 Sep 2021 11:03:41 -0400
|
||||||
Subject: [PATCH 3/5] daemon: Infer session type from desktop file if user has
|
Subject: [PATCH] daemon: Infer session type from desktop file if user has no
|
||||||
no saved session type
|
saved session type
|
||||||
|
|
||||||
The accountsservice user cache file can specify a session type
|
The accountsservice user cache file can specify a session type
|
||||||
associated with the saved session. This is optional though. If one
|
associated with the saved session. This is optional though. If one
|
||||||
@ -16,10 +16,10 @@ It was failing to do the latter, though. This commit fixes that.
|
|||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
||||||
index b54687d5..a65fa0f9 100644
|
index 29459346..72afe7b2 100644
|
||||||
--- a/daemon/gdm-session.c
|
--- a/daemon/gdm-session.c
|
||||||
+++ b/daemon/gdm-session.c
|
+++ b/daemon/gdm-session.c
|
||||||
@@ -1009,60 +1009,62 @@ worker_on_saved_language_name_read (GdmDBusWorker *worker,
|
@@ -988,60 +988,62 @@ worker_on_saved_language_name_read (GdmDBusWorker *worker,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ index b54687d5..a65fa0f9 100644
|
|||||||
{
|
{
|
||||||
GdmSession *self = conversation->session;
|
GdmSession *self = conversation->session;
|
||||||
|
|
||||||
if (! get_session_command_for_name (self, session_name, self->saved_session_type, NULL)) {
|
if (! get_session_command_for_name (self, session_name, NULL)) {
|
||||||
/* ignore sessions that don't exist */
|
/* ignore sessions that don't exist */
|
||||||
g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name);
|
g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name);
|
||||||
g_free (self->saved_session);
|
g_free (self->saved_session);
|
||||||
@ -56,17 +56,6 @@ index b54687d5..a65fa0f9 100644
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
worker_on_saved_session_type_read (GdmDBusWorker *worker,
|
|
||||||
const char *session_type,
|
|
||||||
GdmSessionConversation *conversation)
|
|
||||||
{
|
|
||||||
GdmSession *self = conversation->session;
|
|
||||||
|
|
||||||
g_free (self->saved_session_type);
|
|
||||||
self->saved_session_type = g_strdup (session_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GdmSessionConversation *
|
static GdmSessionConversation *
|
||||||
find_conversation_by_pid (GdmSession *self,
|
find_conversation_by_pid (GdmSession *self,
|
||||||
GPid pid)
|
GPid pid)
|
||||||
@ -82,6 +71,17 @@ index b54687d5..a65fa0f9 100644
|
|||||||
|
|
||||||
if (conversation->worker_pid == pid) {
|
if (conversation->worker_pid == pid) {
|
||||||
return conversation;
|
return conversation;
|
||||||
--
|
}
|
||||||
2.34.1
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
allow_worker_function (GDBusAuthObserver *observer,
|
||||||
|
GIOStream *stream,
|
||||||
|
GCredentials *credentials,
|
||||||
|
GdmSession *self)
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From aa1c4a7708df2edbc12f2ada7249208aef586d1e Mon Sep 17 00:00:00 2001
|
From cebcf2a4d29f01061dedf8714db2842b9582900c Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
Date: Tue, 8 Jun 2021 20:45:00 +0200
|
Date: Tue, 8 Jun 2021 20:45:00 +0200
|
||||||
Subject: [PATCH] data: Disable network configuration on login screen
|
Subject: [PATCH 1/3] data: Disable network configuration on login screen
|
||||||
|
|
||||||
---
|
---
|
||||||
data/meson.build | 10 ++++++++++
|
data/meson.build | 10 ++++++++++
|
||||||
@ -10,17 +10,17 @@ Subject: [PATCH] data: Disable network configuration on login screen
|
|||||||
create mode 100644 data/org.gnome.gdm.rules.in
|
create mode 100644 data/org.gnome.gdm.rules.in
|
||||||
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
diff --git a/data/meson.build b/data/meson.build
|
||||||
index 7c5222ea..20d39a36 100644
|
index 23e2d7f9f..cbd6a6a21 100644
|
||||||
--- a/data/meson.build
|
--- a/data/meson.build
|
||||||
+++ b/data/meson.build
|
+++ b/data/meson.build
|
||||||
@@ -130,60 +130,70 @@ pam_data_files_map = {
|
@@ -131,60 +131,70 @@ pam_data_files_map = {
|
||||||
],
|
|
||||||
'arch': [
|
'arch': [
|
||||||
'gdm-autologin',
|
'gdm-autologin',
|
||||||
'gdm-launch-environment',
|
'gdm-launch-environment',
|
||||||
'gdm-fingerprint',
|
'gdm-fingerprint',
|
||||||
'gdm-smartcard',
|
'gdm-smartcard',
|
||||||
'gdm-password',
|
'gdm-password',
|
||||||
|
'gdm-pin',
|
||||||
],
|
],
|
||||||
'none': [],
|
'none': [],
|
||||||
# We should no longer have 'autodetect' at this point
|
# We should no longer have 'autodetect' at this point
|
||||||
@ -86,7 +86,7 @@ index 7c5222ea..20d39a36 100644
|
|||||||
format: 'cmake'
|
format: 'cmake'
|
||||||
diff --git a/data/org.gnome.gdm.rules.in b/data/org.gnome.gdm.rules.in
|
diff --git a/data/org.gnome.gdm.rules.in b/data/org.gnome.gdm.rules.in
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..09544f11
|
index 000000000..09544f11e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/data/org.gnome.gdm.rules.in
|
+++ b/data/org.gnome.gdm.rules.in
|
||||||
@@ -0,0 +1,8 @@
|
@@ -0,0 +1,8 @@
|
||||||
@ -99,5 +99,5 @@ index 00000000..09544f11
|
|||||||
+ return polkit.Result.NOT_HANDLED;
|
+ return polkit.Result.NOT_HANDLED;
|
||||||
+});
|
+});
|
||||||
--
|
--
|
||||||
2.32.0
|
2.30.1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 3e62d7b423175102bd2376adc9cf58ad736b23b0 Mon Sep 17 00:00:00 2001
|
From 8c9fe8ebd9e584adaec0a80ee4c4eaf5357422a5 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Wed, 31 Jul 2013 17:32:55 -0400
|
Date: Wed, 31 Jul 2013 17:32:55 -0400
|
||||||
Subject: [PATCH] data: add system dconf databases to gdm profile
|
Subject: [PATCH 1/2] data: add system dconf databases to gdm profile
|
||||||
|
|
||||||
This way system settings can affect the login screen.
|
This way system settings can affect the login screen.
|
||||||
---
|
---
|
||||||
@ -9,7 +9,7 @@ This way system settings can affect the login screen.
|
|||||||
1 file changed, 4 insertions(+)
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
diff --git a/data/dconf/gdm.in b/data/dconf/gdm.in
|
diff --git a/data/dconf/gdm.in b/data/dconf/gdm.in
|
||||||
index 4d8bf174..9694078f 100644
|
index 4d8bf1748..9694078fb 100644
|
||||||
--- a/data/dconf/gdm.in
|
--- a/data/dconf/gdm.in
|
||||||
+++ b/data/dconf/gdm.in
|
+++ b/data/dconf/gdm.in
|
||||||
@@ -1,2 +1,6 @@
|
@@ -1,2 +1,6 @@
|
||||||
@ -20,5 +20,5 @@ index 4d8bf174..9694078f 100644
|
|||||||
+system-db:distro
|
+system-db:distro
|
||||||
file-db:@DATADIR@/@PACKAGE@/greeter-dconf-defaults
|
file-db:@DATADIR@/@PACKAGE@/greeter-dconf-defaults
|
||||||
--
|
--
|
||||||
2.32.0
|
2.30.1
|
||||||
|
|
||||||
|
63
SOURCES/0001-data-disable-wayland-on-certain-hardware.patch
Normal file
63
SOURCES/0001-data-disable-wayland-on-certain-hardware.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
From e01c0894669f5fe3d1a1c4148b7507e61b95d035 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Mon, 11 Feb 2019 18:14:07 -0500
|
||||||
|
Subject: [PATCH] data: disable wayland on certain hardware
|
||||||
|
|
||||||
|
We're having issues with wayland on passthrough to virt
|
||||||
|
setups and with the vendor nvidia driver on hybrid graphics
|
||||||
|
setups, so disable it in those cases.
|
||||||
|
|
||||||
|
Also disable it on server chips for performance reasons.
|
||||||
|
---
|
||||||
|
data/61-gdm.rules.in | 39 +++++++++++++++++++++++++++++++++++----
|
||||||
|
1 file changed, 35 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
|
||||||
|
index b1da191f..d599a146 100644
|
||||||
|
--- a/data/61-gdm.rules.in
|
||||||
|
+++ b/data/61-gdm.rules.in
|
||||||
|
@@ -1,6 +1,37 @@
|
||||||
|
# disable Wayland on Hi1710 chipsets
|
||||||
|
-ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
||||||
|
-# disable Wayland when using the proprietary nvidia driver
|
||||||
|
-DRIVER=="nvidia", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
||||||
|
+ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+
|
||||||
|
+# disable Wayland on Matrox chipsets
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0522", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0524", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0530", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0532", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0533", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0534", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0536", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x102b", ATTR{device}=="0x0538", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+
|
||||||
|
+# disable Wayland on aspeed chipsets
|
||||||
|
+ATTR{vendor}=="0x1a03", ATTR{device}=="0x2010", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ATTR{vendor}=="0x1a03", ATTR{device}=="0x2000", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+
|
||||||
|
+# disable Wayland on hybrid systems with vendor nvidia driver
|
||||||
|
+# default to Xorg on single gpu vendor nvidia systems
|
||||||
|
+DRIVER=="nvidia", ENV{GDM_HAS_VENDOR_NVIDIA_DRIVER}="1"
|
||||||
|
+DRIVER=="nvidia", RUN+="@libexecdir@/gdm-runtime-config set daemon PreferredDisplayServer xorg"
|
||||||
|
+SUBSYSTEM=="drm", KERNEL=="card[1-9]*", ENV{GDM_HAS_NVIDIA_DRIVER}=="1", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+ACTION=="add", SUBSYSTEM=="module", KERNEL=="nvidia_drm", ATTR{parameters/modeset}=="N", RUN+="/usr/libexec/gdm-disable-wayland"
|
||||||
|
+
|
||||||
|
+# disable Wayland on HyperV guests
|
||||||
|
+DRIVER=="hyperv_fb", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+
|
||||||
|
+# disable Wayland on passthrough graphics setups for now (assumes passthrough if
|
||||||
|
+# there is more than one card, and one of the cards is virt: cirrus, bochs, qxl)
|
||||||
|
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
|
||||||
|
+ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
|
||||||
|
+ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", ENV{GDM_HAS_VIRTUAL_GPU}="1"
|
||||||
|
+
|
||||||
|
+SUBSYSTEM=="drm", KERNEL=="card[1-9]*", ENV{GDM_HAS_VIRTUAL_GPU}=="1", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
+
|
||||||
|
# disable Wayland if modesetting is disabled
|
||||||
|
-IMPORT{cmdline}="nomodeset", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
||||||
|
+IMPORT{cmdline}="nomodeset", RUN+="@libexecdir@/gdm-disable-wayland"
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From a4743b9b2b355f84da3904e7da93ec3c7a521895 Mon Sep 17 00:00:00 2001
|
From 7f910ee7554703a2e775e73ace10ced5d7a0fe66 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Fri, 26 Jul 2019 14:06:16 -0400
|
Date: Fri, 26 Jul 2019 14:06:16 -0400
|
||||||
Subject: [PATCH] data: reap gdm sessions on shutdown
|
Subject: [PATCH] data: reap gdm sessions on shutdown
|
||||||
@ -12,7 +12,7 @@ lingering after the orderly shutdown.
|
|||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
diff --git a/data/gdm.service.in b/data/gdm.service.in
|
diff --git a/data/gdm.service.in b/data/gdm.service.in
|
||||||
index 17e8a8de..195bd0fd 100644
|
index 17e8a8de8..195bd0fdc 100644
|
||||||
--- a/data/gdm.service.in
|
--- a/data/gdm.service.in
|
||||||
+++ b/data/gdm.service.in
|
+++ b/data/gdm.service.in
|
||||||
@@ -1,33 +1,34 @@
|
@@ -1,33 +1,34 @@
|
||||||
@ -51,5 +51,5 @@ index 17e8a8de..195bd0fd 100644
|
|||||||
[Install]
|
[Install]
|
||||||
Alias=display-manager.service
|
Alias=display-manager.service
|
||||||
--
|
--
|
||||||
2.32.0
|
2.28.0
|
||||||
|
|
||||||
|
@ -0,0 +1,155 @@
|
|||||||
|
From cbfb3ef99ecc9cbb4e6850e5dd0cc9fb65dd398a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Tue, 1 Sep 2020 13:49:27 -0400
|
||||||
|
Subject: [PATCH 1/3] display: Handle failure before display registration
|
||||||
|
|
||||||
|
Normally, e.g., gdm-wayland-session would register its display
|
||||||
|
before starting the session. This display registration is how
|
||||||
|
the display moves to the "managed" state. We currently detect
|
||||||
|
session failure in gdm_display_unmanage. If gdm-wayland-session
|
||||||
|
is killed before it registers the display, gdm_display_unmanage
|
||||||
|
won't run, and failure won't be detected.
|
||||||
|
|
||||||
|
This commit make gdm_display_unmanage get called, even if the
|
||||||
|
display isn't yet fully managed.
|
||||||
|
---
|
||||||
|
daemon/gdm-display.c | 8 +++-----
|
||||||
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
|
||||||
|
index 7c954ad24..3a260923a 100644
|
||||||
|
--- a/daemon/gdm-display.c
|
||||||
|
+++ b/daemon/gdm-display.c
|
||||||
|
@@ -648,62 +648,60 @@ gdm_display_disconnect (GdmDisplay *self)
|
||||||
|
|
||||||
|
/* resource_id_mask is the bits given to each client for
|
||||||
|
* addressing resources */
|
||||||
|
highest_client = (XID) ~unused_bits & ~setup->resource_id_mask;
|
||||||
|
client_increment = setup->resource_id_mask + 1;
|
||||||
|
|
||||||
|
/* Kill every client but ourselves, then close our own connection
|
||||||
|
*/
|
||||||
|
for (client = 0;
|
||||||
|
client <= highest_client;
|
||||||
|
client += client_increment) {
|
||||||
|
|
||||||
|
if (client != setup->resource_id_base)
|
||||||
|
xcb_kill_client (priv->xcb_connection, client);
|
||||||
|
}
|
||||||
|
|
||||||
|
xcb_flush (priv->xcb_connection);
|
||||||
|
|
||||||
|
g_clear_pointer (&priv->xcb_connection, xcb_disconnect);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_display_unmanage (GdmDisplay *self)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE);
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
|
||||||
|
- g_debug ("GdmDisplay: unmanage display");
|
||||||
|
-
|
||||||
|
gdm_display_disconnect (self);
|
||||||
|
|
||||||
|
if (priv->user_access_file != NULL) {
|
||||||
|
gdm_display_access_file_close (priv->user_access_file);
|
||||||
|
g_object_unref (priv->user_access_file);
|
||||||
|
priv->user_access_file = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->access_file != NULL) {
|
||||||
|
gdm_display_access_file_close (priv->access_file);
|
||||||
|
g_object_unref (priv->access_file);
|
||||||
|
priv->access_file = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!priv->session_registered) {
|
||||||
|
g_warning ("GdmDisplay: Session never registered, failing");
|
||||||
|
_gdm_display_set_status (self, GDM_DISPLAY_FAILED);
|
||||||
|
} else {
|
||||||
|
_gdm_display_set_status (self, GDM_DISPLAY_UNMANAGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_display_get_id (GdmDisplay *self,
|
||||||
|
char **id,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
@@ -1446,63 +1444,63 @@ gdm_display_get_object_skeleton (GdmDisplay *self)
|
||||||
|
{
|
||||||
|
GdmDisplayPrivate *priv;
|
||||||
|
|
||||||
|
priv = gdm_display_get_instance_private (self);
|
||||||
|
return priv->object_skeleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_launch_environment_session_opened (GdmLaunchEnvironment *launch_environment,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
char *session_id;
|
||||||
|
|
||||||
|
g_debug ("GdmDisplay: Greeter session opened");
|
||||||
|
session_id = gdm_launch_environment_get_session_id (launch_environment);
|
||||||
|
_gdm_display_set_session_id (self, session_id);
|
||||||
|
g_free (session_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_launch_environment_session_started (GdmLaunchEnvironment *launch_environment,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
g_debug ("GdmDisplay: Greeter started");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
self_destruct (GdmDisplay *self)
|
||||||
|
{
|
||||||
|
g_object_ref (self);
|
||||||
|
- if (gdm_display_get_status (self) == GDM_DISPLAY_MANAGED) {
|
||||||
|
- gdm_display_unmanage (self);
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ g_debug ("GdmDisplay: initiating display self-destruct");
|
||||||
|
+ gdm_display_unmanage (self);
|
||||||
|
|
||||||
|
if (gdm_display_get_status (self) != GDM_DISPLAY_FINISHED) {
|
||||||
|
queue_finish (self);
|
||||||
|
}
|
||||||
|
g_object_unref (self);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_launch_environment_session_stopped (GdmLaunchEnvironment *launch_environment,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
g_debug ("GdmDisplay: Greeter stopped");
|
||||||
|
self_destruct (self);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_launch_environment_session_exited (GdmLaunchEnvironment *launch_environment,
|
||||||
|
int code,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
g_debug ("GdmDisplay: Greeter exited: %d", code);
|
||||||
|
self_destruct (self);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_launch_environment_session_died (GdmLaunchEnvironment *launch_environment,
|
||||||
|
int signal,
|
||||||
|
GdmDisplay *self)
|
||||||
|
{
|
||||||
|
g_debug ("GdmDisplay: Greeter died: %d", signal);
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From 9261fcd05667fc5f8b81880577e41a566db821a8 Mon Sep 17 00:00:00 2001
|
From d8fd8d4d6ff6a119f6bd27eb07316384c4776d12 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Wed, 15 Sep 2021 11:23:17 -0400
|
Date: Wed, 15 Sep 2021 11:23:17 -0400
|
||||||
Subject: [PATCH] local-display-factory: Don't try to respawn displays on
|
Subject: [PATCH] local-display-factory: Don't try to respawn displays on
|
||||||
@ -18,7 +18,7 @@ path.
|
|||||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
||||||
index 141d64c6..bca41f6e 100644
|
index 11dcda2c..a0884893 100644
|
||||||
--- a/daemon/gdm-local-display-factory.c
|
--- a/daemon/gdm-local-display-factory.c
|
||||||
+++ b/daemon/gdm-local-display-factory.c
|
+++ b/daemon/gdm-local-display-factory.c
|
||||||
@@ -46,60 +46,62 @@
|
@@ -46,60 +46,62 @@
|
||||||
@ -84,7 +84,7 @@ index 141d64c6..bca41f6e 100644
|
|||||||
{
|
{
|
||||||
static GQuark ret = 0;
|
static GQuark ret = 0;
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@@ -416,60 +418,64 @@ on_session_registered_cb (GObject *gobject,
|
@@ -478,60 +480,64 @@ on_session_registered_cb (GObject *gobject,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ index 141d64c6..bca41f6e 100644
|
|||||||
*/
|
*/
|
||||||
if (is_local && g_strcmp0 (session_class, "greeter") != 0) {
|
if (is_local && g_strcmp0 (session_class, "greeter") != 0) {
|
||||||
/* reset num failures */
|
/* reset num failures */
|
||||||
@@ -1204,99 +1210,102 @@ on_display_added (GdmDisplayStore *display_store,
|
@@ -1250,99 +1256,102 @@ on_display_added (GdmDisplayStore *display_store,
|
||||||
|
|
||||||
display = gdm_display_store_lookup (display_store, id);
|
display = gdm_display_store_lookup (display_store, id);
|
||||||
|
|
||||||
@ -254,10 +254,10 @@ index 141d64c6..bca41f6e 100644
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||||
index 4c2752fe..cc61efc9 100644
|
index b3d0a2b5..4b62b8b1 100644
|
||||||
--- a/daemon/gdm-manager.c
|
--- a/daemon/gdm-manager.c
|
||||||
+++ b/daemon/gdm-manager.c
|
+++ b/daemon/gdm-manager.c
|
||||||
@@ -2741,60 +2741,62 @@ unexport_display (const char *id,
|
@@ -2774,60 +2774,62 @@ unexport_display (const char *id,
|
||||||
GdmDisplay *display,
|
GdmDisplay *display,
|
||||||
GdmManager *manager)
|
GdmManager *manager)
|
||||||
{
|
{
|
||||||
@ -321,5 +321,5 @@ index 4c2752fe..cc61efc9 100644
|
|||||||
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager));
|
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager));
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.32.0
|
2.31.1
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,729 +0,0 @@
|
|||||||
From e5b3467412874d27c311253e3d5d7e65a61d12a4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Tue, 1 Mar 2022 13:25:02 -0500
|
|
||||||
Subject: [PATCH 1/4] local-display-factory: Stall startup until main graphics
|
|
||||||
card is ready
|
|
||||||
|
|
||||||
At the moment, GDM waits until systemd says the system supports
|
|
||||||
graphics (via the CanGraphical logind property).
|
|
||||||
|
|
||||||
Unfortunately, this property isn't really what we need, since it flips
|
|
||||||
to true when *any* graphics are available, not when the main graphics
|
|
||||||
for the system are ready.
|
|
||||||
|
|
||||||
This is a problem on hybrid graphics systems, if one card is slower to
|
|
||||||
load than another. In particular, the vendor nvidia driver can be slow
|
|
||||||
to load because it has multiple kernel modules it loads in series.
|
|
||||||
|
|
||||||
Indeed on fast systems, that use the vendor nvidia driver, it's not
|
|
||||||
unusual for boot to get to a point where all of userspace up to and
|
|
||||||
including GDM is executed before the graphics are ready to go.
|
|
||||||
|
|
||||||
This commit tries to mitigate the situation by adding an additional,
|
|
||||||
check aside from CanGraphical to test if the system is ready.
|
|
||||||
|
|
||||||
This check waits for the graphics card associated with boot to be fully
|
|
||||||
up and running before proceeding to start a login screen.
|
|
||||||
|
|
||||||
Closes: https://gitlab.gnome.org/GNOME/gdm/-/issues/763
|
|
||||||
---
|
|
||||||
daemon/gdm-local-display-factory.c | 164 ++++++++++++++++++++++++++---
|
|
||||||
daemon/meson.build | 4 +
|
|
||||||
meson.build | 2 +
|
|
||||||
4 files changed, 159 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
|
||||||
index c00e1c47..0b1d3482 100644
|
|
||||||
--- a/daemon/gdm-local-display-factory.c
|
|
||||||
+++ b/daemon/gdm-local-display-factory.c
|
|
||||||
@@ -1,100 +1,112 @@
|
|
||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
|
||||||
*
|
|
||||||
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
#include <glib/gi18n.h>
|
|
||||||
#include <glib-object.h>
|
|
||||||
#include <gio/gio.h>
|
|
||||||
|
|
||||||
+#ifdef HAVE_UDEV
|
|
||||||
+#include <gudev/gudev.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <systemd/sd-login.h>
|
|
||||||
|
|
||||||
#include "gdm-common.h"
|
|
||||||
#include "gdm-manager.h"
|
|
||||||
#include "gdm-display-factory.h"
|
|
||||||
#include "gdm-local-display-factory.h"
|
|
||||||
#include "gdm-local-display-factory-glue.h"
|
|
||||||
|
|
||||||
#include "gdm-settings-keys.h"
|
|
||||||
#include "gdm-settings-direct.h"
|
|
||||||
#include "gdm-display-store.h"
|
|
||||||
#include "gdm-local-display.h"
|
|
||||||
#include "gdm-legacy-display.h"
|
|
||||||
|
|
||||||
#define GDM_DBUS_PATH "/org/gnome/DisplayManager"
|
|
||||||
#define GDM_LOCAL_DISPLAY_FACTORY_DBUS_PATH GDM_DBUS_PATH "/LocalDisplayFactory"
|
|
||||||
#define GDM_MANAGER_DBUS_NAME "org.gnome.DisplayManager.LocalDisplayFactory"
|
|
||||||
|
|
||||||
#define MAX_DISPLAY_FAILURES 5
|
|
||||||
#define WAIT_TO_FINISH_TIMEOUT 10 /* seconds */
|
|
||||||
#define SEAT0_GRAPHICS_CHECK_TIMEOUT 10 /* seconds */
|
|
||||||
|
|
||||||
struct _GdmLocalDisplayFactory
|
|
||||||
{
|
|
||||||
- GdmDisplayFactory parent;
|
|
||||||
+ GdmDisplayFactory parent;
|
|
||||||
+#ifdef HAVE_UDEV
|
|
||||||
+ GUdevClient *gudev_client;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
GdmDBusLocalDisplayFactory *skeleton;
|
|
||||||
GDBusConnection *connection;
|
|
||||||
GHashTable *used_display_numbers;
|
|
||||||
|
|
||||||
/* FIXME: this needs to be per seat? */
|
|
||||||
guint num_failures;
|
|
||||||
|
|
||||||
guint seat_new_id;
|
|
||||||
guint seat_removed_id;
|
|
||||||
guint seat_properties_changed_id;
|
|
||||||
|
|
||||||
+ gboolean seat0_has_platform_graphics;
|
|
||||||
+ gboolean seat0_has_boot_up_graphics;
|
|
||||||
+
|
|
||||||
gboolean seat0_graphics_check_timed_out;
|
|
||||||
guint seat0_graphics_check_timeout_id;
|
|
||||||
|
|
||||||
+ gulong uevent_handler_id;
|
|
||||||
+
|
|
||||||
#if defined(ENABLE_USER_DISPLAY_SERVER)
|
|
||||||
unsigned int active_vt;
|
|
||||||
guint active_vt_watch_id;
|
|
||||||
guint wait_to_finish_timeout_id;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gboolean is_started;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_0,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gdm_local_display_factory_class_init (GdmLocalDisplayFactoryClass *klass);
|
|
||||||
static void gdm_local_display_factory_init (GdmLocalDisplayFactory *factory);
|
|
||||||
static void gdm_local_display_factory_finalize (GObject *object);
|
|
||||||
|
|
||||||
static void ensure_display_for_seat (GdmLocalDisplayFactory *factory,
|
|
||||||
const char *seat_id);
|
|
||||||
|
|
||||||
static void on_display_status_changed (GdmDisplay *display,
|
|
||||||
GParamSpec *arg1,
|
|
||||||
GdmLocalDisplayFactory *factory);
|
|
||||||
|
|
||||||
static gboolean gdm_local_display_factory_sync_seats (GdmLocalDisplayFactory *factory);
|
|
||||||
static gpointer local_display_factory_object = NULL;
|
|
||||||
static gboolean lookup_by_session_id (const char *id,
|
|
||||||
GdmDisplay *display,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
@@ -594,142 +606,236 @@ lookup_by_seat_id (const char *id,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
const char *looking_for = user_data;
|
|
||||||
char *current;
|
|
||||||
gboolean res;
|
|
||||||
|
|
||||||
g_object_get (G_OBJECT (display), "seat-id", ¤t, NULL);
|
|
||||||
|
|
||||||
res = g_strcmp0 (current, looking_for) == 0;
|
|
||||||
|
|
||||||
g_free(current);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
lookup_prepared_display_by_seat_id (const char *id,
|
|
||||||
GdmDisplay *display,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
int status;
|
|
||||||
|
|
||||||
status = gdm_display_get_status (display);
|
|
||||||
|
|
||||||
if (status != GDM_DISPLAY_PREPARED)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return lookup_by_seat_id (id, display, user_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifdef HAVE_UDEV
|
|
||||||
+static gboolean
|
|
||||||
+udev_is_settled (GdmLocalDisplayFactory *factory)
|
|
||||||
+{
|
|
||||||
+ g_autoptr (GUdevEnumerator) enumerator = NULL;
|
|
||||||
+ GList *devices;
|
|
||||||
+ GList *node;
|
|
||||||
+
|
|
||||||
+ gboolean is_settled = FALSE;
|
|
||||||
+
|
|
||||||
+ if (factory->seat0_has_platform_graphics) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: udev settled, platform graphics enabled.");
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (factory->seat0_has_boot_up_graphics) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: udev settled, boot up graphics available.");
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (factory->seat0_graphics_check_timed_out) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: udev timed out, proceeding anyway.");
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: Checking if udev has settled enough to support graphics.");
|
|
||||||
+
|
|
||||||
+ enumerator = g_udev_enumerator_new (factory->gudev_client);
|
|
||||||
+
|
|
||||||
+ g_udev_enumerator_add_match_name (enumerator, "card*");
|
|
||||||
+ g_udev_enumerator_add_match_tag (enumerator, "master-of-seat");
|
|
||||||
+ g_udev_enumerator_add_match_subsystem (enumerator, "drm");
|
|
||||||
+
|
|
||||||
+ devices = g_udev_enumerator_execute (enumerator);
|
|
||||||
+ if (!devices) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: udev has no candidate graphics devices available yet.");
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ node = devices;
|
|
||||||
+ while (node != NULL) {
|
|
||||||
+ GUdevDevice *device = node->data;
|
|
||||||
+ GList *next_node = node->next;
|
|
||||||
+ g_autoptr (GUdevDevice) platform_device = NULL;
|
|
||||||
+ g_autoptr (GUdevDevice) pci_device = NULL;
|
|
||||||
+
|
|
||||||
+ platform_device = g_udev_device_get_parent_with_subsystem (device, "platform", NULL);
|
|
||||||
+
|
|
||||||
+ if (platform_device != NULL) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: Found embedded platform graphics, proceeding.");
|
|
||||||
+ factory->seat0_has_platform_graphics = TRUE;
|
|
||||||
+ is_settled = TRUE;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ pci_device = g_udev_device_get_parent_with_subsystem (device, "pci", NULL);
|
|
||||||
+
|
|
||||||
+ if (pci_device != NULL) {
|
|
||||||
+ gboolean boot_vga;
|
|
||||||
+
|
|
||||||
+ boot_vga = g_udev_device_get_sysfs_attr_as_int (pci_device, "boot_vga");
|
|
||||||
+
|
|
||||||
+ if (boot_vga == 1) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: Found primary PCI graphics adapter, proceeding.");
|
|
||||||
+ factory->seat0_has_boot_up_graphics = TRUE;
|
|
||||||
+ is_settled = TRUE;
|
|
||||||
+ break;
|
|
||||||
+ } else {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: Found secondary PCI graphics adapter, not proceeding yet.");
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ node = next_node;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: udev has %ssettled enough for graphics.", is_settled? "" : "not ");
|
|
||||||
+ g_list_free_full (devices, g_object_unref);
|
|
||||||
+
|
|
||||||
+ if (is_settled)
|
|
||||||
+ g_clear_signal_handler (&factory->uevent_handler_id, factory->gudev_client);
|
|
||||||
+
|
|
||||||
+ return is_settled;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
on_seat0_graphics_check_timeout (gpointer user_data)
|
|
||||||
{
|
|
||||||
GdmLocalDisplayFactory *factory = user_data;
|
|
||||||
|
|
||||||
factory->seat0_graphics_check_timeout_id = 0;
|
|
||||||
|
|
||||||
/* Simply try to re-add seat0. If it is there already (i.e. CanGraphical
|
|
||||||
* turned TRUE, then we'll find it and it will not be created again).
|
|
||||||
*/
|
|
||||||
factory->seat0_graphics_check_timed_out = TRUE;
|
|
||||||
ensure_display_for_seat (factory, "seat0");
|
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
ensure_display_for_seat (GdmLocalDisplayFactory *factory,
|
|
||||||
const char *seat_id)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
gboolean seat_supports_graphics;
|
|
||||||
gboolean is_seat0;
|
|
||||||
g_auto (GStrv) session_types = NULL;
|
|
||||||
const char *legacy_session_types[] = { "x11", NULL };
|
|
||||||
GdmDisplayStore *store;
|
|
||||||
GdmDisplay *display = NULL;
|
|
||||||
g_autofree char *login_session_id = NULL;
|
|
||||||
gboolean wayland_enabled = FALSE, xorg_enabled = FALSE;
|
|
||||||
g_autofree gchar *preferred_display_server = NULL;
|
|
||||||
gboolean falling_back = FALSE;
|
|
||||||
+ gboolean waiting_on_udev = FALSE;
|
|
||||||
|
|
||||||
gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled);
|
|
||||||
gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled);
|
|
||||||
|
|
||||||
preferred_display_server = get_preferred_display_server (factory);
|
|
||||||
|
|
||||||
if (g_strcmp0 (preferred_display_server, "none") == 0) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Preferred display server is none, so not creating display");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ret = sd_seat_can_graphical (seat_id);
|
|
||||||
+#ifdef HAVE_UDEV
|
|
||||||
+ waiting_on_udev = !udev_is_settled (factory);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
- if (ret < 0) {
|
|
||||||
- g_critical ("Failed to query CanGraphical information for seat %s", seat_id);
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
+ if (!waiting_on_udev) {
|
|
||||||
+ ret = sd_seat_can_graphical (seat_id);
|
|
||||||
|
|
||||||
- if (ret == 0) {
|
|
||||||
- g_debug ("GdmLocalDisplayFactory: System doesn't currently support graphics");
|
|
||||||
- seat_supports_graphics = FALSE;
|
|
||||||
+ if (ret < 0) {
|
|
||||||
+ g_critical ("Failed to query CanGraphical information for seat %s", seat_id);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (ret == 0) {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: System doesn't currently support graphics");
|
|
||||||
+ seat_supports_graphics = FALSE;
|
|
||||||
+ } else {
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: System supports graphics");
|
|
||||||
+ seat_supports_graphics = TRUE;
|
|
||||||
+ }
|
|
||||||
} else {
|
|
||||||
- g_debug ("GdmLocalDisplayFactory: System supports graphics");
|
|
||||||
- seat_supports_graphics = TRUE;
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: udev is still settling, so not creating display yet");
|
|
||||||
+ seat_supports_graphics = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_strcmp0 (seat_id, "seat0") == 0) {
|
|
||||||
is_seat0 = TRUE;
|
|
||||||
|
|
||||||
falling_back = factory->num_failures > 0;
|
|
||||||
session_types = gdm_local_display_factory_get_session_types (factory, falling_back);
|
|
||||||
|
|
||||||
if (session_types == NULL) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Both Wayland and Xorg are unavailable");
|
|
||||||
seat_supports_graphics = FALSE;
|
|
||||||
} else {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s",
|
|
||||||
session_types[0], falling_back? " fallback" : "");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
is_seat0 = FALSE;
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: New displays on seat %s will use X11 fallback", seat_id);
|
|
||||||
/* Force legacy X11 for all auxiliary seats */
|
|
||||||
seat_supports_graphics = TRUE;
|
|
||||||
session_types = g_strdupv ((char **) legacy_session_types);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For seat0, we have a fallback logic to still try starting it after
|
|
||||||
* SEAT0_GRAPHICS_CHECK_TIMEOUT seconds. i.e. we simply continue even if
|
|
||||||
- * CanGraphical is unset.
|
|
||||||
+ * CanGraphical is unset or udev otherwise never finds a suitable graphics card.
|
|
||||||
* This is ugly, but it means we'll come up eventually in some
|
|
||||||
* scenarios where no master device is present.
|
|
||||||
* Note that we'll force an X11 fallback even though there might be
|
|
||||||
* cases where an wayland capable device is present and simply not marked as
|
|
||||||
* master-of-seat. In these cases, this should likely be fixed in the
|
|
||||||
* udev rules.
|
|
||||||
*
|
|
||||||
* At the moment, systemd always sets CanGraphical for non-seat0 seats.
|
|
||||||
* This is because non-seat0 seats are defined by having master-of-seat
|
|
||||||
* set. This means we can avoid the fallback check for non-seat0 seats,
|
|
||||||
* which simplifies the code.
|
|
||||||
*/
|
|
||||||
if (is_seat0) {
|
|
||||||
if (!seat_supports_graphics) {
|
|
||||||
if (!factory->seat0_graphics_check_timed_out) {
|
|
||||||
if (factory->seat0_graphics_check_timeout_id == 0) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: seat0 doesn't yet support graphics. Waiting %d seconds to try again.", SEAT0_GRAPHICS_CHECK_TIMEOUT);
|
|
||||||
factory->seat0_graphics_check_timeout_id = g_timeout_add_seconds (SEAT0_GRAPHICS_CHECK_TIMEOUT,
|
|
||||||
on_seat0_graphics_check_timeout,
|
|
||||||
factory);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* It is not yet time to force X11 fallback. */
|
|
||||||
g_debug ("GdmLocalDisplayFactory: seat0 display requested when there is no graphics support before graphics check timeout.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Assuming we can use seat0 for X11 even though system says it doesn't support graphics!");
|
|
||||||
@@ -1138,113 +1240,151 @@ on_vt_changed (GIOChannel *source,
|
|
||||||
if (factory->wait_to_finish_timeout_id != 0) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: deferring previous login screen clean up operation");
|
|
||||||
g_source_remove (factory->wait_to_finish_timeout_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
factory->wait_to_finish_timeout_id = g_timeout_add_seconds (WAIT_TO_FINISH_TIMEOUT,
|
|
||||||
(GSourceFunc)
|
|
||||||
on_finish_waiting_for_seat0_displays_timeout,
|
|
||||||
factory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if user jumped back to initial vt and it's empty put a login screen
|
|
||||||
* on it (unless a login screen is already running elsewhere, then
|
|
||||||
* jump to that login screen)
|
|
||||||
*/
|
|
||||||
if (factory->active_vt != GDM_INITIAL_VT) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: active VT is not initial VT, so ignoring");
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: creating new display on seat0 because of VT change");
|
|
||||||
|
|
||||||
ensure_display_for_seat (factory, "seat0");
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifdef HAVE_UDEV
|
|
||||||
+static void
|
|
||||||
+on_uevent (GUdevClient *client,
|
|
||||||
+ const char *action,
|
|
||||||
+ GUdevDevice *device,
|
|
||||||
+ GdmLocalDisplayFactory *factory)
|
|
||||||
+{
|
|
||||||
+ if (!g_udev_device_get_device_file (device))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (g_strcmp0 (action, "add") != 0 &&
|
|
||||||
+ g_strcmp0 (action, "change") != 0)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (!udev_is_settled (factory))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id);
|
|
||||||
+ factory->uevent_handler_id = 0;
|
|
||||||
+
|
|
||||||
+ ensure_display_for_seat (factory, "seat0");
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
gdm_local_display_factory_start_monitor (GdmLocalDisplayFactory *factory)
|
|
||||||
{
|
|
||||||
g_autoptr (GIOChannel) io_channel = NULL;
|
|
||||||
+ const char *subsystems[] = { "drm", NULL };
|
|
||||||
|
|
||||||
factory->seat_new_id = g_dbus_connection_signal_subscribe (factory->connection,
|
|
||||||
"org.freedesktop.login1",
|
|
||||||
"org.freedesktop.login1.Manager",
|
|
||||||
"SeatNew",
|
|
||||||
"/org/freedesktop/login1",
|
|
||||||
NULL,
|
|
||||||
G_DBUS_SIGNAL_FLAGS_NONE,
|
|
||||||
on_seat_new,
|
|
||||||
g_object_ref (factory),
|
|
||||||
g_object_unref);
|
|
||||||
factory->seat_removed_id = g_dbus_connection_signal_subscribe (factory->connection,
|
|
||||||
"org.freedesktop.login1",
|
|
||||||
"org.freedesktop.login1.Manager",
|
|
||||||
"SeatRemoved",
|
|
||||||
"/org/freedesktop/login1",
|
|
||||||
NULL,
|
|
||||||
G_DBUS_SIGNAL_FLAGS_NONE,
|
|
||||||
on_seat_removed,
|
|
||||||
g_object_ref (factory),
|
|
||||||
g_object_unref);
|
|
||||||
factory->seat_properties_changed_id = g_dbus_connection_signal_subscribe (factory->connection,
|
|
||||||
"org.freedesktop.login1",
|
|
||||||
"org.freedesktop.DBus.Properties",
|
|
||||||
"PropertiesChanged",
|
|
||||||
NULL,
|
|
||||||
"org.freedesktop.login1.Seat",
|
|
||||||
G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE,
|
|
||||||
on_seat_properties_changed,
|
|
||||||
g_object_ref (factory),
|
|
||||||
g_object_unref);
|
|
||||||
+#ifdef HAVE_UDEV
|
|
||||||
+ factory->gudev_client = g_udev_client_new (subsystems);
|
|
||||||
+ factory->uevent_handler_id = g_signal_connect (factory->gudev_client,
|
|
||||||
+ "uevent",
|
|
||||||
+ G_CALLBACK (on_uevent),
|
|
||||||
+ factory);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_USER_DISPLAY_SERVER)
|
|
||||||
io_channel = g_io_channel_new_file ("/sys/class/tty/tty0/active", "r", NULL);
|
|
||||||
|
|
||||||
if (io_channel != NULL) {
|
|
||||||
factory->active_vt_watch_id =
|
|
||||||
g_io_add_watch (io_channel,
|
|
||||||
G_IO_PRI,
|
|
||||||
(GIOFunc)
|
|
||||||
on_vt_changed,
|
|
||||||
factory);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gdm_local_display_factory_stop_monitor (GdmLocalDisplayFactory *factory)
|
|
||||||
{
|
|
||||||
+ if (factory->uevent_handler_id) {
|
|
||||||
+ g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id);
|
|
||||||
+ factory->uevent_handler_id = 0;
|
|
||||||
+ }
|
|
||||||
+ g_clear_object (&factory->gudev_client);
|
|
||||||
+
|
|
||||||
if (factory->seat_new_id) {
|
|
||||||
g_dbus_connection_signal_unsubscribe (factory->connection,
|
|
||||||
factory->seat_new_id);
|
|
||||||
factory->seat_new_id = 0;
|
|
||||||
}
|
|
||||||
if (factory->seat_removed_id) {
|
|
||||||
g_dbus_connection_signal_unsubscribe (factory->connection,
|
|
||||||
factory->seat_removed_id);
|
|
||||||
factory->seat_removed_id = 0;
|
|
||||||
}
|
|
||||||
if (factory->seat_properties_changed_id) {
|
|
||||||
g_dbus_connection_signal_unsubscribe (factory->connection,
|
|
||||||
factory->seat_properties_changed_id);
|
|
||||||
factory->seat_properties_changed_id = 0;
|
|
||||||
}
|
|
||||||
#if defined(ENABLE_USER_DISPLAY_SERVER)
|
|
||||||
if (factory->active_vt_watch_id) {
|
|
||||||
g_source_remove (factory->active_vt_watch_id);
|
|
||||||
factory->active_vt_watch_id = 0;
|
|
||||||
}
|
|
||||||
if (factory->wait_to_finish_timeout_id != 0) {
|
|
||||||
g_source_remove (factory->wait_to_finish_timeout_id);
|
|
||||||
factory->wait_to_finish_timeout_id = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_display_added (GdmDisplayStore *display_store,
|
|
||||||
const char *id,
|
|
||||||
diff --git a/daemon/meson.build b/daemon/meson.build
|
|
||||||
index 2e61b644..41f30abe 100644
|
|
||||||
--- a/daemon/meson.build
|
|
||||||
+++ b/daemon/meson.build
|
|
||||||
@@ -177,37 +177,41 @@ gdm_daemon_sources = files(
|
|
||||||
'gdm-session-record.c',
|
|
||||||
'gdm-session-worker-common.c',
|
|
||||||
'gdm-session-worker-job.c',
|
|
||||||
'gdm-session.c',
|
|
||||||
'main.c',
|
|
||||||
)
|
|
||||||
|
|
||||||
gdm_daemon_gen_sources = [
|
|
||||||
display_dbus_gen,
|
|
||||||
local_display_factory_dbus_gen,
|
|
||||||
manager_dbus_gen,
|
|
||||||
local_display_dbus_gen,
|
|
||||||
session_dbus_gen,
|
|
||||||
session_worker_dbus_gen,
|
|
||||||
gdm_session_enums,
|
|
||||||
]
|
|
||||||
|
|
||||||
if xdmcp_dep.found()
|
|
||||||
gdm_daemon_deps += xdmcp_dep
|
|
||||||
|
|
||||||
gdm_daemon_sources = [
|
|
||||||
gdm_daemon_sources,
|
|
||||||
files(
|
|
||||||
'gdm-xdmcp-display-factory.c',
|
|
||||||
'gdm-xdmcp-display.c',
|
|
||||||
'gdm-xdmcp-chooser-display.c',
|
|
||||||
),
|
|
||||||
]
|
|
||||||
endif
|
|
||||||
|
|
||||||
+if gudev_dep.found()
|
|
||||||
+ gdm_daemon_deps += gudev_dep
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
gdm_daemon = executable('gdm',
|
|
||||||
[ gdm_daemon_sources, gdm_daemon_gen_sources ],
|
|
||||||
dependencies: gdm_daemon_deps,
|
|
||||||
include_directories: config_h_dir,
|
|
||||||
install: true,
|
|
||||||
install_dir: get_option('sbindir')
|
|
||||||
)
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 02d609dc..05d8da41 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -11,60 +11,61 @@ i18n = import('i18n')
|
|
||||||
|
|
||||||
# Compiler
|
|
||||||
cc = meson.get_compiler('c')
|
|
||||||
|
|
||||||
# Options
|
|
||||||
gdm_prefix = get_option('prefix')
|
|
||||||
|
|
||||||
gdmconfdir = (get_option('sysconfsubdir') == '')? gdm_prefix / get_option('sysconfdir') : gdm_prefix / get_option('sysconfdir') / get_option('sysconfsubdir')
|
|
||||||
dmconfdir = (get_option('dmconfdir') != '')? get_option('dmconfdir') : gdm_prefix / get_option('sysconfdir') / 'dm'
|
|
||||||
udev_dir = get_option('udev-dir')
|
|
||||||
at_spi_registryd_dir = (get_option('at-spi-registryd-dir') != '')? get_option('at-spi-registryd-dir') : gdm_prefix / get_option('libexecdir')
|
|
||||||
lang_config_file = (get_option('lang-file') != '')? get_option('lang-file') : gdm_prefix / get_option('sysconfdir') / 'locale.conf'
|
|
||||||
pam_mod_dir = (get_option('pam-mod-dir') != '')? get_option('pam-mod-dir') : gdm_prefix / get_option('libdir') / 'security'
|
|
||||||
dbus_sys_dir = (get_option('dbus-sys') != '')? get_option('dbus-sys') : get_option('sysconfdir') / 'dbus-1' / 'system.d'
|
|
||||||
gdm_defaults_conf = (get_option('defaults-conf') != '')? get_option('defaults-conf') : gdm_prefix / get_option('datadir') / 'gdm' / 'defaults.conf'
|
|
||||||
gdm_custom_conf = (get_option('custom-conf') != '')? get_option('custom-conf') : gdmconfdir / 'custom.conf'
|
|
||||||
gnome_settings_daemon_dir = (get_option('gnome-settings-daemon-dir') != '')? get_option('gnome-settings-daemon-dir') : gdm_prefix / get_option('libexecdir')
|
|
||||||
gdm_run_dir = (get_option('run-dir') != '')? get_option('run-dir') : gdm_prefix / get_option('localstatedir') / 'run' / 'gdm'
|
|
||||||
gdm_runtime_conf = (get_option('runtime-conf') != '')? get_option('runtime-conf') : gdm_run_dir / 'custom.conf'
|
|
||||||
gdm_pid_file = (get_option('pid-file') != '')? get_option('pid-file') : gdm_run_dir / 'gdm.pid'
|
|
||||||
ran_once_marker_dir = (get_option('ran-once-marker-dir') != '')? get_option('ran-once-marker-dir') : gdm_run_dir
|
|
||||||
working_dir = (get_option('working-dir') != '')? get_option('working-dir') : gdm_prefix / get_option('localstatedir') / 'lib' / 'gdm'
|
|
||||||
gdm_xauth_dir = (get_option('xauth-dir') != '')? get_option('xauth-dir') : gdm_run_dir
|
|
||||||
gdm_screenshot_dir = (get_option('screenshot-dir') != '')? get_option('screenshot-dir') : gdm_run_dir / 'greeter'
|
|
||||||
|
|
||||||
# Common variables
|
|
||||||
config_h_dir = include_directories('.')
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
udev_dep = dependency('udev')
|
|
||||||
+gudev_dep = dependency('gudev-1.0', version: '>= 232')
|
|
||||||
|
|
||||||
glib_min_version = '2.56.0'
|
|
||||||
|
|
||||||
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
|
||||||
gobject_dep = dependency('gobject-2.0', version: '>=' + glib_min_version)
|
|
||||||
gio_dep = dependency('gio-2.0', version: '>=' + glib_min_version)
|
|
||||||
gio_unix_dep = dependency('gio-unix-2.0', version: '>=' + glib_min_version)
|
|
||||||
gtk_dep = dependency('gtk+-3.0', version: '>= 2.91.1')
|
|
||||||
libcanberra_gtk_dep = dependency('libcanberra-gtk3', version: '>= 0.4')
|
|
||||||
accountsservice_dep = dependency('accountsservice', version: '>= 0.6.35')
|
|
||||||
xcb_dep = dependency('xcb')
|
|
||||||
keyutils_dep = dependency('libkeyutils', required: false)
|
|
||||||
libselinux_dep = dependency('libselinux', required: get_option('selinux'))
|
|
||||||
|
|
||||||
# udev
|
|
||||||
if udev_dir == ''
|
|
||||||
if udev_dep.found()
|
|
||||||
udev_prefix = udev_dep.get_pkgconfig_variable('udevdir')
|
|
||||||
else
|
|
||||||
udev_prefix = gdm_prefix / 'lib' / 'udev'
|
|
||||||
endif
|
|
||||||
udev_dir = udev_prefix / 'rules.d'
|
|
||||||
endif
|
|
||||||
|
|
||||||
# X11
|
|
||||||
x_deps = declare_dependency(
|
|
||||||
dependencies: [
|
|
||||||
dependency('x11'),
|
|
||||||
dependency('xau'),
|
|
||||||
],
|
|
||||||
@@ -217,60 +218,61 @@ conf.set('HAVE_UTMP_H', have_utmp_header)
|
|
||||||
conf.set('HAVE_UTMPX_H', have_utmpx_header)
|
|
||||||
conf.set('HAVE_POSIX_GETPWNAM_R', have_posix_getpwnam_r)
|
|
||||||
conf.set('UTMP', utmp_struct)
|
|
||||||
conf.set('HAVE_GETUTXENT', cc.has_function('getutxent'))
|
|
||||||
conf.set('HAVE_UPDWTMP', cc.has_function('updwtmp'))
|
|
||||||
conf.set('HAVE_UPDWTMPX', cc.has_function('updwtmpx'))
|
|
||||||
conf.set('HAVE_LOGIN', cc.has_function('login', args: '-lutil'))
|
|
||||||
conf.set('HAVE_LOGOUT', cc.has_function('logout', args: '-lutil'))
|
|
||||||
conf.set('HAVE_LOGWTMP', cc.has_function('logwtmp', args: '-lutil'))
|
|
||||||
conf.set('HAVE_PAM_SYSLOG', have_pam_syslog)
|
|
||||||
conf.set('HAVE_KEYUTILS', keyutils_dep.found())
|
|
||||||
conf.set('SUPPORTS_PAM_EXTENSIONS', pam_extensions_supported)
|
|
||||||
conf.set('HAVE_SELINUX', libselinux_dep.found())
|
|
||||||
conf.set('HAVE_XSERVER_WITH_LISTEN', xserver_has_listen)
|
|
||||||
conf.set('ENABLE_USER_DISPLAY_SERVER', get_option('user-display-server'))
|
|
||||||
conf.set('ENABLE_SYSTEMD_JOURNAL', get_option('systemd-journal'))
|
|
||||||
conf.set('ENABLE_WAYLAND_SUPPORT', get_option('wayland-support'))
|
|
||||||
conf.set('ENABLE_PROFILING', get_option('profiling'))
|
|
||||||
conf.set('GDM_INITIAL_VT', get_option('initial-vt'))
|
|
||||||
conf.set_quoted('GDM_DEFAULTS_CONF', gdm_defaults_conf)
|
|
||||||
conf.set_quoted('GDM_CUSTOM_CONF', gdm_custom_conf)
|
|
||||||
conf.set_quoted('GDM_RUNTIME_CONF', gdm_runtime_conf)
|
|
||||||
conf.set_quoted('GDM_SESSION_DEFAULT_PATH', get_option('default-path'))
|
|
||||||
conf.set_quoted('GDM_USERNAME', get_option('user'))
|
|
||||||
conf.set_quoted('GDM_GROUPNAME', get_option('group'))
|
|
||||||
conf.set('HAVE_LIBXDMCP', xdmcp_dep.found())
|
|
||||||
conf.set_quoted('SYSTEMD_X_SERVER', systemd_x_server)
|
|
||||||
conf.set('WITH_PLYMOUTH', plymouth_dep.found())
|
|
||||||
conf.set_quoted('X_SERVER', x_bin)
|
|
||||||
conf.set_quoted('X_PATH', x_path)
|
|
||||||
+conf.set('HAVE_UDEV', gudev_dep.found())
|
|
||||||
conf.set('HAVE_UT_UT_HOST', utmp_has_host_field)
|
|
||||||
conf.set('HAVE_UT_UT_PID', utmp_has_pid_field)
|
|
||||||
conf.set('HAVE_UT_UT_ID', utmp_has_id_field)
|
|
||||||
conf.set('HAVE_UT_UT_NAME', utmp_has_name_field)
|
|
||||||
conf.set('HAVE_UT_UT_TYPE', utmp_has_type_field)
|
|
||||||
conf.set('HAVE_UT_UT_EXIT_E_TERMINATION', utmp_has_exit_e_termination_field)
|
|
||||||
conf.set('HAVE_UT_UT_USER', utmp_has_user_field)
|
|
||||||
conf.set('HAVE_UT_UT_TIME', utmp_has_time_field)
|
|
||||||
conf.set('HAVE_UT_UT_TV', utmp_has_tv_field)
|
|
||||||
conf.set('HAVE_UT_UT_SYSLEN', utmp_has_syslen_field)
|
|
||||||
conf.set('ENABLE_IPV6', get_option('ipv6'))
|
|
||||||
configure_file(output: 'config.h', configuration: conf)
|
|
||||||
|
|
||||||
# Subdirs
|
|
||||||
subdir('data')
|
|
||||||
subdir('common')
|
|
||||||
if pam_extensions_supported
|
|
||||||
subdir('pam-extensions')
|
|
||||||
endif
|
|
||||||
subdir('daemon')
|
|
||||||
subdir('libgdm')
|
|
||||||
subdir('utils')
|
|
||||||
subdir('pam_gdm')
|
|
||||||
subdir('po')
|
|
||||||
if libcheck_dep.found()
|
|
||||||
subdir('tests')
|
|
||||||
endif
|
|
||||||
if xdmcp_dep.found()
|
|
||||||
subdir('chooser')
|
|
||||||
endif
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From 58f2bb3560f1066d0cda93a749a6d1648e3c3d0c Mon Sep 17 00:00:00 2001
|
From d80807171a457ff87bdc9bd861939161749a37a8 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Thu, 20 Dec 2018 14:51:38 -0500
|
Date: Thu, 20 Dec 2018 14:51:38 -0500
|
||||||
Subject: [PATCH 1/3] manager: allow multiple xdmcp logins for the same user
|
Subject: [PATCH 1/3] manager: allow multiple xdmcp logins for the same user
|
||||||
@ -10,7 +10,7 @@ Subject: [PATCH 1/3] manager: allow multiple xdmcp logins for the same user
|
|||||||
3 files changed, 59 insertions(+), 18 deletions(-)
|
3 files changed, 59 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
|
diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
|
||||||
index 87685d3c..4b3a1ffe 100644
|
index 87685d3cd..4b3a1ffeb 100644
|
||||||
--- a/common/gdm-settings-keys.h
|
--- a/common/gdm-settings-keys.h
|
||||||
+++ b/common/gdm-settings-keys.h
|
+++ b/common/gdm-settings-keys.h
|
||||||
@@ -30,37 +30,38 @@ G_BEGIN_DECLS
|
@@ -30,37 +30,38 @@ G_BEGIN_DECLS
|
||||||
@ -53,7 +53,7 @@ index 87685d3c..4b3a1ffe 100644
|
|||||||
|
|
||||||
#endif /* _GDM_SETTINGS_KEYS_H */
|
#endif /* _GDM_SETTINGS_KEYS_H */
|
||||||
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||||
index e1bc62d7..08c3cc17 100644
|
index e433acf3b..ce8565bf9 100644
|
||||||
--- a/daemon/gdm-manager.c
|
--- a/daemon/gdm-manager.c
|
||||||
+++ b/daemon/gdm-manager.c
|
+++ b/daemon/gdm-manager.c
|
||||||
@@ -566,93 +566,106 @@ get_display_and_details_for_bus_sender (GdmManager *self,
|
@@ -566,93 +566,106 @@ get_display_and_details_for_bus_sender (GdmManager *self,
|
||||||
@ -180,8 +180,8 @@ index e1bc62d7..08c3cc17 100644
|
|||||||
SessionRecord record)
|
SessionRecord record)
|
||||||
{
|
{
|
||||||
const char *username;
|
const char *username;
|
||||||
char *display_name, *hostname, *display_device, *display_seat_id;
|
char *display_name, *hostname, *display_device;
|
||||||
@@ -1096,92 +1109,114 @@ open_temporary_reauthentication_channel (GdmManager *self,
|
@@ -1089,92 +1102,114 @@ open_temporary_reauthentication_channel (GdmManager *self,
|
||||||
g_signal_connect (session,
|
g_signal_connect (session,
|
||||||
"client-disconnected",
|
"client-disconnected",
|
||||||
G_CALLBACK (on_reauthentication_client_disconnected),
|
G_CALLBACK (on_reauthentication_client_disconnected),
|
||||||
@ -297,7 +297,7 @@ index e1bc62d7..08c3cc17 100644
|
|||||||
uid,
|
uid,
|
||||||
is_remote);
|
is_remote);
|
||||||
diff --git a/data/gdm.schemas.in b/data/gdm.schemas.in
|
diff --git a/data/gdm.schemas.in b/data/gdm.schemas.in
|
||||||
index a1035f95..929d13d9 100644
|
index a1035f95e..929d13d90 100644
|
||||||
--- a/data/gdm.schemas.in
|
--- a/data/gdm.schemas.in
|
||||||
+++ b/data/gdm.schemas.in
|
+++ b/data/gdm.schemas.in
|
||||||
@@ -112,33 +112,38 @@
|
@@ -112,33 +112,38 @@
|
||||||
@ -340,5 +340,5 @@ index a1035f95..929d13d9 100644
|
|||||||
</gdmschemafile>
|
</gdmschemafile>
|
||||||
|
|
||||||
--
|
--
|
||||||
2.37.3
|
2.30.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From b8caa1a18f284cc9b59a2e0273780a51b6fd7528 Mon Sep 17 00:00:00 2001
|
From f101371f418bb0013af1e5e1ef522277011fd48d Mon Sep 17 00:00:00 2001
|
||||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
Date: Thu, 7 Oct 2021 18:22:11 -0700
|
Date: Thu, 7 Oct 2021 18:22:11 -0700
|
||||||
Subject: [PATCH 1/2] meson: Fix detection of Xorg versions that need -listen
|
Subject: [PATCH 1/2] meson: Fix detection of Xorg versions that need -listen
|
||||||
@ -10,7 +10,7 @@ Closes #704
|
|||||||
1 file changed, 4 insertions(+)
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
diff --git a/meson.build b/meson.build
|
diff --git a/meson.build b/meson.build
|
||||||
index 64b98628..52ac1941 100644
|
index e6fcf4b8..06d09659 100644
|
||||||
--- a/meson.build
|
--- a/meson.build
|
||||||
+++ b/meson.build
|
+++ b/meson.build
|
||||||
@@ -42,60 +42,63 @@ udev_dep = dependency('udev')
|
@@ -42,60 +42,63 @@ udev_dep = dependency('udev')
|
||||||
@ -68,7 +68,7 @@ index 64b98628..52ac1941 100644
|
|||||||
endif
|
endif
|
||||||
xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
|
xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
|
||||||
if xdmcp_dep.found() and get_option('tcp-wrappers')
|
if xdmcp_dep.found() and get_option('tcp-wrappers')
|
||||||
libwrap_dep = cc.find_library('wrap')
|
libwrap_dep = cc.find_library('libwrap')
|
||||||
endif
|
endif
|
||||||
# systemd
|
# systemd
|
||||||
systemd_dep = dependency('systemd')
|
systemd_dep = dependency('systemd')
|
||||||
@ -140,5 +140,5 @@ index 64b98628..52ac1941 100644
|
|||||||
|
|
||||||
# Subdirs
|
# Subdirs
|
||||||
--
|
--
|
||||||
2.34.1
|
2.33.1
|
||||||
|
|
||||||
|
81
SOURCES/0001-meson-set-D_GNU_SOURCE-for-updwtmpx.patch
Normal file
81
SOURCES/0001-meson-set-D_GNU_SOURCE-for-updwtmpx.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
From 5a2d5dbdf8c6f6d3c896082a5a07b4292f5fb410 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sam James <sam@gentoo.org>
|
||||||
|
Date: Tue, 5 Jul 2022 01:47:35 +0100
|
||||||
|
Subject: [PATCH 1/2] meson: set -D_GNU_SOURCE for updwtmpx
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Without setting GNU_SOURCE, we end up getting:
|
||||||
|
```
|
||||||
|
../gdm-42.0/daemon/gdm-session-record.c:200:9: error: implicit declaration of function ‘updwtmpx’; did you mean ‘updwtmp’? [-Werror=implicit-function-declaration]
|
||||||
|
updwtmpx (GDM_NEW_SESSION_RECORDS_FILE, &session_record);
|
||||||
|
```
|
||||||
|
|
||||||
|
This ended up exposing a bug in updwtmp(3) (which is now fixed
|
||||||
|
thanks to the man-pages maintainers!) as it didn't mention that updwtmpx
|
||||||
|
is a GNU extension (and hence needs GNU_SOURCE in order to be available).
|
||||||
|
|
||||||
|
Alternatively, we could just #define _GNU_SOURCE in gdm-session-record.c
|
||||||
|
for updwtmpx.
|
||||||
|
|
||||||
|
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=216168
|
||||||
|
---
|
||||||
|
meson.build | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 8328dd97..4a286f97 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -1,44 +1,47 @@
|
||||||
|
project('gdm', 'c',
|
||||||
|
version: '40.0',
|
||||||
|
license: 'GPL2+',
|
||||||
|
meson_version: '>= 0.50',
|
||||||
|
)
|
||||||
|
|
||||||
|
# Modules
|
||||||
|
gnome = import('gnome')
|
||||||
|
pkgconfig = import('pkgconfig')
|
||||||
|
i18n = import('i18n')
|
||||||
|
|
||||||
|
# Compiler
|
||||||
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
+# Use GNU extensions if available
|
||||||
|
+add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||||
|
+
|
||||||
|
# Options
|
||||||
|
gdm_prefix = get_option('prefix')
|
||||||
|
|
||||||
|
gdmconfdir = (get_option('sysconfsubdir') == '')? gdm_prefix / get_option('sysconfdir') : gdm_prefix / get_option('sysconfdir') / get_option('sysconfsubdir')
|
||||||
|
dmconfdir = (get_option('dmconfdir') != '')? get_option('dmconfdir') : gdm_prefix / get_option('sysconfdir') / 'dm'
|
||||||
|
udev_dir = get_option('udev-dir')
|
||||||
|
at_spi_registryd_dir = (get_option('at-spi-registryd-dir') != '')? get_option('at-spi-registryd-dir') : gdm_prefix / get_option('libexecdir')
|
||||||
|
lang_config_file = (get_option('lang-file') != '')? get_option('lang-file') : gdm_prefix / get_option('sysconfdir') / 'locale.conf'
|
||||||
|
pam_mod_dir = (get_option('pam-mod-dir') != '')? get_option('pam-mod-dir') : gdm_prefix / get_option('libdir') / 'security'
|
||||||
|
dbus_sys_dir = (get_option('dbus-sys') != '')? get_option('dbus-sys') : get_option('sysconfdir') / 'dbus-1' / 'system.d'
|
||||||
|
gdm_defaults_conf = (get_option('defaults-conf') != '')? get_option('defaults-conf') : gdm_prefix / get_option('datadir') / 'gdm' / 'defaults.conf'
|
||||||
|
gdm_custom_conf = (get_option('custom-conf') != '')? get_option('custom-conf') : gdmconfdir / 'custom.conf'
|
||||||
|
gnome_settings_daemon_dir = (get_option('gnome-settings-daemon-dir') != '')? get_option('gnome-settings-daemon-dir') : gdm_prefix / get_option('libexecdir')
|
||||||
|
gdm_run_dir = (get_option('run-dir') != '')? get_option('run-dir') : gdm_prefix / get_option('localstatedir') / 'run' / 'gdm'
|
||||||
|
gdm_runtime_conf = (get_option('runtime-conf') != '')? get_option('runtime-conf') : gdm_run_dir / 'custom.conf'
|
||||||
|
gdm_pid_file = (get_option('pid-file') != '')? get_option('pid-file') : gdm_run_dir / 'gdm.pid'
|
||||||
|
ran_once_marker_dir = (get_option('ran-once-marker-dir') != '')? get_option('ran-once-marker-dir') : gdm_run_dir
|
||||||
|
working_dir = (get_option('working-dir') != '')? get_option('working-dir') : gdm_prefix / get_option('localstatedir') / 'lib' / 'gdm'
|
||||||
|
gdm_xauth_dir = (get_option('xauth-dir') != '')? get_option('xauth-dir') : gdm_run_dir
|
||||||
|
gdm_screenshot_dir = (get_option('screenshot-dir') != '')? get_option('screenshot-dir') : gdm_run_dir / 'greeter'
|
||||||
|
|
||||||
|
# Common variables
|
||||||
|
config_h_dir = include_directories('.')
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
udev_dep = dependency('udev')
|
||||||
|
|
||||||
|
glib_min_version = '2.56.0'
|
||||||
|
|
||||||
|
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,89 +0,0 @@
|
|||||||
From 8a29f79124f38e2106b263bacb6b5ab4cdb255d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Wed, 9 Mar 2022 10:46:21 -0500
|
|
||||||
Subject: [PATCH] session-settings: Fetch session from user even if user isn't
|
|
||||||
cached
|
|
||||||
|
|
||||||
Now that accountsservice supports session templates, GDM can't assume
|
|
||||||
that no-cache file means, there's nothing worth reading.
|
|
||||||
|
|
||||||
Unfortunately, GDM does exactly that. It bypasses fetching the users
|
|
||||||
session if it doesn't think the user has one.
|
|
||||||
|
|
||||||
This commit removes that no-longer-correct optimization.
|
|
||||||
---
|
|
||||||
daemon/gdm-session-settings.c | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
|
|
||||||
index 5b64cb65..fbf6897b 100644
|
|
||||||
--- a/daemon/gdm-session-settings.c
|
|
||||||
+++ b/daemon/gdm-session-settings.c
|
|
||||||
@@ -270,64 +270,60 @@ gdm_session_settings_new (void)
|
|
||||||
GdmSessionSettings *settings;
|
|
||||||
|
|
||||||
settings = g_object_new (GDM_TYPE_SESSION_SETTINGS,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
return settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gdm_session_settings_is_loaded (GdmSessionSettings *settings)
|
|
||||||
{
|
|
||||||
if (settings->priv->user == NULL) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return act_user_is_loaded (settings->priv->user);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
load_settings_from_user (GdmSessionSettings *settings)
|
|
||||||
{
|
|
||||||
const char *session_name;
|
|
||||||
const char *session_type;
|
|
||||||
const char *language_name;
|
|
||||||
|
|
||||||
if (!act_user_is_loaded (settings->priv->user)) {
|
|
||||||
g_warning ("GdmSessionSettings: trying to load user settings from unloaded user");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* if the user doesn't have saved state, they don't have any settings worth reading */
|
|
||||||
- if (!act_user_get_saved (settings->priv->user))
|
|
||||||
- goto out;
|
|
||||||
-
|
|
||||||
session_type = act_user_get_session_type (settings->priv->user);
|
|
||||||
session_name = act_user_get_session (settings->priv->user);
|
|
||||||
|
|
||||||
g_debug ("GdmSessionSettings: saved session is %s (type %s)", session_name, session_type);
|
|
||||||
|
|
||||||
if (session_type != NULL && session_type[0] != '\0') {
|
|
||||||
gdm_session_settings_set_session_type (settings, session_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (session_name != NULL && session_name[0] != '\0') {
|
|
||||||
gdm_session_settings_set_session_name (settings, session_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
language_name = act_user_get_language (settings->priv->user);
|
|
||||||
|
|
||||||
g_debug ("GdmSessionSettings: saved language is %s", language_name);
|
|
||||||
if (language_name != NULL && language_name[0] != '\0') {
|
|
||||||
gdm_session_settings_set_language_name (settings, language_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
g_object_notify (G_OBJECT (settings), "is-loaded");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_user_is_loaded_changed (ActUser *user,
|
|
||||||
GParamSpec *pspec,
|
|
||||||
GdmSessionSettings *settings)
|
|
||||||
{
|
|
||||||
if (act_user_is_loaded (settings->priv->user)) {
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From 26705ee64f4d3628eaaf45db980c435fa26e112a Mon Sep 17 00:00:00 2001
|
From 56d12ad9697d5695c780a5be0065d23fec6bd1a5 Mon Sep 17 00:00:00 2001
|
||||||
From: Chingkai Chu <3013329+chuchingkai@users.noreply.github.com>
|
From: Chingkai Chu <3013329+chuchingkai@users.noreply.github.com>
|
||||||
Date: Thu, 12 Aug 2021 10:34:01 +0800
|
Date: Thu, 12 Aug 2021 10:34:01 +0800
|
||||||
Subject: [PATCH] session-worker: Set session_vt=0 out of pam uninitialization
|
Subject: [PATCH] session-worker: Set session_vt=0 out of pam uninitialization
|
||||||
@ -13,7 +13,7 @@ https://gitlab.gnome.org/GNOME/gdm/-/issues/719
|
|||||||
1 file changed, 2 deletions(-)
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
|
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
|
||||||
index 7d7d2496..3ad94e2a 100644
|
index c1201b70..9cff53a5 100644
|
||||||
--- a/daemon/gdm-session-worker.c
|
--- a/daemon/gdm-session-worker.c
|
||||||
+++ b/daemon/gdm-session-worker.c
|
+++ b/daemon/gdm-session-worker.c
|
||||||
@@ -1076,62 +1076,60 @@ gdm_session_worker_set_state (GdmSessionWorker *worker,
|
@@ -1076,62 +1076,60 @@ gdm_session_worker_set_state (GdmSessionWorker *worker,
|
||||||
@ -80,5 +80,5 @@ index 7d7d2496..3ad94e2a 100644
|
|||||||
}
|
}
|
||||||
if (auth) {
|
if (auth) {
|
||||||
--
|
--
|
||||||
2.32.0
|
2.31.1
|
||||||
|
|
||||||
|
362
SOURCES/0001-utils-Drop-gdm-screenshot.patch
Normal file
362
SOURCES/0001-utils-Drop-gdm-screenshot.patch
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
From 7b5ee288d992f85eaefbfbc4dac663a29fcae446 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Wed, 5 May 2021 11:06:58 -0400
|
||||||
|
Subject: [PATCH] 0001-utils-Drop-gdm-screenshot.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
utils/gdm-screenshot.c | 296 -----------------------------------------
|
||||||
|
utils/meson.build | 15 ---
|
||||||
|
2 files changed, 311 deletions(-)
|
||||||
|
delete mode 100644 utils/gdm-screenshot.c
|
||||||
|
|
||||||
|
diff --git a/utils/gdm-screenshot.c b/utils/gdm-screenshot.c
|
||||||
|
deleted file mode 100644
|
||||||
|
index 5d20929a3..000000000
|
||||||
|
--- a/utils/gdm-screenshot.c
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,296 +0,0 @@
|
||||||
|
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
||||||
|
- *
|
||||||
|
- * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
|
||||||
|
- *
|
||||||
|
- * This program is free software; you can redistribute it and/or modify
|
||||||
|
- * it under the terms of the GNU General Public License as published by
|
||||||
|
- * the Free Software Foundation; either version 2 of the License, or
|
||||||
|
- * (at your option) any later version.
|
||||||
|
- *
|
||||||
|
- * This program is distributed in the hope that it will be useful,
|
||||||
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
- * GNU General Public License for more details.
|
||||||
|
- *
|
||||||
|
- * You should have received a copy of the GNU General Public License
|
||||||
|
- * along with this program; if not, write to the Free Software
|
||||||
|
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
- *
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-#include "config.h"
|
||||||
|
-
|
||||||
|
-#include <stdlib.h>
|
||||||
|
-#include <stdio.h>
|
||||||
|
-#include <unistd.h>
|
||||||
|
-#include <string.h>
|
||||||
|
-#include <locale.h>
|
||||||
|
-
|
||||||
|
-#include <glib/gi18n.h>
|
||||||
|
-#include <gtk/gtk.h>
|
||||||
|
-#include <canberra-gtk.h>
|
||||||
|
-
|
||||||
|
-#include <X11/Xatom.h>
|
||||||
|
-#include <gdk/gdkx.h>
|
||||||
|
-
|
||||||
|
-#define SELECTION_NAME "_GDM_SCREENSHOT"
|
||||||
|
-static GtkWidget *selection_window;
|
||||||
|
-
|
||||||
|
-static gboolean debug_in;
|
||||||
|
-
|
||||||
|
-/* Keep all config options for compatibility even if they are noops */
|
||||||
|
-GOptionEntry options [] = {
|
||||||
|
- { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug_in, N_("Debugging output"), NULL },
|
||||||
|
- { NULL }
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
-/* To make sure there is only one screenshot taken at a time,
|
||||||
|
- * (Imagine key repeat for the print screen key) we hold a selection
|
||||||
|
- * until we are done taking the screenshot
|
||||||
|
- */
|
||||||
|
-/* * Copyright (C) 2001-2006 Jonathan Blandford <jrb@alum.mit.edu> */
|
||||||
|
-static gboolean
|
||||||
|
-screenshot_grab_lock (void)
|
||||||
|
-{
|
||||||
|
- Atom selection_atom;
|
||||||
|
- GdkCursor *cursor;
|
||||||
|
- gboolean result = FALSE;
|
||||||
|
-
|
||||||
|
- selection_atom = gdk_x11_get_xatom_by_name (SELECTION_NAME);
|
||||||
|
- XGrabServer (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
||||||
|
- if (XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), selection_atom) != None) {
|
||||||
|
- goto out;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- selection_window = gtk_invisible_new ();
|
||||||
|
- gtk_widget_show (selection_window);
|
||||||
|
-
|
||||||
|
- if (!gtk_selection_owner_set (selection_window,
|
||||||
|
- gdk_atom_intern (SELECTION_NAME, FALSE),
|
||||||
|
- GDK_CURRENT_TIME)) {
|
||||||
|
- gtk_widget_destroy (selection_window);
|
||||||
|
- selection_window = NULL;
|
||||||
|
- goto out;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_WATCH);
|
||||||
|
- gdk_pointer_grab (gtk_widget_get_window (selection_window), FALSE, 0, NULL,
|
||||||
|
- cursor, GDK_CURRENT_TIME);
|
||||||
|
- g_object_unref (cursor);
|
||||||
|
-
|
||||||
|
- result = TRUE;
|
||||||
|
-
|
||||||
|
- out:
|
||||||
|
- XUngrabServer (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
||||||
|
- gdk_flush ();
|
||||||
|
-
|
||||||
|
- return result;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-/* * Copyright (C) 2001-2006 Jonathan Blandford <jrb@alum.mit.edu> */
|
||||||
|
-static void
|
||||||
|
-screenshot_release_lock (void)
|
||||||
|
-{
|
||||||
|
- if (selection_window != NULL) {
|
||||||
|
- gtk_widget_destroy (selection_window);
|
||||||
|
- selection_window = NULL;
|
||||||
|
- }
|
||||||
|
- gdk_flush ();
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-/* * Copyright (C) 2001-2006 Jonathan Blandford <jrb@alum.mit.edu> */
|
||||||
|
-static GdkPixbuf *
|
||||||
|
-screenshot_get_pixbuf (Window w)
|
||||||
|
-{
|
||||||
|
- GdkWindow *window;
|
||||||
|
- GdkWindow *root;
|
||||||
|
- GdkPixbuf *screenshot;
|
||||||
|
- int x_real_orig;
|
||||||
|
- int y_real_orig;
|
||||||
|
- int x_orig;
|
||||||
|
- int y_orig;
|
||||||
|
- int real_width;
|
||||||
|
- int real_height;
|
||||||
|
- int width;
|
||||||
|
- int height;
|
||||||
|
-
|
||||||
|
- window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), w);
|
||||||
|
- if (window == NULL) {
|
||||||
|
- return NULL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- root = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), GDK_ROOT_WINDOW ());
|
||||||
|
- gdk_window_get_geometry (window, NULL, NULL, &real_width, &real_height);
|
||||||
|
- gdk_window_get_origin (window, &x_real_orig, &y_real_orig);
|
||||||
|
-
|
||||||
|
- x_orig = x_real_orig;
|
||||||
|
- y_orig = y_real_orig;
|
||||||
|
- width = real_width;
|
||||||
|
- height = real_height;
|
||||||
|
-
|
||||||
|
- if (x_orig < 0) {
|
||||||
|
- width = width + x_orig;
|
||||||
|
- x_orig = 0;
|
||||||
|
- }
|
||||||
|
- if (y_orig < 0) {
|
||||||
|
- height = height + y_orig;
|
||||||
|
- y_orig = 0;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (x_orig + width > gdk_screen_width ()) {
|
||||||
|
- width = gdk_screen_width () - x_orig;
|
||||||
|
- }
|
||||||
|
- if (y_orig + height > gdk_screen_height ()) {
|
||||||
|
- height = gdk_screen_height () - y_orig;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- screenshot = gdk_pixbuf_get_from_window (root,
|
||||||
|
- x_orig,
|
||||||
|
- y_orig,
|
||||||
|
- width,
|
||||||
|
- height);
|
||||||
|
-
|
||||||
|
- return screenshot;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static char *
|
||||||
|
-screenshot_save (GdkPixbuf *pixbuf)
|
||||||
|
-{
|
||||||
|
- char *filename;
|
||||||
|
- gboolean res;
|
||||||
|
- GError *error;
|
||||||
|
-
|
||||||
|
- filename = g_build_filename (GDM_SCREENSHOT_DIR,
|
||||||
|
- "GDM-Screenshot.png",
|
||||||
|
- NULL);
|
||||||
|
-
|
||||||
|
- error = NULL;
|
||||||
|
- res = gdk_pixbuf_save (pixbuf,
|
||||||
|
- filename,
|
||||||
|
- "png",
|
||||||
|
- &error,
|
||||||
|
- "tEXt::CREATOR", "gdm-screenshot",
|
||||||
|
- NULL);
|
||||||
|
- if (! res) {
|
||||||
|
- g_warning ("Unable to save screenshot: %s", error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- g_free (filename);
|
||||||
|
- filename = NULL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return filename;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-sound_effect_finished (ca_context *c,
|
||||||
|
- uint32_t id,
|
||||||
|
- int error_code,
|
||||||
|
- void *userdata)
|
||||||
|
-{
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-play_sound_effect (Window xid)
|
||||||
|
-{
|
||||||
|
- ca_context *c;
|
||||||
|
- ca_proplist *p;
|
||||||
|
- int res;
|
||||||
|
-
|
||||||
|
- c = ca_gtk_context_get ();
|
||||||
|
-
|
||||||
|
- p = NULL;
|
||||||
|
- res = ca_proplist_create (&p);
|
||||||
|
- if (res < 0) {
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- res = ca_proplist_sets (p, CA_PROP_EVENT_ID, "screen-capture");
|
||||||
|
- if (res < 0) {
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- res = ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Screenshot taken"));
|
||||||
|
- if (res < 0) {
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- res = ca_proplist_setf (p,
|
||||||
|
- CA_PROP_WINDOW_X11_XID,
|
||||||
|
- "%lu",
|
||||||
|
- (unsigned long) xid);
|
||||||
|
- if (res < 0) {
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- ca_context_play_full (c, 0, p, sound_effect_finished, NULL);
|
||||||
|
-
|
||||||
|
- done:
|
||||||
|
- if (p != NULL) {
|
||||||
|
- ca_proplist_destroy (p);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-prepare_screenshot (void)
|
||||||
|
-{
|
||||||
|
- Window win;
|
||||||
|
- GdkPixbuf *screenshot;
|
||||||
|
- char *filename;
|
||||||
|
-
|
||||||
|
- if (!screenshot_grab_lock ()) {
|
||||||
|
- exit (EXIT_SUCCESS);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- win = GDK_ROOT_WINDOW ();
|
||||||
|
-
|
||||||
|
- screenshot = screenshot_get_pixbuf (win);
|
||||||
|
-
|
||||||
|
- screenshot_release_lock ();
|
||||||
|
-
|
||||||
|
- if (screenshot == NULL) {
|
||||||
|
- /* FIXME: dialog? */
|
||||||
|
- exit (EXIT_FAILURE);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- play_sound_effect (win);
|
||||||
|
-
|
||||||
|
- filename = screenshot_save (screenshot);
|
||||||
|
- if (filename != NULL) {
|
||||||
|
- g_print ("Wrote %s\n", filename);
|
||||||
|
- /* FIXME: show a dialog or something */
|
||||||
|
- g_free (filename);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-int
|
||||||
|
-main (int argc, char *argv[])
|
||||||
|
-{
|
||||||
|
- GOptionContext *ctx;
|
||||||
|
- gboolean res;
|
||||||
|
- GError *error;
|
||||||
|
-
|
||||||
|
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
||||||
|
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
|
- textdomain (GETTEXT_PACKAGE);
|
||||||
|
- setlocale (LC_ALL, "");
|
||||||
|
-
|
||||||
|
- /* Option parsing */
|
||||||
|
- ctx = g_option_context_new (N_("Take a picture of the screen"));
|
||||||
|
- g_option_context_set_translation_domain (ctx, GETTEXT_PACKAGE);
|
||||||
|
- g_option_context_add_main_entries (ctx, options, NULL);
|
||||||
|
- g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
|
||||||
|
- error = NULL;
|
||||||
|
- res = g_option_context_parse (ctx, &argc, &argv, &error);
|
||||||
|
- g_option_context_free (ctx);
|
||||||
|
-
|
||||||
|
- if (! res) {
|
||||||
|
- g_warning ("%s", error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- exit (EXIT_FAILURE);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- prepare_screenshot ();
|
||||||
|
-
|
||||||
|
- return 1;
|
||||||
|
-}
|
||||||
|
diff --git a/utils/meson.build b/utils/meson.build
|
||||||
|
index d59f167b0..1edd7bce4 100644
|
||||||
|
--- a/utils/meson.build
|
||||||
|
+++ b/utils/meson.build
|
||||||
|
@@ -1,41 +1,26 @@
|
||||||
|
# gdm-flexiserver
|
||||||
|
gdm_flexiserver_deps = [
|
||||||
|
glib_dep,
|
||||||
|
libgdmcommon_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
gdm_flexiserver = executable('gdmflexiserver',
|
||||||
|
'gdmflexiserver.c',
|
||||||
|
dependencies: gdm_flexiserver_deps,
|
||||||
|
include_directories: config_h_dir,
|
||||||
|
install: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
-# gdm-screenshot
|
||||||
|
-gdm_screenshot_deps = [
|
||||||
|
- glib_dep,
|
||||||
|
- gtk_dep,
|
||||||
|
- x_deps,
|
||||||
|
- libcanberra_gtk_dep,
|
||||||
|
-]
|
||||||
|
-
|
||||||
|
-gdm_screenshot = executable('gdm-screenshot',
|
||||||
|
- 'gdm-screenshot.c',
|
||||||
|
- dependencies: gdm_screenshot_deps,
|
||||||
|
- include_directories: config_h_dir,
|
||||||
|
- install: true,
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
# gdm-runtime-config
|
||||||
|
gdm_runtime_config_deps = [
|
||||||
|
glib_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
gdm_runtime_config = executable('gdm-runtime-config',
|
||||||
|
'gdm-runtime-config.c',
|
||||||
|
dependencies: gdm_runtime_config_deps,
|
||||||
|
include_directories: config_h_dir,
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('libexecdir'),
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -0,0 +1,565 @@
|
|||||||
|
From f0dce28fa02210caa445e96d9cbec1d150b79e80 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Wed, 15 Aug 2018 10:48:16 -0400
|
||||||
|
Subject: [PATCH 1/4] worker: don't load user settings for program sessions
|
||||||
|
|
||||||
|
We don't need or want the login greeter to access accountsservice
|
||||||
|
for its session name
|
||||||
|
---
|
||||||
|
daemon/gdm-session-worker.c | 37 ++++++++++++++++++++++++++-----------
|
||||||
|
1 file changed, 26 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
|
||||||
|
index 9b8e0d87..438348df 100644
|
||||||
|
--- a/daemon/gdm-session-worker.c
|
||||||
|
+++ b/daemon/gdm-session-worker.c
|
||||||
|
@@ -400,103 +400,108 @@ gdm_session_execute (const char *file,
|
||||||
|
*/
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_get_username (GdmSessionWorker *worker,
|
||||||
|
char **username)
|
||||||
|
{
|
||||||
|
gconstpointer item;
|
||||||
|
|
||||||
|
g_assert (worker->priv->pam_handle != NULL);
|
||||||
|
|
||||||
|
if (pam_get_item (worker->priv->pam_handle, PAM_USER, &item) == PAM_SUCCESS) {
|
||||||
|
if (username != NULL) {
|
||||||
|
*username = g_strdup ((char *) item);
|
||||||
|
g_debug ("GdmSessionWorker: username is '%s'",
|
||||||
|
*username != NULL ? *username : "<unset>");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (worker->priv->auditor != NULL) {
|
||||||
|
gdm_session_auditor_set_username (worker->priv->auditor, (char *)item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
attempt_to_load_user_settings (GdmSessionWorker *worker,
|
||||||
|
const char *username)
|
||||||
|
{
|
||||||
|
+ if (worker->priv->user_settings == NULL)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (gdm_session_settings_is_loaded (worker->priv->user_settings))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
g_debug ("GdmSessionWorker: attempting to load user settings");
|
||||||
|
gdm_session_settings_load (worker->priv->user_settings,
|
||||||
|
username);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_session_worker_update_username (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
char *username;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
|
username = NULL;
|
||||||
|
res = gdm_session_worker_get_username (worker, &username);
|
||||||
|
if (res) {
|
||||||
|
g_debug ("GdmSessionWorker: old-username='%s' new-username='%s'",
|
||||||
|
worker->priv->username != NULL ? worker->priv->username : "<unset>",
|
||||||
|
username != NULL ? username : "<unset>");
|
||||||
|
|
||||||
|
|
||||||
|
gdm_session_auditor_set_username (worker->priv->auditor, worker->priv->username);
|
||||||
|
|
||||||
|
if ((worker->priv->username == username) ||
|
||||||
|
((worker->priv->username != NULL) && (username != NULL) &&
|
||||||
|
(strcmp (worker->priv->username, username) == 0)))
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
g_debug ("GdmSessionWorker: setting username to '%s'", username);
|
||||||
|
|
||||||
|
g_free (worker->priv->username);
|
||||||
|
worker->priv->username = username;
|
||||||
|
username = NULL;
|
||||||
|
|
||||||
|
gdm_dbus_worker_emit_username_changed (GDM_DBUS_WORKER (worker),
|
||||||
|
worker->priv->username);
|
||||||
|
|
||||||
|
/* We have a new username to try. If we haven't been able to
|
||||||
|
* read user settings up until now, then give it a go now
|
||||||
|
* (see the comment in do_setup for rationale on why it's useful
|
||||||
|
* to keep trying to read settings)
|
||||||
|
*/
|
||||||
|
if (worker->priv->username != NULL &&
|
||||||
|
- worker->priv->username[0] != '\0' &&
|
||||||
|
- !gdm_session_settings_is_loaded (worker->priv->user_settings)) {
|
||||||
|
+ worker->priv->username[0] != '\0') {
|
||||||
|
attempt_to_load_user_settings (worker, worker->priv->username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
g_free (username);
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_ask_question (GdmSessionWorker *worker,
|
||||||
|
const char *question,
|
||||||
|
char **answerp)
|
||||||
|
{
|
||||||
|
return gdm_dbus_worker_manager_call_info_query_sync (worker->priv->manager,
|
||||||
|
worker->priv->service,
|
||||||
|
question,
|
||||||
|
answerp,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_ask_for_secret (GdmSessionWorker *worker,
|
||||||
|
const char *question,
|
||||||
|
char **answerp)
|
||||||
|
{
|
||||||
|
return gdm_dbus_worker_manager_call_secret_info_query_sync (worker->priv->manager,
|
||||||
|
worker->priv->service,
|
||||||
|
question,
|
||||||
|
answerp,
|
||||||
|
@@ -2598,87 +2603,89 @@ gdm_session_worker_get_property (GObject *object,
|
||||||
|
g_value_set_boolean (value, self->priv->is_reauth_session);
|
||||||
|
break;
|
||||||
|
case PROP_STATE:
|
||||||
|
g_value_set_enum (value, self->priv->state);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_set_environment_variable (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *key,
|
||||||
|
const char *value)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
|
||||||
|
gdm_session_worker_set_environment_variable (worker, key, value);
|
||||||
|
gdm_dbus_worker_complete_set_environment_variable (object, invocation);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_set_session_name (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *session_name)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
|
||||||
|
g_debug ("GdmSessionWorker: session name set to %s", session_name);
|
||||||
|
- gdm_session_settings_set_session_name (worker->priv->user_settings,
|
||||||
|
- session_name);
|
||||||
|
+ if (worker->priv->user_settings != NULL)
|
||||||
|
+ gdm_session_settings_set_session_name (worker->priv->user_settings,
|
||||||
|
+ session_name);
|
||||||
|
gdm_dbus_worker_complete_set_session_name (object, invocation);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_set_session_display_mode (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *str)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
|
||||||
|
g_debug ("GdmSessionWorker: session display mode set to %s", str);
|
||||||
|
worker->priv->display_mode = gdm_session_display_mode_from_string (str);
|
||||||
|
gdm_dbus_worker_complete_set_session_display_mode (object, invocation);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_set_language_name (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *language_name)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
|
||||||
|
g_debug ("GdmSessionWorker: language name set to %s", language_name);
|
||||||
|
- gdm_session_settings_set_language_name (worker->priv->user_settings,
|
||||||
|
- language_name);
|
||||||
|
+ if (worker->priv->user_settings != NULL)
|
||||||
|
+ gdm_session_settings_set_language_name (worker->priv->user_settings,
|
||||||
|
+ language_name);
|
||||||
|
gdm_dbus_worker_complete_set_language_name (object, invocation);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_saved_language_name_read (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
char *language_name;
|
||||||
|
|
||||||
|
language_name = gdm_session_settings_get_language_name (worker->priv->user_settings);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionWorker: Saved language is %s", language_name);
|
||||||
|
gdm_dbus_worker_emit_saved_language_name_read (GDM_DBUS_WORKER (worker),
|
||||||
|
language_name);
|
||||||
|
g_free (language_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_saved_session_name_read (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
char *session_name;
|
||||||
|
|
||||||
|
session_name = gdm_session_settings_get_session_name (worker->priv->user_settings);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionWorker: Saved session is %s", session_name);
|
||||||
|
gdm_dbus_worker_emit_saved_session_name_read (GDM_DBUS_WORKER (worker),
|
||||||
|
session_name);
|
||||||
|
g_free (session_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2756,110 +2763,113 @@ do_authorize (GdmSessionWorker *worker)
|
||||||
|
g_dbus_method_invocation_take_error (worker->priv->pending_invocation, error);
|
||||||
|
}
|
||||||
|
worker->priv->pending_invocation = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
do_accredit (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
GError *error;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
|
/* get kerberos tickets, setup group lists, etc
|
||||||
|
*/
|
||||||
|
error = NULL;
|
||||||
|
res = gdm_session_worker_accredit_user (worker, &error);
|
||||||
|
|
||||||
|
if (res) {
|
||||||
|
gdm_dbus_worker_complete_establish_credentials (GDM_DBUS_WORKER (worker), worker->priv->pending_invocation);
|
||||||
|
} else {
|
||||||
|
g_dbus_method_invocation_take_error (worker->priv->pending_invocation, error);
|
||||||
|
}
|
||||||
|
worker->priv->pending_invocation = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_account_details_now (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
g_assert (worker->priv->state == GDM_SESSION_WORKER_STATE_ACCREDITED);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionWorker: saving account details for user %s", worker->priv->username);
|
||||||
|
+
|
||||||
|
gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_ACCOUNT_DETAILS_SAVED);
|
||||||
|
- if (!gdm_session_settings_save (worker->priv->user_settings,
|
||||||
|
- worker->priv->username)) {
|
||||||
|
- g_warning ("could not save session and language settings");
|
||||||
|
+ if (worker->priv->user_settings != NULL) {
|
||||||
|
+ if (!gdm_session_settings_save (worker->priv->user_settings,
|
||||||
|
+ worker->priv->username)) {
|
||||||
|
+ g_warning ("could not save session and language settings");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
queue_state_change (worker);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_settings_is_loaded_changed (GdmSessionSettings *user_settings,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
if (!gdm_session_settings_is_loaded (worker->priv->user_settings)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These signal handlers should be disconnected after the loading,
|
||||||
|
* so that gdm_session_settings_set_* APIs don't cause the emitting
|
||||||
|
* of Saved*NameRead D-Bus signals any more.
|
||||||
|
*/
|
||||||
|
g_signal_handlers_disconnect_by_func (worker->priv->user_settings,
|
||||||
|
G_CALLBACK (on_saved_session_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (worker->priv->user_settings,
|
||||||
|
G_CALLBACK (on_saved_language_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
if (worker->priv->state == GDM_SESSION_WORKER_STATE_NONE) {
|
||||||
|
g_debug ("GdmSessionWorker: queuing setup for user: %s %s",
|
||||||
|
worker->priv->username, worker->priv->display_device);
|
||||||
|
queue_state_change (worker);
|
||||||
|
} else if (worker->priv->state == GDM_SESSION_WORKER_STATE_ACCREDITED) {
|
||||||
|
save_account_details_now (worker);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (worker->priv->user_settings),
|
||||||
|
G_CALLBACK (on_settings_is_loaded_changed),
|
||||||
|
worker);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
do_save_account_details_when_ready (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
g_assert (worker->priv->state == GDM_SESSION_WORKER_STATE_ACCREDITED);
|
||||||
|
|
||||||
|
- if (!gdm_session_settings_is_loaded (worker->priv->user_settings)) {
|
||||||
|
+ if (worker->priv->user_settings != NULL && !gdm_session_settings_is_loaded (worker->priv->user_settings)) {
|
||||||
|
g_signal_connect (G_OBJECT (worker->priv->user_settings),
|
||||||
|
"notify::is-loaded",
|
||||||
|
G_CALLBACK (on_settings_is_loaded_changed),
|
||||||
|
worker);
|
||||||
|
g_debug ("GdmSessionWorker: user %s, not fully loaded yet, will save account details later",
|
||||||
|
worker->priv->username);
|
||||||
|
gdm_session_settings_load (worker->priv->user_settings,
|
||||||
|
worker->priv->username);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
save_account_details_now (worker);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
do_open_session (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
GError *error;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
res = gdm_session_worker_open_session (worker, &error);
|
||||||
|
|
||||||
|
if (res) {
|
||||||
|
char *session_id = worker->priv->session_id;
|
||||||
|
if (session_id == NULL) {
|
||||||
|
session_id = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
gdm_dbus_worker_complete_open (GDM_DBUS_WORKER (worker), worker->priv->pending_invocation, session_id);
|
||||||
|
@@ -3103,155 +3113,161 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object,
|
||||||
|
if (g_strcmp0 (key, "service") == 0) {
|
||||||
|
worker->priv->service = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "extensions") == 0) {
|
||||||
|
worker->priv->extensions = filter_extensions (g_variant_get_strv (value, NULL));
|
||||||
|
} else if (g_strcmp0 (key, "username") == 0) {
|
||||||
|
worker->priv->username = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "is-program-session") == 0) {
|
||||||
|
worker->priv->is_program_session = g_variant_get_boolean (value);
|
||||||
|
} else if (g_strcmp0 (key, "log-file") == 0) {
|
||||||
|
worker->priv->log_file = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "x11-display-name") == 0) {
|
||||||
|
worker->priv->x11_display_name = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "x11-authority-file") == 0) {
|
||||||
|
worker->priv->x11_authority_file = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "console") == 0) {
|
||||||
|
worker->priv->display_device = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "seat-id") == 0) {
|
||||||
|
worker->priv->display_seat_id = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "hostname") == 0) {
|
||||||
|
worker->priv->hostname = g_variant_dup_string (value, NULL);
|
||||||
|
} else if (g_strcmp0 (key, "display-is-local") == 0) {
|
||||||
|
worker->priv->display_is_local = g_variant_get_boolean (value);
|
||||||
|
} else if (g_strcmp0 (key, "display-is-initial") == 0) {
|
||||||
|
worker->priv->display_is_initial = g_variant_get_boolean (value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
worker->priv->pending_invocation = invocation;
|
||||||
|
|
||||||
|
if (!worker->priv->is_program_session) {
|
||||||
|
+ worker->priv->user_settings = gdm_session_settings_new ();
|
||||||
|
+
|
||||||
|
g_signal_connect_swapped (worker->priv->user_settings,
|
||||||
|
"notify::language-name",
|
||||||
|
G_CALLBACK (on_saved_language_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
g_signal_connect_swapped (worker->priv->user_settings,
|
||||||
|
"notify::session-name",
|
||||||
|
G_CALLBACK (on_saved_session_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
if (worker->priv->username) {
|
||||||
|
wait_for_settings = !gdm_session_settings_load (worker->priv->user_settings,
|
||||||
|
worker->priv->username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wait_for_settings) {
|
||||||
|
/* Load settings from accounts daemon before continuing
|
||||||
|
*/
|
||||||
|
g_signal_connect (G_OBJECT (worker->priv->user_settings),
|
||||||
|
"notify::is-loaded",
|
||||||
|
G_CALLBACK (on_settings_is_loaded_changed),
|
||||||
|
worker);
|
||||||
|
} else {
|
||||||
|
queue_state_change (worker);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_setup (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *service,
|
||||||
|
const char *x11_display_name,
|
||||||
|
const char *x11_authority_file,
|
||||||
|
const char *console,
|
||||||
|
const char *seat_id,
|
||||||
|
const char *hostname,
|
||||||
|
gboolean display_is_local,
|
||||||
|
gboolean display_is_initial)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
|
||||||
|
validate_and_queue_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE);
|
||||||
|
|
||||||
|
worker->priv->service = g_strdup (service);
|
||||||
|
worker->priv->x11_display_name = g_strdup (x11_display_name);
|
||||||
|
worker->priv->x11_authority_file = g_strdup (x11_authority_file);
|
||||||
|
worker->priv->display_device = g_strdup (console);
|
||||||
|
worker->priv->display_seat_id = g_strdup (seat_id);
|
||||||
|
worker->priv->hostname = g_strdup (hostname);
|
||||||
|
worker->priv->display_is_local = display_is_local;
|
||||||
|
worker->priv->display_is_initial = display_is_initial;
|
||||||
|
worker->priv->username = NULL;
|
||||||
|
|
||||||
|
+ worker->priv->user_settings = gdm_session_settings_new ();
|
||||||
|
+
|
||||||
|
g_signal_connect_swapped (worker->priv->user_settings,
|
||||||
|
"notify::language-name",
|
||||||
|
G_CALLBACK (on_saved_language_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
g_signal_connect_swapped (worker->priv->user_settings,
|
||||||
|
"notify::session-name",
|
||||||
|
G_CALLBACK (on_saved_session_name_read),
|
||||||
|
worker);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_setup_for_user (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *service,
|
||||||
|
const char *username,
|
||||||
|
const char *x11_display_name,
|
||||||
|
const char *x11_authority_file,
|
||||||
|
const char *console,
|
||||||
|
const char *seat_id,
|
||||||
|
const char *hostname,
|
||||||
|
gboolean display_is_local,
|
||||||
|
gboolean display_is_initial)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
|
||||||
|
|
||||||
|
if (!validate_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
worker->priv->service = g_strdup (service);
|
||||||
|
worker->priv->x11_display_name = g_strdup (x11_display_name);
|
||||||
|
worker->priv->x11_authority_file = g_strdup (x11_authority_file);
|
||||||
|
worker->priv->display_device = g_strdup (console);
|
||||||
|
worker->priv->display_seat_id = g_strdup (seat_id);
|
||||||
|
worker->priv->hostname = g_strdup (hostname);
|
||||||
|
worker->priv->display_is_local = display_is_local;
|
||||||
|
worker->priv->display_is_initial = display_is_initial;
|
||||||
|
worker->priv->username = g_strdup (username);
|
||||||
|
|
||||||
|
+ worker->priv->user_settings = gdm_session_settings_new ();
|
||||||
|
+
|
||||||
|
g_signal_connect_swapped (worker->priv->user_settings,
|
||||||
|
"notify::language-name",
|
||||||
|
G_CALLBACK (on_saved_language_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
g_signal_connect_swapped (worker->priv->user_settings,
|
||||||
|
"notify::session-name",
|
||||||
|
G_CALLBACK (on_saved_session_name_read),
|
||||||
|
worker);
|
||||||
|
|
||||||
|
/* Load settings from accounts daemon before continuing
|
||||||
|
*/
|
||||||
|
worker->priv->pending_invocation = invocation;
|
||||||
|
if (gdm_session_settings_load (worker->priv->user_settings, username)) {
|
||||||
|
queue_state_change (worker);
|
||||||
|
} else {
|
||||||
|
g_signal_connect (G_OBJECT (worker->priv->user_settings),
|
||||||
|
"notify::is-loaded",
|
||||||
|
G_CALLBACK (on_settings_is_loaded_changed),
|
||||||
|
worker);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gdm_session_worker_handle_setup_for_program (GdmDBusWorker *object,
|
||||||
|
GDBusMethodInvocation *invocation,
|
||||||
|
const char *service,
|
||||||
|
const char *username,
|
||||||
|
@@ -3589,61 +3605,60 @@ static void
|
||||||
|
reauthentication_request_free (ReauthenticationRequest *request)
|
||||||
|
{
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (request->session,
|
||||||
|
G_CALLBACK (on_reauthentication_client_connected),
|
||||||
|
request);
|
||||||
|
g_signal_handlers_disconnect_by_func (request->session,
|
||||||
|
G_CALLBACK (on_reauthentication_client_disconnected),
|
||||||
|
request);
|
||||||
|
g_signal_handlers_disconnect_by_func (request->session,
|
||||||
|
G_CALLBACK (on_reauthentication_cancelled),
|
||||||
|
request);
|
||||||
|
g_signal_handlers_disconnect_by_func (request->session,
|
||||||
|
G_CALLBACK (on_reauthentication_conversation_started),
|
||||||
|
request);
|
||||||
|
g_signal_handlers_disconnect_by_func (request->session,
|
||||||
|
G_CALLBACK (on_reauthentication_conversation_stopped),
|
||||||
|
request);
|
||||||
|
g_signal_handlers_disconnect_by_func (request->session,
|
||||||
|
G_CALLBACK (on_reauthentication_verification_complete),
|
||||||
|
request);
|
||||||
|
g_clear_object (&request->session);
|
||||||
|
g_slice_free (ReauthenticationRequest, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_session_worker_init (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
worker->priv = GDM_SESSION_WORKER_GET_PRIVATE (worker);
|
||||||
|
|
||||||
|
- worker->priv->user_settings = gdm_session_settings_new ();
|
||||||
|
worker->priv->reauthentication_requests = g_hash_table_new_full (NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
(GDestroyNotify)
|
||||||
|
reauthentication_request_free);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_session_worker_unwatch_child (GdmSessionWorker *worker)
|
||||||
|
{
|
||||||
|
if (worker->priv->child_watch_id == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_source_remove (worker->priv->child_watch_id);
|
||||||
|
worker->priv->child_watch_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_session_worker_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GdmSessionWorker *worker;
|
||||||
|
|
||||||
|
g_return_if_fail (object != NULL);
|
||||||
|
g_return_if_fail (GDM_IS_SESSION_WORKER (object));
|
||||||
|
|
||||||
|
worker = GDM_SESSION_WORKER (object);
|
||||||
|
|
||||||
|
g_return_if_fail (worker->priv != NULL);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,356 +0,0 @@
|
|||||||
From d3e073fa1cd314b344db1ec22f0add2702a6c299 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Tue, 15 Feb 2022 14:33:22 -0500
|
|
||||||
Subject: [PATCH 2/4] common: Add API to reload settings from disk
|
|
||||||
|
|
||||||
Ideally we would reread /run/gdm/custom.conf after we've decided
|
|
||||||
graphics setup is complete. This is because the file may not
|
|
||||||
get written out by udev until after GDM is already started and waiting.
|
|
||||||
|
|
||||||
As a first step to get there, this commit adds an API for rereading
|
|
||||||
the file, and changes the SIGHUP handler to use it (instead of
|
|
||||||
the complete teardown and reinitialization it was doing before).
|
|
||||||
---
|
|
||||||
common/gdm-settings-direct.c | 9 +++++++++
|
|
||||||
common/gdm-settings-direct.h | 2 ++
|
|
||||||
common/gdm-settings.c | 14 ++++++++++++--
|
|
||||||
common/gdm-settings.h | 1 +
|
|
||||||
daemon/main.c | 12 ++----------
|
|
||||||
5 files changed, 26 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/common/gdm-settings-direct.c b/common/gdm-settings-direct.c
|
|
||||||
index ddb31908..5fbe0326 100644
|
|
||||||
--- a/common/gdm-settings-direct.c
|
|
||||||
+++ b/common/gdm-settings-direct.c
|
|
||||||
@@ -224,35 +224,44 @@ hashify_list (GdmSettingsEntry *entry,
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gdm_settings_direct_init (GdmSettings *settings,
|
|
||||||
const char *file,
|
|
||||||
const char *root)
|
|
||||||
{
|
|
||||||
GSList *list;
|
|
||||||
|
|
||||||
g_return_val_if_fail (file != NULL, FALSE);
|
|
||||||
g_return_val_if_fail (root != NULL, FALSE);
|
|
||||||
|
|
||||||
g_debug ("Settings Direct Init");
|
|
||||||
if (schemas != NULL) {
|
|
||||||
g_hash_table_unref (schemas);
|
|
||||||
schemas = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! gdm_settings_parse_schemas (file, root, &list)) {
|
|
||||||
g_warning ("Unable to parse schemas");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
schemas = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)gdm_settings_entry_free);
|
|
||||||
g_slist_foreach (list, (GFunc)hashify_list, NULL);
|
|
||||||
|
|
||||||
settings_object = settings;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+gdm_settings_direct_reload (void)
|
|
||||||
+{
|
|
||||||
+ if (!settings_object)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ gdm_settings_reload (settings_object);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void
|
|
||||||
gdm_settings_direct_shutdown (void)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
diff --git a/common/gdm-settings-direct.h b/common/gdm-settings-direct.h
|
|
||||||
index 156489cd..6754955f 100644
|
|
||||||
--- a/common/gdm-settings-direct.h
|
|
||||||
+++ b/common/gdm-settings-direct.h
|
|
||||||
@@ -3,48 +3,50 @@
|
|
||||||
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __GDM_SETTINGS_DIRECT_H
|
|
||||||
#define __GDM_SETTINGS_DIRECT_H
|
|
||||||
|
|
||||||
#include <glib-object.h>
|
|
||||||
#include "gdm-settings.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
gboolean gdm_settings_direct_init (GdmSettings *settings,
|
|
||||||
const char *schemas_file,
|
|
||||||
const char *root);
|
|
||||||
+
|
|
||||||
+void gdm_settings_direct_reload (void);
|
|
||||||
void gdm_settings_direct_shutdown (void);
|
|
||||||
|
|
||||||
gboolean gdm_settings_direct_get (const char *key,
|
|
||||||
GValue *value);
|
|
||||||
gboolean gdm_settings_direct_set (const char *key,
|
|
||||||
GValue *value);
|
|
||||||
gboolean gdm_settings_direct_get_int (const char *key,
|
|
||||||
int *value);
|
|
||||||
gboolean gdm_settings_direct_get_uint (const char *key,
|
|
||||||
uint *value);
|
|
||||||
gboolean gdm_settings_direct_get_boolean (const char *key,
|
|
||||||
gboolean *value);
|
|
||||||
gboolean gdm_settings_direct_get_string (const char *key,
|
|
||||||
char **value);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GDM_SETTINGS_DIRECT_H */
|
|
||||||
diff --git a/common/gdm-settings.c b/common/gdm-settings.c
|
|
||||||
index e6f46ec3..96c2f8d3 100644
|
|
||||||
--- a/common/gdm-settings.c
|
|
||||||
+++ b/common/gdm-settings.c
|
|
||||||
@@ -157,84 +157,94 @@ gdm_settings_class_init (GdmSettingsClass *klass)
|
|
||||||
object_class->finalize = gdm_settings_finalize;
|
|
||||||
|
|
||||||
signals [VALUE_CHANGED] =
|
|
||||||
g_signal_new ("value-changed",
|
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
g_cclosure_marshal_generic,
|
|
||||||
G_TYPE_NONE,
|
|
||||||
3,
|
|
||||||
G_TYPE_STRING,
|
|
||||||
G_TYPE_STRING,
|
|
||||||
G_TYPE_STRING);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
backend_value_changed (GdmSettingsBackend *backend,
|
|
||||||
const char *key,
|
|
||||||
const char *old_value,
|
|
||||||
const char *new_value,
|
|
||||||
GdmSettings *settings)
|
|
||||||
{
|
|
||||||
g_debug ("Emitting value-changed %s %s %s", key, old_value, new_value);
|
|
||||||
|
|
||||||
/* proxy it to internal listeners */
|
|
||||||
g_signal_emit (settings, signals [VALUE_CHANGED], 0, key, old_value, new_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void
|
|
||||||
-gdm_settings_init (GdmSettings *settings)
|
|
||||||
+void
|
|
||||||
+gdm_settings_reload (GdmSettings *settings)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
GdmSettingsBackend *backend;
|
|
||||||
|
|
||||||
+ g_list_foreach (settings->backends, (GFunc) g_object_unref, NULL);
|
|
||||||
+ g_list_free (settings->backends);
|
|
||||||
+ settings->backends = NULL;
|
|
||||||
+
|
|
||||||
backend = gdm_settings_desktop_backend_new (GDM_CUSTOM_CONF);
|
|
||||||
if (backend)
|
|
||||||
settings->backends = g_list_prepend (NULL, backend);
|
|
||||||
|
|
||||||
backend = gdm_settings_desktop_backend_new (GDM_RUNTIME_CONF);
|
|
||||||
if (backend)
|
|
||||||
settings->backends = g_list_prepend (settings->backends, backend);
|
|
||||||
|
|
||||||
for (l = settings->backends; l; l = g_list_next (l)) {
|
|
||||||
backend = l->data;
|
|
||||||
|
|
||||||
g_signal_connect (backend,
|
|
||||||
"value-changed",
|
|
||||||
G_CALLBACK (backend_value_changed),
|
|
||||||
settings);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+gdm_settings_init (GdmSettings *settings)
|
|
||||||
+{
|
|
||||||
+ gdm_settings_reload (settings);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
gdm_settings_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GdmSettings *settings;
|
|
||||||
|
|
||||||
g_return_if_fail (object != NULL);
|
|
||||||
g_return_if_fail (GDM_IS_SETTINGS (object));
|
|
||||||
|
|
||||||
settings = GDM_SETTINGS (object);
|
|
||||||
|
|
||||||
g_return_if_fail (settings != NULL);
|
|
||||||
|
|
||||||
g_list_foreach (settings->backends, (GFunc) g_object_unref, NULL);
|
|
||||||
g_list_free (settings->backends);
|
|
||||||
settings->backends = NULL;
|
|
||||||
|
|
||||||
settings_object = NULL;
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gdm_settings_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
GdmSettings *
|
|
||||||
gdm_settings_new (void)
|
|
||||||
{
|
|
||||||
if (settings_object != NULL) {
|
|
||||||
g_object_ref (settings_object);
|
|
||||||
} else {
|
|
||||||
settings_object = g_object_new (GDM_TYPE_SETTINGS, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/common/gdm-settings.h b/common/gdm-settings.h
|
|
||||||
index 786868a9..07b64785 100644
|
|
||||||
--- a/common/gdm-settings.h
|
|
||||||
+++ b/common/gdm-settings.h
|
|
||||||
@@ -13,45 +13,46 @@
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __GDM_SETTINGS_H
|
|
||||||
#define __GDM_SETTINGS_H
|
|
||||||
|
|
||||||
#include <glib-object.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GDM_TYPE_SETTINGS (gdm_settings_get_type ())
|
|
||||||
G_DECLARE_FINAL_TYPE (GdmSettings, gdm_settings, GDM, SETTINGS, GObject)
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GDM_SETTINGS_ERROR_GENERAL,
|
|
||||||
GDM_SETTINGS_ERROR_KEY_NOT_FOUND
|
|
||||||
} GdmSettingsError;
|
|
||||||
|
|
||||||
#define GDM_SETTINGS_ERROR gdm_settings_error_quark ()
|
|
||||||
|
|
||||||
GQuark gdm_settings_error_quark (void);
|
|
||||||
|
|
||||||
GdmSettings * gdm_settings_new (void);
|
|
||||||
+void gdm_settings_reload (GdmSettings *settings);
|
|
||||||
|
|
||||||
/* exported */
|
|
||||||
|
|
||||||
gboolean gdm_settings_get_value (GdmSettings *settings,
|
|
||||||
const char *key,
|
|
||||||
char **value,
|
|
||||||
GError **error);
|
|
||||||
gboolean gdm_settings_set_value (GdmSettings *settings,
|
|
||||||
const char *key,
|
|
||||||
const char *value,
|
|
||||||
GError **error);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GDM_SETTINGS_H */
|
|
||||||
diff --git a/daemon/main.c b/daemon/main.c
|
|
||||||
index 1b893fe0..344d1b74 100644
|
|
||||||
--- a/daemon/main.c
|
|
||||||
+++ b/daemon/main.c
|
|
||||||
@@ -240,70 +240,62 @@ gdm_daemon_lookup_user (uid_t *uidp,
|
|
||||||
if G_UNLIKELY (gid == 0) {
|
|
||||||
gdm_fail (_("The GDM group should not be root. Aborting!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uidp != NULL) {
|
|
||||||
*uidp = uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gidp != NULL) {
|
|
||||||
*gidp = gid;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (username);
|
|
||||||
g_free (groupname);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
on_shutdown_signal_cb (gpointer user_data)
|
|
||||||
{
|
|
||||||
GMainLoop *mainloop = user_data;
|
|
||||||
|
|
||||||
g_main_loop_quit (mainloop);
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
on_sighup_cb (gpointer user_data)
|
|
||||||
{
|
|
||||||
g_debug ("Got HUP signal");
|
|
||||||
- /* Reread config stuff like system config files, VPN service
|
|
||||||
- * files, etc
|
|
||||||
- */
|
|
||||||
- g_object_unref (settings);
|
|
||||||
- settings = gdm_settings_new ();
|
|
||||||
- if (settings != NULL) {
|
|
||||||
- if (! gdm_settings_direct_init (settings, DATADIR "/gdm/gdm.schemas", "/")) {
|
|
||||||
- g_warning ("Unable to initialize settings");
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+
|
|
||||||
+ gdm_settings_reload (settings);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_debug_set (void)
|
|
||||||
{
|
|
||||||
gboolean debug;
|
|
||||||
gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
|
|
||||||
return debug;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* SIGUSR1 is used by the X server to tell us that we're ready, so
|
|
||||||
* block it. We'll unblock it in the worker thread in gdm-server.c
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
block_sigusr1 (void)
|
|
||||||
{
|
|
||||||
sigset_t mask;
|
|
||||||
|
|
||||||
sigemptyset (&mask);
|
|
||||||
sigaddset (&mask, SIGUSR1);
|
|
||||||
sigprocmask (SIG_BLOCK, &mask, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main (int argc,
|
|
||||||
char **argv)
|
|
||||||
{
|
|
||||||
GMainLoop *main_loop;
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
|||||||
From b09ab8a73d5a4133f72846d529bbbfb7802ca535 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Mon, 6 Sep 2021 08:40:46 -0400
|
|
||||||
Subject: [PATCH 2/5] daemon: Don't update session type if no saved session
|
|
||||||
|
|
||||||
At the moment we always set the session type when the session name
|
|
||||||
is read. But users don't always have a session type specified.
|
|
||||||
|
|
||||||
If they don't, then don't set the session type.
|
|
||||||
|
|
||||||
https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/153
|
|
||||||
---
|
|
||||||
daemon/gdm-session.c | 23 +++++++++++++----------
|
|
||||||
1 file changed, 13 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
|
||||||
index 2b941e5e..b54687d5 100644
|
|
||||||
--- a/daemon/gdm-session.c
|
|
||||||
+++ b/daemon/gdm-session.c
|
|
||||||
@@ -995,73 +995,76 @@ worker_on_reauthenticated (GdmDBusWorker *worker,
|
|
||||||
static void
|
|
||||||
worker_on_saved_language_name_read (GdmDBusWorker *worker,
|
|
||||||
const char *language_name,
|
|
||||||
GdmSessionConversation *conversation)
|
|
||||||
{
|
|
||||||
GdmSession *self = conversation->session;
|
|
||||||
|
|
||||||
if (strlen (language_name) > 0) {
|
|
||||||
g_free (self->saved_language);
|
|
||||||
self->saved_language = g_strdup (language_name);
|
|
||||||
|
|
||||||
if (self->greeter_interface != NULL) {
|
|
||||||
gdm_dbus_greeter_emit_default_language_name_changed (self->greeter_interface,
|
|
||||||
language_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
worker_on_saved_session_name_read (GdmDBusWorker *worker,
|
|
||||||
const char *session_name,
|
|
||||||
GdmSessionConversation *conversation)
|
|
||||||
{
|
|
||||||
GdmSession *self = conversation->session;
|
|
||||||
|
|
||||||
if (! get_session_command_for_name (self, session_name, self->saved_session_type, NULL)) {
|
|
||||||
/* ignore sessions that don't exist */
|
|
||||||
g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name);
|
|
||||||
g_free (self->saved_session);
|
|
||||||
self->saved_session = NULL;
|
|
||||||
- } else if (strcmp (session_name,
|
|
||||||
- get_default_session_name (self)) != 0) {
|
|
||||||
- g_free (self->saved_session);
|
|
||||||
- self->saved_session = g_strdup (session_name);
|
|
||||||
-
|
|
||||||
- if (self->greeter_interface != NULL) {
|
|
||||||
- gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface,
|
|
||||||
- session_name);
|
|
||||||
+ update_session_type (self);
|
|
||||||
+ } else {
|
|
||||||
+ if (strcmp (session_name,
|
|
||||||
+ get_default_session_name (self)) != 0) {
|
|
||||||
+ g_free (self->saved_session);
|
|
||||||
+ self->saved_session = g_strdup (session_name);
|
|
||||||
+
|
|
||||||
+ if (self->greeter_interface != NULL) {
|
|
||||||
+ gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface,
|
|
||||||
+ session_name);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
+ if (self->saved_session_type != NULL)
|
|
||||||
+ set_session_type (self, self->saved_session_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
- update_session_type (self);
|
|
||||||
-
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
worker_on_saved_session_type_read (GdmDBusWorker *worker,
|
|
||||||
const char *session_type,
|
|
||||||
GdmSessionConversation *conversation)
|
|
||||||
{
|
|
||||||
GdmSession *self = conversation->session;
|
|
||||||
|
|
||||||
g_free (self->saved_session_type);
|
|
||||||
self->saved_session_type = g_strdup (session_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GdmSessionConversation *
|
|
||||||
find_conversation_by_pid (GdmSession *self,
|
|
||||||
GPid pid)
|
|
||||||
{
|
|
||||||
GHashTableIter iter;
|
|
||||||
gpointer key, value;
|
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, self->conversations);
|
|
||||||
while (g_hash_table_iter_next (&iter, &key, &value)) {
|
|
||||||
GdmSessionConversation *conversation;
|
|
||||||
|
|
||||||
conversation = (GdmSessionConversation *) value;
|
|
||||||
|
|
||||||
if (conversation->worker_pid == pid) {
|
|
||||||
return conversation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From cc67c8de39358031fddc5ca7d8c993271d6606a7 Mon Sep 17 00:00:00 2001
|
From d3823a5084e12d8f342fd4cbec29e23bdb646de7 Mon Sep 17 00:00:00 2001
|
||||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
Date: Thu, 7 Oct 2021 18:22:11 -0700
|
Date: Thu, 7 Oct 2021 18:22:11 -0700
|
||||||
Subject: [PATCH 2/2] daemon: Support X servers built with -Dlisten_tcp=true
|
Subject: [PATCH 2/2] daemon: Support X servers built with -Dlisten_tcp=true
|
||||||
@ -112,7 +112,7 @@ index 1ba00d45..e5d23521 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
|
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
|
||||||
index 5962da57..0b07ab5b 100644
|
index b1548361..d2a8aeb3 100644
|
||||||
--- a/daemon/gdm-x-session.c
|
--- a/daemon/gdm-x-session.c
|
||||||
+++ b/daemon/gdm-x-session.c
|
+++ b/daemon/gdm-x-session.c
|
||||||
@@ -233,70 +233,70 @@ spawn_x_server (State *state,
|
@@ -233,70 +233,70 @@ spawn_x_server (State *state,
|
||||||
@ -193,7 +193,7 @@ index 5962da57..0b07ab5b 100644
|
|||||||
if (subprocess == NULL) {
|
if (subprocess == NULL) {
|
||||||
g_debug ("could not start X server: %s", error->message);
|
g_debug ("could not start X server: %s", error->message);
|
||||||
diff --git a/meson.build b/meson.build
|
diff --git a/meson.build b/meson.build
|
||||||
index 52ac1941..02d609dc 100644
|
index 06d09659..8328dd97 100644
|
||||||
--- a/meson.build
|
--- a/meson.build
|
||||||
+++ b/meson.build
|
+++ b/meson.build
|
||||||
@@ -44,61 +44,61 @@ glib_min_version = '2.56.0'
|
@@ -44,61 +44,61 @@ glib_min_version = '2.56.0'
|
||||||
@ -250,7 +250,7 @@ index 52ac1941..02d609dc 100644
|
|||||||
endif
|
endif
|
||||||
xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
|
xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
|
||||||
if xdmcp_dep.found() and get_option('tcp-wrappers')
|
if xdmcp_dep.found() and get_option('tcp-wrappers')
|
||||||
libwrap_dep = cc.find_library('wrap')
|
libwrap_dep = cc.find_library('libwrap')
|
||||||
endif
|
endif
|
||||||
# systemd
|
# systemd
|
||||||
systemd_dep = dependency('systemd')
|
systemd_dep = dependency('systemd')
|
||||||
@ -323,5 +323,5 @@ index 52ac1941..02d609dc 100644
|
|||||||
|
|
||||||
# Subdirs
|
# Subdirs
|
||||||
--
|
--
|
||||||
2.34.1
|
2.33.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From ea1de1173b46f76fe00b4f52b2b71ad16e35acc3 Mon Sep 17 00:00:00 2001
|
From 874b26e3674d540df37d7f145df853bcf81e5a26 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Wed, 5 Feb 2020 15:20:48 -0500
|
Date: Wed, 5 Feb 2020 15:20:48 -0500
|
||||||
Subject: [PATCH 2/3] gdm-x-session: run session bus on non-seat0 seats
|
Subject: [PATCH 2/3] gdm-x-session: run session bus on non-seat0 seats
|
||||||
@ -13,10 +13,10 @@ seats get their own session bus.
|
|||||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
||||||
index a65fa0f9..f13b54af 100644
|
index 418240dc0..77d6b8ff0 100644
|
||||||
--- a/daemon/gdm-session.c
|
--- a/daemon/gdm-session.c
|
||||||
+++ b/daemon/gdm-session.c
|
+++ b/daemon/gdm-session.c
|
||||||
@@ -2864,119 +2864,128 @@ on_start_program_cb (GdmDBusWorker *worker,
|
@@ -2822,119 +2822,128 @@ on_start_program_cb (GdmDBusWorker *worker,
|
||||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CLOSED) ||
|
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CLOSED) ||
|
||||||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||||
return;
|
return;
|
||||||
@ -147,5 +147,5 @@ index a65fa0f9..f13b54af 100644
|
|||||||
self->selected_program);
|
self->selected_program);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.37.3
|
2.30.1
|
||||||
|
|
||||||
|
131
SOURCES/0002-libgdm-Sort-session-list.patch
Normal file
131
SOURCES/0002-libgdm-Sort-session-list.patch
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
From c00daca1579c47f3f62894ff2378c37e6cbebfd3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Tue, 20 Jul 2021 13:36:45 -0400
|
||||||
|
Subject: [PATCH 2/4] libgdm: Sort session list
|
||||||
|
|
||||||
|
Right now the session list comes out in hash table order.
|
||||||
|
|
||||||
|
This commit changes the code to sort by description.
|
||||||
|
---
|
||||||
|
libgdm/gdm-sessions.c | 19 +++++++++++++++++++
|
||||||
|
1 file changed, 19 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
|
||||||
|
index 97ed5ef3..f078e04b 100644
|
||||||
|
--- a/libgdm/gdm-sessions.c
|
||||||
|
+++ b/libgdm/gdm-sessions.c
|
||||||
|
@@ -311,92 +311,111 @@ collect_sessions (void)
|
||||||
|
g_ptr_array_add (wayland_search_array, g_strdup (wayland_search_dirs[i]));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (gdm_available_sessions_map == NULL) {
|
||||||
|
gdm_available_sessions_map = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||||
|
g_free, (GDestroyNotify)gdm_session_file_free);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!supported_session_types || g_strv_contains ((const char * const *) supported_session_types, "x11")) {
|
||||||
|
for (i = 0; i < xorg_search_array->len; i++) {
|
||||||
|
collect_sessions_from_directory (g_ptr_array_index (xorg_search_array, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||||
|
#ifdef ENABLE_USER_DISPLAY_SERVER
|
||||||
|
if (!supported_session_types || g_strv_contains ((const char * const *) supported_session_types, "wayland")) {
|
||||||
|
for (i = 0; i < wayland_search_array->len; i++) {
|
||||||
|
collect_sessions_from_directory (g_ptr_array_index (wayland_search_array, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
g_hash_table_foreach_remove (gdm_available_sessions_map,
|
||||||
|
remove_duplicate_sessions,
|
||||||
|
names_seen_before);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static gint
|
||||||
|
+compare_session_ids (gconstpointer a,
|
||||||
|
+ gconstpointer b)
|
||||||
|
+{
|
||||||
|
+ GdmSessionFile *session_a, *session_b;
|
||||||
|
+ session_a = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map, a);
|
||||||
|
+ session_b = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map, b);
|
||||||
|
+
|
||||||
|
+ if (session_a == NULL)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ if (session_b == NULL)
|
||||||
|
+ return 1;
|
||||||
|
+
|
||||||
|
+ return g_strcmp0 (session_a->translated_name, session_b->translated_name);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* gdm_get_session_ids:
|
||||||
|
*
|
||||||
|
* Reads /usr/share/xsessions and other relevant places for possible sessions
|
||||||
|
* to log into and returns the complete list.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): a %NULL terminated list of session ids
|
||||||
|
*/
|
||||||
|
char **
|
||||||
|
gdm_get_session_ids (void)
|
||||||
|
{
|
||||||
|
GHashTableIter iter;
|
||||||
|
gpointer key, value;
|
||||||
|
GPtrArray *array;
|
||||||
|
|
||||||
|
if (!gdm_sessions_map_is_initialized) {
|
||||||
|
collect_sessions ();
|
||||||
|
|
||||||
|
gdm_sessions_map_is_initialized = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
array = g_ptr_array_new ();
|
||||||
|
g_hash_table_iter_init (&iter, gdm_available_sessions_map);
|
||||||
|
while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||||
|
GdmSessionFile *session;
|
||||||
|
|
||||||
|
session = (GdmSessionFile *) value;
|
||||||
|
|
||||||
|
g_ptr_array_add (array, g_strdup (session->id));
|
||||||
|
}
|
||||||
|
g_ptr_array_add (array, NULL);
|
||||||
|
|
||||||
|
+ g_ptr_array_sort (array, compare_session_ids);
|
||||||
|
+
|
||||||
|
return (char **) g_ptr_array_free (array, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdm_get_session_name_and_description:
|
||||||
|
* @id: an id from gdm_get_session_ids()
|
||||||
|
* @description: (out): optional returned session description
|
||||||
|
*
|
||||||
|
* Takes an xsession id and returns the name and comment about it.
|
||||||
|
*
|
||||||
|
* Returns: The session name if found, or %NULL otherwise
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
gdm_get_session_name_and_description (const char *id,
|
||||||
|
char **description)
|
||||||
|
{
|
||||||
|
GdmSessionFile *session;
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
if (!gdm_sessions_map_is_initialized) {
|
||||||
|
collect_sessions ();
|
||||||
|
|
||||||
|
gdm_sessions_map_is_initialized = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
session = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map,
|
||||||
|
id);
|
||||||
|
|
||||||
|
if (session == NULL) {
|
||||||
|
return NULL;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From d9dd381a574a02b239438db4fcc9d6ac2fd82ee0 Mon Sep 17 00:00:00 2001
|
From 20725e4c65555178ed64a3cb77ee979ec98998f8 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Wed, 19 Oct 2022 14:50:33 -0400
|
Date: Wed, 19 Oct 2022 14:50:33 -0400
|
||||||
Subject: [PATCH] manager: Fix btmp record accounting
|
Subject: [PATCH 2/2] manager: Fix btmp record accounting
|
||||||
|
|
||||||
Before a user logs in they don't have a display.
|
Before a user logs in they don't have a display.
|
||||||
|
|
||||||
@ -19,10 +19,10 @@ the seat id instead.
|
|||||||
2 files changed, 15 insertions(+), 4 deletions(-)
|
2 files changed, 15 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
||||||
index cc61efc9..e1bc62d7 100644
|
index 4b62b8b1..c70248f3 100644
|
||||||
--- a/daemon/gdm-manager.c
|
--- a/daemon/gdm-manager.c
|
||||||
+++ b/daemon/gdm-manager.c
|
+++ b/daemon/gdm-manager.c
|
||||||
@@ -628,113 +628,120 @@ switch_to_compatible_user_session (GdmManager *manager,
|
@@ -641,113 +641,120 @@ switch_to_compatible_user_session (GdmManager *manager,
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
@ -223,5 +223,5 @@ index 7719d0a8..310323b6 100644
|
|||||||
g_debug ("using ut_type USER_PROCESS");
|
g_debug ("using ut_type USER_PROCESS");
|
||||||
#endif
|
#endif
|
||||||
--
|
--
|
||||||
2.37.3
|
2.31.1
|
||||||
|
|
@ -0,0 +1,119 @@
|
|||||||
|
From 9f4b4ef1b5e1458ca67cff235b655060b27e357b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Graham Rogers <graham@rogers.me.uk>
|
||||||
|
Date: Sun, 18 Apr 2021 12:22:14 +0100
|
||||||
|
Subject: [PATCH 2/2] pam_gdm: Use the last cryptsetup password instead of the
|
||||||
|
first
|
||||||
|
|
||||||
|
---
|
||||||
|
pam_gdm/pam_gdm.c | 32 ++++++++++++++++++++++++++------
|
||||||
|
1 file changed, 26 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pam_gdm/pam_gdm.c b/pam_gdm/pam_gdm.c
|
||||||
|
index 767a6c8c..ef77f161 100644
|
||||||
|
--- a/pam_gdm/pam_gdm.c
|
||||||
|
+++ b/pam_gdm/pam_gdm.c
|
||||||
|
@@ -11,75 +11,95 @@
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <security/_pam_macros.h>
|
||||||
|
#include <security/pam_ext.h>
|
||||||
|
#include <security/pam_misc.h>
|
||||||
|
#include <security/pam_modules.h>
|
||||||
|
#include <security/pam_modutil.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_KEYUTILS
|
||||||
|
#include <keyutils.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
pam_sm_authenticate (pam_handle_t *pamh,
|
||||||
|
int flags,
|
||||||
|
int argc,
|
||||||
|
const char **argv)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_KEYUTILS
|
||||||
|
- int r;
|
||||||
|
- void *cached_password = NULL;
|
||||||
|
+ long r;
|
||||||
|
+ size_t cached_passwords_length;
|
||||||
|
+ char *cached_passwords = NULL;
|
||||||
|
+ char *last_cached_password = NULL;
|
||||||
|
key_serial_t serial;
|
||||||
|
+ size_t i;
|
||||||
|
|
||||||
|
serial = find_key_by_type_and_desc ("user", "cryptsetup", 0);
|
||||||
|
if (serial == 0)
|
||||||
|
return PAM_AUTHINFO_UNAVAIL;
|
||||||
|
|
||||||
|
- r = keyctl_read_alloc (serial, &cached_password);
|
||||||
|
- if (r < 0 || r != strlen (cached_password))
|
||||||
|
+ r = keyctl_read_alloc (serial, &cached_passwords);
|
||||||
|
+ if (r < 0)
|
||||||
|
return PAM_AUTHINFO_UNAVAIL;
|
||||||
|
+
|
||||||
|
+ cached_passwords_length = r;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ Find the last password in the NUL-separated list of passwords.
|
||||||
|
+ Multiple passwords are returned either when the user enters an
|
||||||
|
+ incorrect password or there are multiple encrypted drives.
|
||||||
|
+ In the case of an incorrect password the last one is correct.
|
||||||
|
+ In the case of multiple drives, choosing the last drive is as
|
||||||
|
+ arbitrary a choice as any other, but choosing the last password at
|
||||||
|
+ least supports multiple attempts on the last drive.
|
||||||
|
+ */
|
||||||
|
+ last_cached_password = cached_passwords;
|
||||||
|
+ for (i = 0; i < cached_passwords_length; i++) {
|
||||||
|
+ last_cached_password = cached_passwords + i;
|
||||||
|
+ i += strlen (last_cached_password);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- r = pam_set_item (pamh, PAM_AUTHTOK, cached_password);
|
||||||
|
+ r = pam_set_item (pamh, PAM_AUTHTOK, last_cached_password);
|
||||||
|
|
||||||
|
- free (cached_password);
|
||||||
|
+ free (cached_passwords);
|
||||||
|
|
||||||
|
if (r < 0)
|
||||||
|
return PAM_AUTH_ERR;
|
||||||
|
else
|
||||||
|
return PAM_SUCCESS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return PAM_AUTHINFO_UNAVAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
pam_sm_setcred (pam_handle_t *pamh,
|
||||||
|
int flags,
|
||||||
|
int argc,
|
||||||
|
const char **argv)
|
||||||
|
{
|
||||||
|
return PAM_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
pam_sm_acct_mgmt (pam_handle_t *pamh,
|
||||||
|
int flags,
|
||||||
|
int argc,
|
||||||
|
const char **argv)
|
||||||
|
{
|
||||||
|
return PAM_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
pam_sm_chauthtok (pam_handle_t *pamh,
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,155 +0,0 @@
|
|||||||
From a9928bfcc9c6d81d60e047b7838d4107835b8f89 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Tue, 15 Feb 2022 14:33:22 -0500
|
|
||||||
Subject: [PATCH 3/4] common: Reload settings when graphics initialize
|
|
||||||
|
|
||||||
If GDM starts faster than graphics initialize, then the
|
|
||||||
udev rules that write out /run/gdm/custom.conf might get
|
|
||||||
run too late for GDM to notice.
|
|
||||||
|
|
||||||
This commit changes GDM to reread its config after graphicals
|
|
||||||
initialization completes.
|
|
||||||
|
|
||||||
https://gitlab.gnome.org/GNOME/gdm/-/issues/763
|
|
||||||
---
|
|
||||||
daemon/gdm-local-display-factory.c | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
|
||||||
index 0b1d3482..8bca8ce9 100644
|
|
||||||
--- a/daemon/gdm-local-display-factory.c
|
|
||||||
+++ b/daemon/gdm-local-display-factory.c
|
|
||||||
@@ -1023,64 +1023,66 @@ on_seat_properties_changed (GDBusConnection *connection,
|
|
||||||
g_autoptr(GVariant) changed_prop = NULL;
|
|
||||||
g_autofree const gchar **invalidated_props = NULL;
|
|
||||||
gboolean changed = FALSE;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Extract seat id, i.e. the last element of the object path. */
|
|
||||||
seat = strrchr (object_path, '/');
|
|
||||||
if (seat == NULL)
|
|
||||||
return;
|
|
||||||
seat += 1;
|
|
||||||
|
|
||||||
/* Valid seat IDs must start with seat, i.e. ignore "auto" */
|
|
||||||
if (!g_str_has_prefix (seat, "seat"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_variant_get (parameters, "(s@a{sv}^a&s)", NULL, &changed_props, &invalidated_props);
|
|
||||||
|
|
||||||
changed_prop = g_variant_lookup_value (changed_props, "CanGraphical", NULL);
|
|
||||||
if (changed_prop)
|
|
||||||
changed = TRUE;
|
|
||||||
if (!changed && g_strv_contains (invalidated_props, "CanGraphical"))
|
|
||||||
changed = TRUE;
|
|
||||||
|
|
||||||
if (!changed)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ret = sd_seat_can_graphical (seat);
|
|
||||||
if (ret < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (ret != 0)
|
|
||||||
+ if (ret != 0) {
|
|
||||||
+ gdm_settings_direct_reload ();
|
|
||||||
ensure_display_for_seat (GDM_LOCAL_DISPLAY_FACTORY (user_data), seat);
|
|
||||||
- else
|
|
||||||
+ } else {
|
|
||||||
delete_display (GDM_LOCAL_DISPLAY_FACTORY (user_data), seat);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
lookup_by_session_id (const char *id,
|
|
||||||
GdmDisplay *display,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
const char *looking_for = user_data;
|
|
||||||
const char *current;
|
|
||||||
|
|
||||||
current = gdm_display_get_session_id (display);
|
|
||||||
return g_strcmp0 (current, looking_for) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
lookup_by_tty (const char *id,
|
|
||||||
GdmDisplay *display,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
const char *tty_to_find = user_data;
|
|
||||||
g_autofree char *tty_to_check = NULL;
|
|
||||||
const char *session_id;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
session_id = gdm_display_get_session_id (display);
|
|
||||||
|
|
||||||
if (!session_id)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
ret = sd_session_get_tty (session_id, &tty_to_check);
|
|
||||||
@@ -1260,60 +1262,61 @@ on_vt_changed (GIOChannel *source,
|
|
||||||
}
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: creating new display on seat0 because of VT change");
|
|
||||||
|
|
||||||
ensure_display_for_seat (factory, "seat0");
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_UDEV
|
|
||||||
static void
|
|
||||||
on_uevent (GUdevClient *client,
|
|
||||||
const char *action,
|
|
||||||
GUdevDevice *device,
|
|
||||||
GdmLocalDisplayFactory *factory)
|
|
||||||
{
|
|
||||||
if (!g_udev_device_get_device_file (device))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (g_strcmp0 (action, "add") != 0 &&
|
|
||||||
g_strcmp0 (action, "change") != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!udev_is_settled (factory))
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id);
|
|
||||||
factory->uevent_handler_id = 0;
|
|
||||||
|
|
||||||
+ gdm_settings_direct_reload ();
|
|
||||||
ensure_display_for_seat (factory, "seat0");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
|
||||||
gdm_local_display_factory_start_monitor (GdmLocalDisplayFactory *factory)
|
|
||||||
{
|
|
||||||
g_autoptr (GIOChannel) io_channel = NULL;
|
|
||||||
const char *subsystems[] = { "drm", NULL };
|
|
||||||
|
|
||||||
factory->seat_new_id = g_dbus_connection_signal_subscribe (factory->connection,
|
|
||||||
"org.freedesktop.login1",
|
|
||||||
"org.freedesktop.login1.Manager",
|
|
||||||
"SeatNew",
|
|
||||||
"/org/freedesktop/login1",
|
|
||||||
NULL,
|
|
||||||
G_DBUS_SIGNAL_FLAGS_NONE,
|
|
||||||
on_seat_new,
|
|
||||||
g_object_ref (factory),
|
|
||||||
g_object_unref);
|
|
||||||
factory->seat_removed_id = g_dbus_connection_signal_subscribe (factory->connection,
|
|
||||||
"org.freedesktop.login1",
|
|
||||||
"org.freedesktop.login1.Manager",
|
|
||||||
"SeatRemoved",
|
|
||||||
"/org/freedesktop/login1",
|
|
||||||
NULL,
|
|
||||||
G_DBUS_SIGNAL_FLAGS_NONE,
|
|
||||||
on_seat_removed,
|
|
||||||
g_object_ref (factory),
|
|
||||||
g_object_unref);
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
611
SOURCES/0003-daemon-save-os-release-in-accountsservice.patch
Normal file
611
SOURCES/0003-daemon-save-os-release-in-accountsservice.patch
Normal file
@ -0,0 +1,611 @@
|
|||||||
|
From de95917e0e9d142703a86f94961ef9fd4151739d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 14:30:59 -0400
|
||||||
|
Subject: [PATCH 3/4] daemon: save os-release in accountsservice
|
||||||
|
|
||||||
|
It can be useful to know what OS a user was running
|
||||||
|
when they logged in (to detect upgrades).
|
||||||
|
|
||||||
|
This commit saves that information in accountsservice.
|
||||||
|
---
|
||||||
|
.../com.redhat.AccountsServiceUser.System.xml | 10 ++
|
||||||
|
daemon/gdm-session-settings.c | 98 +++++++++++++++++++
|
||||||
|
daemon/gdm-session.c | 4 +-
|
||||||
|
daemon/meson.build | 8 ++
|
||||||
|
4 files changed, 118 insertions(+), 2 deletions(-)
|
||||||
|
create mode 100644 daemon/com.redhat.AccountsServiceUser.System.xml
|
||||||
|
|
||||||
|
diff --git a/daemon/com.redhat.AccountsServiceUser.System.xml b/daemon/com.redhat.AccountsServiceUser.System.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..67f5f302
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/daemon/com.redhat.AccountsServiceUser.System.xml
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+<node>
|
||||||
|
+ <interface name="com.redhat.AccountsServiceUser.System">
|
||||||
|
+
|
||||||
|
+ <annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/>
|
||||||
|
+
|
||||||
|
+ <property name="id" type="s" access="readwrite"/>
|
||||||
|
+ <property name="version-id" type="s" access="readwrite"/>
|
||||||
|
+
|
||||||
|
+ </interface>
|
||||||
|
+</node>
|
||||||
|
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
|
||||||
|
index f2b1addd..a4b7f1a6 100644
|
||||||
|
--- a/daemon/gdm-session-settings.c
|
||||||
|
+++ b/daemon/gdm-session-settings.c
|
||||||
|
@@ -1,70 +1,77 @@
|
||||||
|
/* gdm-session-settings.c - Loads session and language from ~/.dmrc
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301, USA.
|
||||||
|
*
|
||||||
|
* Written by: Ray Strode <rstrode@redhat.com>
|
||||||
|
*/
|
||||||
|
#include "config.h"
|
||||||
|
#include "gdm-session-settings.h"
|
||||||
|
+#include "gdm-common.h"
|
||||||
|
+
|
||||||
|
+#include "com.redhat.AccountsServiceUser.System.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
#include <glib-object.h>
|
||||||
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
|
#include <act/act-user-manager.h>
|
||||||
|
|
||||||
|
struct _GdmSessionSettingsPrivate
|
||||||
|
{
|
||||||
|
ActUserManager *user_manager;
|
||||||
|
ActUser *user;
|
||||||
|
+
|
||||||
|
+ /* used for retrieving the last OS user logged in with */
|
||||||
|
+ GdmAccountsServiceUserSystem *user_system_proxy;
|
||||||
|
+
|
||||||
|
char *session_name;
|
||||||
|
char *session_type;
|
||||||
|
char *language_name;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void gdm_session_settings_finalize (GObject *object);
|
||||||
|
static void gdm_session_settings_class_install_properties (GdmSessionSettingsClass *
|
||||||
|
settings_class);
|
||||||
|
|
||||||
|
static void gdm_session_settings_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
static void gdm_session_settings_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0 = 0,
|
||||||
|
PROP_SESSION_NAME,
|
||||||
|
PROP_SESSION_TYPE,
|
||||||
|
PROP_LANGUAGE_NAME,
|
||||||
|
PROP_IS_LOADED
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_PRIVATE (GdmSessionSettings,
|
||||||
|
gdm_session_settings,
|
||||||
|
G_TYPE_OBJECT)
|
||||||
|
|
||||||
|
@@ -107,60 +114,62 @@ gdm_session_settings_class_install_properties (GdmSessionSettingsClass *settings
|
||||||
|
g_object_class_install_property (object_class, PROP_LANGUAGE_NAME, param_spec);
|
||||||
|
|
||||||
|
param_spec = g_param_spec_boolean ("is-loaded", NULL, NULL,
|
||||||
|
FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
g_object_class_install_property (object_class, PROP_IS_LOADED, param_spec);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_session_settings_init (GdmSessionSettings *settings)
|
||||||
|
{
|
||||||
|
settings->priv = G_TYPE_INSTANCE_GET_PRIVATE (settings,
|
||||||
|
GDM_TYPE_SESSION_SETTINGS,
|
||||||
|
GdmSessionSettingsPrivate);
|
||||||
|
|
||||||
|
settings->priv->user_manager = act_user_manager_get_default ();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdm_session_settings_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GdmSessionSettings *settings;
|
||||||
|
GObjectClass *parent_class;
|
||||||
|
|
||||||
|
settings = GDM_SESSION_SETTINGS (object);
|
||||||
|
|
||||||
|
if (settings->priv->user != NULL) {
|
||||||
|
g_object_unref (settings->priv->user);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ g_clear_object (&settings->priv->user_system_proxy);
|
||||||
|
+
|
||||||
|
g_free (settings->priv->session_name);
|
||||||
|
g_free (settings->priv->language_name);
|
||||||
|
|
||||||
|
parent_class = G_OBJECT_CLASS (gdm_session_settings_parent_class);
|
||||||
|
|
||||||
|
if (parent_class->finalize != NULL) {
|
||||||
|
parent_class->finalize (object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gdm_session_settings_set_language_name (GdmSessionSettings *settings,
|
||||||
|
const char *language_name)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
|
||||||
|
|
||||||
|
if (settings->priv->language_name == NULL ||
|
||||||
|
strcmp (settings->priv->language_name, language_name) != 0) {
|
||||||
|
settings->priv->language_name = g_strdup (language_name);
|
||||||
|
g_object_notify (G_OBJECT (settings), "language-name");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gdm_session_settings_set_session_name (GdmSessionSettings *settings,
|
||||||
|
const char *session_name)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
|
||||||
|
|
||||||
|
if (settings->priv->session_name == NULL ||
|
||||||
|
@@ -261,69 +270,86 @@ gdm_session_settings_get_property (GObject *object,
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GdmSessionSettings *
|
||||||
|
gdm_session_settings_new (void)
|
||||||
|
{
|
||||||
|
GdmSessionSettings *settings;
|
||||||
|
|
||||||
|
settings = g_object_new (GDM_TYPE_SESSION_SETTINGS,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_session_settings_is_loaded (GdmSessionSettings *settings)
|
||||||
|
{
|
||||||
|
if (settings->priv->user == NULL) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return act_user_is_loaded (settings->priv->user);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
load_settings_from_user (GdmSessionSettings *settings)
|
||||||
|
{
|
||||||
|
+ const char *object_path;
|
||||||
|
const char *session_name;
|
||||||
|
const char *session_type;
|
||||||
|
const char *language_name;
|
||||||
|
|
||||||
|
if (!act_user_is_loaded (settings->priv->user)) {
|
||||||
|
g_warning ("GdmSessionSettings: trying to load user settings from unloaded user");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ object_path = act_user_get_object_path (settings->priv->user);
|
||||||
|
+
|
||||||
|
+ if (object_path != NULL) {
|
||||||
|
+ g_autoptr (GError) error = NULL;
|
||||||
|
+ settings->priv->user_system_proxy = gdm_accounts_service_user_system_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
|
+ G_DBUS_PROXY_FLAGS_NONE,
|
||||||
|
+ "org.freedesktop.Accounts",
|
||||||
|
+ object_path,
|
||||||
|
+ NULL,
|
||||||
|
+ &error);
|
||||||
|
+ if (error != NULL) {
|
||||||
|
+ g_debug ("GdmSessionSettings: couldn't retrieve user system proxy from accountsservice: %s",
|
||||||
|
+ error->message);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
session_type = act_user_get_session_type (settings->priv->user);
|
||||||
|
session_name = act_user_get_session (settings->priv->user);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionSettings: saved session is %s (type %s)", session_name, session_type);
|
||||||
|
|
||||||
|
if (session_type != NULL && session_type[0] != '\0') {
|
||||||
|
gdm_session_settings_set_session_type (settings, session_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (session_name != NULL && session_name[0] != '\0') {
|
||||||
|
gdm_session_settings_set_session_name (settings, session_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
language_name = act_user_get_language (settings->priv->user);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionSettings: saved language is %s", language_name);
|
||||||
|
if (language_name != NULL && language_name[0] != '\0') {
|
||||||
|
gdm_session_settings_set_language_name (settings, language_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
g_object_notify (G_OBJECT (settings), "is-loaded");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_user_is_loaded_changed (ActUser *user,
|
||||||
|
@@ -349,64 +375,136 @@ gdm_session_settings_load (GdmSessionSettings *settings,
|
||||||
|
g_return_val_if_fail (!gdm_session_settings_is_loaded (settings), FALSE);
|
||||||
|
|
||||||
|
if (settings->priv->user != NULL) {
|
||||||
|
old_user = settings->priv->user;
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (settings->priv->user),
|
||||||
|
G_CALLBACK (on_user_is_loaded_changed),
|
||||||
|
settings);
|
||||||
|
} else {
|
||||||
|
old_user = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
settings->priv->user = act_user_manager_get_user (settings->priv->user_manager,
|
||||||
|
username);
|
||||||
|
|
||||||
|
g_clear_object (&old_user);
|
||||||
|
|
||||||
|
if (!act_user_is_loaded (settings->priv->user)) {
|
||||||
|
g_signal_connect (settings->priv->user,
|
||||||
|
"notify::is-loaded",
|
||||||
|
G_CALLBACK (on_user_is_loaded_changed),
|
||||||
|
settings);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
load_settings_from_user (settings);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+save_os_release (GdmSessionSettings *settings,
|
||||||
|
+ ActUser *user)
|
||||||
|
+{
|
||||||
|
+ g_autoptr(GFile) file = NULL;
|
||||||
|
+ g_autoptr(GError) error = NULL;
|
||||||
|
+ g_autofree char *contents = NULL;
|
||||||
|
+ g_auto(GStrv) lines = NULL;
|
||||||
|
+ size_t i;
|
||||||
|
+
|
||||||
|
+ if (settings->priv->user_system_proxy == NULL) {
|
||||||
|
+ g_debug ("GdmSessionSettings: not saving OS version to user account because accountsservice doesn't support it");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ file = g_file_new_for_path ("/etc/os-release");
|
||||||
|
+
|
||||||
|
+ if (!g_file_load_contents (file, NULL, &contents, NULL, NULL, &error)) {
|
||||||
|
+ g_debug ("GdmSessionSettings: couldn't load /etc/os-release: %s", error->message);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ lines = g_strsplit (contents, "\n", -1);
|
||||||
|
+ for (i = 0; lines[i] != NULL; i++) {
|
||||||
|
+ char *p, *name, *name_end, *value, *value_end;
|
||||||
|
+
|
||||||
|
+ p = lines[i];
|
||||||
|
+
|
||||||
|
+ while (g_ascii_isspace (*p))
|
||||||
|
+ p++;
|
||||||
|
+
|
||||||
|
+ if (*p == '#' || *p == '\0')
|
||||||
|
+ continue;
|
||||||
|
+ name = p;
|
||||||
|
+ while (gdm_shell_var_is_valid_char (*p, p == name))
|
||||||
|
+ p++;
|
||||||
|
+ name_end = p;
|
||||||
|
+ while (g_ascii_isspace (*p))
|
||||||
|
+ p++;
|
||||||
|
+ if (name == name_end || *p != '=') {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ *name_end = '\0';
|
||||||
|
+
|
||||||
|
+ p++;
|
||||||
|
+
|
||||||
|
+ while (g_ascii_isspace (*p))
|
||||||
|
+ p++;
|
||||||
|
+
|
||||||
|
+ value = p;
|
||||||
|
+ value_end = value + strlen(value) - 1;
|
||||||
|
+
|
||||||
|
+ if (value != value_end && *value == '"' && *value_end == '"') {
|
||||||
|
+ value++;
|
||||||
|
+ *value_end = '\0';
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (strcmp (name, "ID") == 0) {
|
||||||
|
+ gdm_accounts_service_user_system_set_id (settings->priv->user_system_proxy,
|
||||||
|
+ value);
|
||||||
|
+ g_debug ("GdmSessionSettings: setting system OS for user to '%s'", value);
|
||||||
|
+ } else if (strcmp (name, "VERSION_ID") == 0) {
|
||||||
|
+ gdm_accounts_service_user_system_set_version_id (settings->priv->user_system_proxy,
|
||||||
|
+ value);
|
||||||
|
+ g_debug ("GdmSessionSettings: setting system OS version for user to '%s'", value);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
gboolean
|
||||||
|
gdm_session_settings_save (GdmSessionSettings *settings,
|
||||||
|
const char *username)
|
||||||
|
{
|
||||||
|
ActUser *user;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDM_IS_SESSION_SETTINGS (settings), FALSE);
|
||||||
|
g_return_val_if_fail (username != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (gdm_session_settings_is_loaded (settings), FALSE);
|
||||||
|
|
||||||
|
user = act_user_manager_get_user (settings->priv->user_manager,
|
||||||
|
username);
|
||||||
|
|
||||||
|
|
||||||
|
if (!act_user_is_loaded (user)) {
|
||||||
|
g_object_unref (user);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings->priv->session_name != NULL) {
|
||||||
|
act_user_set_session (user, settings->priv->session_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings->priv->session_type != NULL) {
|
||||||
|
act_user_set_session_type (user, settings->priv->session_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings->priv->language_name != NULL) {
|
||||||
|
act_user_set_language (user, settings->priv->language_name);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ save_os_release (settings, user);
|
||||||
|
+
|
||||||
|
g_object_unref (user);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
||||||
|
index f4d0bef9..d1e2c301 100644
|
||||||
|
--- a/daemon/gdm-session.c
|
||||||
|
+++ b/daemon/gdm-session.c
|
||||||
|
@@ -351,72 +351,72 @@ supports_session_type (GdmSession *self,
|
||||||
|
if (session_type == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return g_strv_contains ((const char * const *) self->supported_session_types,
|
||||||
|
session_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char **
|
||||||
|
get_system_session_dirs (GdmSession *self,
|
||||||
|
const char *type)
|
||||||
|
{
|
||||||
|
GArray *search_array = NULL;
|
||||||
|
char **search_dirs;
|
||||||
|
int i, j;
|
||||||
|
const gchar * const *system_data_dirs = g_get_system_data_dirs ();
|
||||||
|
|
||||||
|
static const char *x_search_dirs[] = {
|
||||||
|
"/etc/X11/sessions/",
|
||||||
|
DMCONFDIR "/Sessions/",
|
||||||
|
DATADIR "/gdm/BuiltInSessions/",
|
||||||
|
DATADIR "/xsessions/",
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
|
||||||
|
|
||||||
|
search_array = g_array_new (TRUE, TRUE, sizeof (char *));
|
||||||
|
|
||||||
|
for (j = 0; self->supported_session_types[j] != NULL; j++) {
|
||||||
|
const char *supported_type = self->supported_session_types[j];
|
||||||
|
|
||||||
|
- if (g_str_equal (supported_type, "x11") ||
|
||||||
|
+ if (g_str_equal (supported_type, "x11") &&
|
||||||
|
(type == NULL || g_str_equal (type, supported_type))) {
|
||||||
|
for (i = 0; system_data_dirs[i]; i++) {
|
||||||
|
gchar *dir = g_build_filename (system_data_dirs[i], "xsessions", NULL);
|
||||||
|
g_array_append_val (search_array, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||||
|
- if (g_str_equal (supported_type, "wayland") ||
|
||||||
|
+ if (g_str_equal (supported_type, "wayland") &&
|
||||||
|
(type == NULL || g_str_equal (type, supported_type))) {
|
||||||
|
for (i = 0; system_data_dirs[i]; i++) {
|
||||||
|
gchar *dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL);
|
||||||
|
g_array_append_val (search_array, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_array_append_val (search_array, wayland_search_dir);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
search_dirs = g_strdupv ((char **) search_array->data);
|
||||||
|
|
||||||
|
g_array_free (search_array, TRUE);
|
||||||
|
|
||||||
|
return search_dirs;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
is_prog_in_path (const char *prog)
|
||||||
|
{
|
||||||
|
char *f;
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
|
f = g_find_program_in_path (prog);
|
||||||
|
ret = (f != NULL);
|
||||||
|
g_free (f);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/daemon/meson.build b/daemon/meson.build
|
||||||
|
index 2e61b644..71c65039 100644
|
||||||
|
--- a/daemon/meson.build
|
||||||
|
+++ b/daemon/meson.build
|
||||||
|
@@ -15,114 +15,122 @@ local_display_dbus_gen = gnome.gdbus_codegen('gdm-local-display-glue',
|
||||||
|
'gdm-local-display.xml',
|
||||||
|
namespace: 'GdmDBus',
|
||||||
|
interface_prefix: 'org.gnome.DisplayManager',
|
||||||
|
autocleanup: 'all',
|
||||||
|
)
|
||||||
|
local_display_factory_dbus_gen = gnome.gdbus_codegen('gdm-local-display-factory-glue',
|
||||||
|
'gdm-local-display-factory.xml',
|
||||||
|
namespace: 'GdmDBus',
|
||||||
|
interface_prefix: 'org.gnome.DisplayManager',
|
||||||
|
autocleanup: 'all',
|
||||||
|
)
|
||||||
|
manager_dbus_gen = gnome.gdbus_codegen('gdm-manager-glue',
|
||||||
|
'gdm-manager.xml',
|
||||||
|
namespace: 'GdmDBus',
|
||||||
|
interface_prefix: 'org.gnome.DisplayManager',
|
||||||
|
autocleanup: 'all',
|
||||||
|
)
|
||||||
|
session_dbus_gen = gnome.gdbus_codegen('gdm-session-glue',
|
||||||
|
'gdm-session.xml',
|
||||||
|
namespace: 'GdmDBus',
|
||||||
|
interface_prefix: 'org.gnome.DisplayManager',
|
||||||
|
autocleanup: 'all',
|
||||||
|
)
|
||||||
|
session_worker_dbus_gen = gnome.gdbus_codegen('gdm-session-worker-glue',
|
||||||
|
'gdm-session-worker.xml',
|
||||||
|
namespace: 'GdmDBus',
|
||||||
|
interface_prefix: 'org.gnome.DisplayManager',
|
||||||
|
autocleanup: 'all',
|
||||||
|
)
|
||||||
|
|
||||||
|
+accountsservice_system_user_dbus_gen = gnome.gdbus_codegen('com.redhat.AccountsServiceUser.System',
|
||||||
|
+ 'com.redhat.AccountsServiceUser.System.xml',
|
||||||
|
+ namespace: 'Gdm',
|
||||||
|
+ interface_prefix: 'com.redhat',
|
||||||
|
+ autocleanup: 'all',
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
gdm_session_enums = gnome.mkenums('gdm-session-enum-types',
|
||||||
|
h_template: 'gdm-session-enum-types.h.in',
|
||||||
|
c_template: 'gdm-session-enum-types.c.in',
|
||||||
|
sources: 'gdm-session.h',
|
||||||
|
)
|
||||||
|
gdm_session_worker_enums = gnome.mkenums('gdm-session-worker-enum-types',
|
||||||
|
h_template: 'gdm-session-worker-enum-types.h.in',
|
||||||
|
c_template: 'gdm-session-worker-enum-types.c.in',
|
||||||
|
sources: 'gdm-session-worker.h',
|
||||||
|
)
|
||||||
|
|
||||||
|
# Daemons deps
|
||||||
|
gdm_daemon_deps = [
|
||||||
|
libgdmcommon_dep,
|
||||||
|
accountsservice_dep,
|
||||||
|
gobject_dep,
|
||||||
|
gio_dep,
|
||||||
|
gio_unix_dep,
|
||||||
|
libpam_dep,
|
||||||
|
x_deps,
|
||||||
|
xcb_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
if xdmcp_dep.found() and get_option('tcp-wrappers')
|
||||||
|
gdm_daemon_deps += libwrap_dep
|
||||||
|
endif
|
||||||
|
|
||||||
|
# test-session-client
|
||||||
|
test_session_client_src = [
|
||||||
|
'test-session-client.c',
|
||||||
|
session_dbus_gen,
|
||||||
|
manager_dbus_gen,
|
||||||
|
]
|
||||||
|
|
||||||
|
test_session_client = executable('test-session-client',
|
||||||
|
test_session_client_src,
|
||||||
|
dependencies: gdm_daemon_deps,
|
||||||
|
include_directories: config_h_dir,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Session worker
|
||||||
|
gdm_session_worker_src = [
|
||||||
|
'session-worker-main.c',
|
||||||
|
'gdm-session.c',
|
||||||
|
'gdm-session-settings.c',
|
||||||
|
'gdm-session-auditor.c',
|
||||||
|
'gdm-session-record.c',
|
||||||
|
'gdm-session-worker.c',
|
||||||
|
'gdm-session-worker-job.c',
|
||||||
|
'gdm-session-worker-common.c',
|
||||||
|
'gdm-dbus-util.c',
|
||||||
|
dbus_gen,
|
||||||
|
session_dbus_gen,
|
||||||
|
session_worker_dbus_gen,
|
||||||
|
+ accountsservice_system_user_dbus_gen,
|
||||||
|
gdm_session_enums,
|
||||||
|
gdm_session_worker_enums,
|
||||||
|
]
|
||||||
|
|
||||||
|
gdm_session_worker_deps = [
|
||||||
|
gdm_daemon_deps,
|
||||||
|
]
|
||||||
|
|
||||||
|
gdm_session_worker_includes = [
|
||||||
|
config_h_dir,
|
||||||
|
]
|
||||||
|
|
||||||
|
if pam_extensions_supported
|
||||||
|
gdm_session_worker_src += '../pam-extensions/gdm-pam-extensions.h'
|
||||||
|
gdm_session_worker_includes += pam_extensions_inc
|
||||||
|
endif
|
||||||
|
|
||||||
|
if libaudit_dep.found()
|
||||||
|
gdm_session_worker_deps += libaudit_dep
|
||||||
|
|
||||||
|
gdm_session_worker_src += [
|
||||||
|
'gdm-session-linux-auditor.c',
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
|
if have_adt
|
||||||
|
gdm_session_worker_src += 'gdm-session-solaris-auditor.c'
|
||||||
|
endif
|
||||||
|
|
||||||
|
gdm_session_worker = executable('gdm-session-worker',
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From 73ccd50cabda8102b724d9bf647ac5a74963040d Mon Sep 17 00:00:00 2001
|
From 64e8db8432158e5115df18a03bb87ecc1d58ae63 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Mon, 11 Feb 2019 10:32:55 -0500
|
Date: Mon, 11 Feb 2019 10:32:55 -0500
|
||||||
Subject: [PATCH 3/3] session: ensure login screen over XDMCP connects to its
|
Subject: [PATCH 3/3] session: ensure login screen over XDMCP connects to its
|
||||||
@ -17,10 +17,10 @@ the session is X11.
|
|||||||
1 file changed, 19 insertions(+)
|
1 file changed, 19 insertions(+)
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
||||||
index f13b54af..9f68166e 100644
|
index 77d6b8ff0..357e4a297 100644
|
||||||
--- a/daemon/gdm-session.c
|
--- a/daemon/gdm-session.c
|
||||||
+++ b/daemon/gdm-session.c
|
+++ b/daemon/gdm-session.c
|
||||||
@@ -2739,60 +2739,79 @@ set_up_session_environment (GdmSession *self)
|
@@ -2697,60 +2697,79 @@ set_up_session_environment (GdmSession *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -101,5 +101,5 @@ index f13b54af..9f68166e 100644
|
|||||||
gpointer key, value;
|
gpointer key, value;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.37.3
|
2.30.1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 36b9fd4f6e055e236175979d9a1527df71aeac1f Mon Sep 17 00:00:00 2001
|
From b5472a30b1a71aec537ac309e2985cbac61b3136 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Tue, 14 Sep 2021 11:00:33 -0400
|
Date: Tue, 14 Sep 2021 11:00:33 -0400
|
||||||
Subject: [PATCH 1/5] xdmcp-display-factory: Set supported session types for
|
Subject: [PATCH 3/4] xdmcp-display-factory: Set supported session types for
|
||||||
XDMCP displays
|
XDMCP displays
|
||||||
|
|
||||||
The lower levels of GDM now expect the session types supported by a
|
The lower levels of GDM now expect the session types supported by a
|
@ -1,559 +0,0 @@
|
|||||||
From d76d6ff0761d47df938f1dab0daeeecac2feb56e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Mon, 6 Sep 2021 08:43:28 -0400
|
|
||||||
Subject: [PATCH 4/5] daemon: Consolidate session-type and
|
|
||||||
supported-session-types list
|
|
||||||
|
|
||||||
There's currently a bug in computing the session-type to use.
|
|
||||||
|
|
||||||
The `i > 0` check means wayland will overwrite x11 in the
|
|
||||||
transient session type list.
|
|
||||||
|
|
||||||
Morever, the separation between "session-type" and
|
|
||||||
"supported-session-types" is a little redundant. Since
|
|
||||||
supported-session-types is a sorted list, the first item should
|
|
||||||
always be the same as "session-type".
|
|
||||||
|
|
||||||
This commit addresses the bug and the redundant logic, by computing
|
|
||||||
the supported session types early in the function and indexing into
|
|
||||||
it to get the session-type.
|
|
||||||
|
|
||||||
A future cleanup could probably get rid of session-type entirely.
|
|
||||||
|
|
||||||
https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/153
|
|
||||||
---
|
|
||||||
daemon/gdm-local-display-factory.c | 193 +++++++++++++++++------------
|
|
||||||
1 file changed, 116 insertions(+), 77 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
|
||||||
index 141d64c6..eba38671 100644
|
|
||||||
--- a/daemon/gdm-local-display-factory.c
|
|
||||||
+++ b/daemon/gdm-local-display-factory.c
|
|
||||||
@@ -197,164 +197,226 @@ get_preferred_display_server (GdmLocalDisplayFactory *factory)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!wayland_enabled && !xorg_enabled) {
|
|
||||||
return g_strdup ("none");
|
|
||||||
}
|
|
||||||
|
|
||||||
gdm_settings_direct_get_string (GDM_KEY_PREFERRED_DISPLAY_SERVER, &preferred_display_server);
|
|
||||||
|
|
||||||
if (g_strcmp0 (preferred_display_server, "wayland") == 0) {
|
|
||||||
if (wayland_enabled)
|
|
||||||
return g_strdup (preferred_display_server);
|
|
||||||
else
|
|
||||||
return g_strdup ("xorg");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_strcmp0 (preferred_display_server, "xorg") == 0) {
|
|
||||||
if (xorg_enabled)
|
|
||||||
return g_strdup (preferred_display_server);
|
|
||||||
else
|
|
||||||
return g_strdup ("wayland");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0) {
|
|
||||||
if (xorg_enabled)
|
|
||||||
return g_strdup (preferred_display_server);
|
|
||||||
}
|
|
||||||
|
|
||||||
return g_strdup ("none");
|
|
||||||
}
|
|
||||||
|
|
||||||
+struct GdmDisplayServerConfiguration {
|
|
||||||
+ const char *display_server;
|
|
||||||
+ const char *key;
|
|
||||||
+ const char *binary;
|
|
||||||
+ const char *session_type;
|
|
||||||
+} display_server_configuration[] = {
|
|
||||||
+#ifdef ENABLE_WAYLAND_SUPPORT
|
|
||||||
+ { "wayland", GDM_KEY_WAYLAND_ENABLE, "/usr/bin/Xwayland", "wayland" },
|
|
||||||
+#endif
|
|
||||||
+ { "xorg", GDM_KEY_XORG_ENABLE, "/usr/bin/Xorg", "x11" },
|
|
||||||
+ { NULL, NULL, NULL },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+display_server_enabled (GdmLocalDisplayFactory *factory,
|
|
||||||
+ const char *display_server)
|
|
||||||
+{
|
|
||||||
+ size_t i;
|
|
||||||
+
|
|
||||||
+ for (i = 0; display_server_configuration[i].display_server != NULL; i++) {
|
|
||||||
+ const char *key = display_server_configuration[i].key;
|
|
||||||
+ const char *binary = display_server_configuration[i].binary;
|
|
||||||
+ gboolean enabled = FALSE;
|
|
||||||
+
|
|
||||||
+ if (!g_str_equal (display_server_configuration[i].display_server,
|
|
||||||
+ display_server))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ if (!gdm_settings_direct_get_boolean (key, &enabled) || !enabled)
|
|
||||||
+ return FALSE;
|
|
||||||
+
|
|
||||||
+ if (!g_file_test (binary, G_FILE_TEST_IS_EXECUTABLE))
|
|
||||||
+ return FALSE;
|
|
||||||
+
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return FALSE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static const char *
|
|
||||||
-gdm_local_display_factory_get_session_type (GdmLocalDisplayFactory *factory,
|
|
||||||
- gboolean should_fall_back)
|
|
||||||
+get_session_type_for_display_server (GdmLocalDisplayFactory *factory,
|
|
||||||
+ const char *display_server)
|
|
||||||
+{
|
|
||||||
+ size_t i;
|
|
||||||
+
|
|
||||||
+ for (i = 0; display_server_configuration[i].display_server != NULL; i++) {
|
|
||||||
+ if (!g_str_equal (display_server_configuration[i].display_server,
|
|
||||||
+ display_server))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ return display_server_configuration[i].session_type;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static char **
|
|
||||||
+gdm_local_display_factory_get_session_types (GdmLocalDisplayFactory *factory,
|
|
||||||
+ gboolean should_fall_back)
|
|
||||||
{
|
|
||||||
- const char *session_types[3] = { NULL };
|
|
||||||
- gsize i, session_type_index = 0;
|
|
||||||
g_autofree gchar *preferred_display_server = NULL;
|
|
||||||
+ const char *fallback_display_server = NULL;
|
|
||||||
+ gboolean wayland_preferred = FALSE;
|
|
||||||
+ gboolean xorg_preferred = FALSE;
|
|
||||||
+ g_autoptr (GPtrArray) session_types_array = NULL;
|
|
||||||
+ char **session_types;
|
|
||||||
+
|
|
||||||
+ session_types_array = g_ptr_array_new ();
|
|
||||||
|
|
||||||
preferred_display_server = get_preferred_display_server (factory);
|
|
||||||
|
|
||||||
- if (g_strcmp0 (preferred_display_server, "wayland") != 0 &&
|
|
||||||
- g_strcmp0 (preferred_display_server, "xorg") != 0)
|
|
||||||
- return NULL;
|
|
||||||
+ g_debug ("GdmLocalDisplayFactory: Getting session type (prefers %s, falling back: %s)",
|
|
||||||
+ preferred_display_server, should_fall_back? "yes" : "no");
|
|
||||||
|
|
||||||
- for (i = 0; i < G_N_ELEMENTS (session_types) - 1; i++) {
|
|
||||||
-#ifdef ENABLE_WAYLAND_SUPPORT
|
|
||||||
- if (i > 0 ||
|
|
||||||
- g_strcmp0 (preferred_display_server, "wayland") == 0) {
|
|
||||||
- gboolean wayland_enabled = FALSE;
|
|
||||||
- if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
|
|
||||||
- if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE)) {
|
|
||||||
- session_types[i] = "wayland";
|
|
||||||
- continue;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
+ wayland_preferred = g_str_equal (preferred_display_server, "wayland");
|
|
||||||
+ xorg_preferred = g_str_equal (preferred_display_server, "xorg");
|
|
||||||
+
|
|
||||||
+ if (wayland_preferred)
|
|
||||||
+ fallback_display_server = "xorg";
|
|
||||||
+ else if (xorg_preferred)
|
|
||||||
+ fallback_display_server = "wayland";
|
|
||||||
+ else
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
- if (i > 0 ||
|
|
||||||
- g_strcmp0 (preferred_display_server, "xorg") == 0) {
|
|
||||||
- gboolean xorg_enabled = FALSE;
|
|
||||||
- if (gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled)) {
|
|
||||||
- if (xorg_enabled && g_file_test ("/usr/bin/Xorg", G_FILE_TEST_IS_EXECUTABLE)) {
|
|
||||||
- session_types[i] = "x11";
|
|
||||||
- continue;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ if (!should_fall_back) {
|
|
||||||
+ if (display_server_enabled (factory, preferred_display_server))
|
|
||||||
+ g_ptr_array_add (session_types_array, (gpointer) get_session_type_for_display_server (factory, preferred_display_server));
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (should_fall_back)
|
|
||||||
- session_type_index++;
|
|
||||||
+ if (display_server_enabled (factory, fallback_display_server))
|
|
||||||
+ g_ptr_array_add (session_types_array, (gpointer) get_session_type_for_display_server (factory, fallback_display_server));
|
|
||||||
|
|
||||||
- return session_types[session_type_index];
|
|
||||||
+ if (session_types_array->len == 0)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ g_ptr_array_add (session_types_array, NULL);
|
|
||||||
+
|
|
||||||
+ session_types = g_strdupv ((char **) session_types_array->pdata);
|
|
||||||
+
|
|
||||||
+ return session_types;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_display_disposed (GdmLocalDisplayFactory *factory,
|
|
||||||
GdmDisplay *display)
|
|
||||||
{
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Display %p disposed", display);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
store_display (GdmLocalDisplayFactory *factory,
|
|
||||||
GdmDisplay *display)
|
|
||||||
{
|
|
||||||
GdmDisplayStore *store;
|
|
||||||
|
|
||||||
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
|
|
||||||
gdm_display_store_add (store, display);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Example:
|
|
||||||
dbus-send --system --dest=org.gnome.DisplayManager \
|
|
||||||
--type=method_call --print-reply --reply-timeout=2000 \
|
|
||||||
/org/gnome/DisplayManager/Manager \
|
|
||||||
org.gnome.DisplayManager.Manager.GetDisplays
|
|
||||||
*/
|
|
||||||
gboolean
|
|
||||||
gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *factory,
|
|
||||||
char **id,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
gboolean ret;
|
|
||||||
GdmDisplay *display = NULL;
|
|
||||||
gboolean is_initial = FALSE;
|
|
||||||
const char *session_type;
|
|
||||||
g_autofree gchar *preferred_display_server = NULL;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
|
|
||||||
|
|
||||||
ret = FALSE;
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Creating transient display");
|
|
||||||
|
|
||||||
preferred_display_server = get_preferred_display_server (factory);
|
|
||||||
|
|
||||||
#ifdef ENABLE_USER_DISPLAY_SERVER
|
|
||||||
if (g_strcmp0 (preferred_display_server, "wayland") == 0 ||
|
|
||||||
g_strcmp0 (preferred_display_server, "xorg") == 0) {
|
|
||||||
- session_type = gdm_local_display_factory_get_session_type (factory, FALSE);
|
|
||||||
+ g_auto(GStrv) session_types = NULL;
|
|
||||||
|
|
||||||
- if (session_type == NULL) {
|
|
||||||
+ session_types = gdm_local_display_factory_get_session_types (factory, FALSE);
|
|
||||||
+
|
|
||||||
+ if (session_types == NULL) {
|
|
||||||
g_set_error_literal (error,
|
|
||||||
GDM_DISPLAY_ERROR,
|
|
||||||
GDM_DISPLAY_ERROR_GENERAL,
|
|
||||||
"Both Wayland and Xorg are unavailable");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
display = gdm_local_display_new ();
|
|
||||||
- g_object_set (G_OBJECT (display), "session-type", session_type, NULL);
|
|
||||||
+ g_object_set (G_OBJECT (display),
|
|
||||||
+ "session-type", session_types[0],
|
|
||||||
+ "supported-session-types", session_types,
|
|
||||||
+ NULL);
|
|
||||||
is_initial = TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0) {
|
|
||||||
if (display == NULL) {
|
|
||||||
guint32 num;
|
|
||||||
|
|
||||||
num = take_next_display_number (factory);
|
|
||||||
|
|
||||||
display = gdm_legacy_display_new (num);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (display == NULL) {
|
|
||||||
g_set_error_literal (error,
|
|
||||||
GDM_DISPLAY_ERROR,
|
|
||||||
GDM_DISPLAY_ERROR_GENERAL,
|
|
||||||
"Invalid preferred display server configured");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_set (display,
|
|
||||||
"seat-id", "seat0",
|
|
||||||
"allow-timed-login", FALSE,
|
|
||||||
"is-initial", is_initial,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
store_display (factory, display);
|
|
||||||
|
|
||||||
if (! gdm_display_manage (display)) {
|
|
||||||
@@ -549,243 +611,220 @@ lookup_prepared_display_by_seat_id (const char *id,
|
|
||||||
|
|
||||||
if (status != GDM_DISPLAY_PREPARED)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return lookup_by_seat_id (id, display, user_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
on_seat0_graphics_check_timeout (gpointer user_data)
|
|
||||||
{
|
|
||||||
GdmLocalDisplayFactory *factory = user_data;
|
|
||||||
|
|
||||||
factory->seat0_graphics_check_timeout_id = 0;
|
|
||||||
|
|
||||||
/* Simply try to re-add seat0. If it is there already (i.e. CanGraphical
|
|
||||||
* turned TRUE, then we'll find it and it will not be created again).
|
|
||||||
*/
|
|
||||||
factory->seat0_graphics_check_timed_out = TRUE;
|
|
||||||
ensure_display_for_seat (factory, "seat0");
|
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
ensure_display_for_seat (GdmLocalDisplayFactory *factory,
|
|
||||||
const char *seat_id)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
gboolean seat_supports_graphics;
|
|
||||||
gboolean is_seat0;
|
|
||||||
- const char *session_type = "wayland";
|
|
||||||
+ g_auto (GStrv) session_types = NULL;
|
|
||||||
+ const char *legacy_session_types[] = { "x11", NULL };
|
|
||||||
GdmDisplayStore *store;
|
|
||||||
GdmDisplay *display = NULL;
|
|
||||||
g_autofree char *login_session_id = NULL;
|
|
||||||
gboolean wayland_enabled = FALSE, xorg_enabled = FALSE;
|
|
||||||
g_autofree gchar *preferred_display_server = NULL;
|
|
||||||
- gboolean falling_back;
|
|
||||||
+ gboolean falling_back = FALSE;
|
|
||||||
|
|
||||||
gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled);
|
|
||||||
gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled);
|
|
||||||
|
|
||||||
preferred_display_server = get_preferred_display_server (factory);
|
|
||||||
|
|
||||||
if (g_strcmp0 (preferred_display_server, "none") == 0) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Preferred display server is none, so not creating display");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = sd_seat_can_graphical (seat_id);
|
|
||||||
|
|
||||||
if (ret < 0) {
|
|
||||||
g_critical ("Failed to query CanGraphical information for seat %s", seat_id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret == 0) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: System doesn't currently support graphics");
|
|
||||||
seat_supports_graphics = FALSE;
|
|
||||||
} else {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: System supports graphics");
|
|
||||||
seat_supports_graphics = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_strcmp0 (seat_id, "seat0") == 0) {
|
|
||||||
is_seat0 = TRUE;
|
|
||||||
|
|
||||||
falling_back = factory->num_failures > 0;
|
|
||||||
- session_type = gdm_local_display_factory_get_session_type (factory, falling_back);
|
|
||||||
+ session_types = gdm_local_display_factory_get_session_types (factory, falling_back);
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s",
|
|
||||||
- session_type, falling_back? " fallback" : "");
|
|
||||||
+ session_types[0], falling_back? " fallback" : "");
|
|
||||||
} else {
|
|
||||||
is_seat0 = FALSE;
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: New displays on seat %s will use X11 fallback", seat_id);
|
|
||||||
/* Force legacy X11 for all auxiliary seats */
|
|
||||||
seat_supports_graphics = TRUE;
|
|
||||||
- session_type = "x11";
|
|
||||||
+ session_types = g_strdupv ((char **) legacy_session_types);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For seat0, we have a fallback logic to still try starting it after
|
|
||||||
* SEAT0_GRAPHICS_CHECK_TIMEOUT seconds. i.e. we simply continue even if
|
|
||||||
* CanGraphical is unset.
|
|
||||||
* This is ugly, but it means we'll come up eventually in some
|
|
||||||
* scenarios where no master device is present.
|
|
||||||
* Note that we'll force an X11 fallback even though there might be
|
|
||||||
* cases where an wayland capable device is present and simply not marked as
|
|
||||||
* master-of-seat. In these cases, this should likely be fixed in the
|
|
||||||
* udev rules.
|
|
||||||
*
|
|
||||||
* At the moment, systemd always sets CanGraphical for non-seat0 seats.
|
|
||||||
* This is because non-seat0 seats are defined by having master-of-seat
|
|
||||||
* set. This means we can avoid the fallback check for non-seat0 seats,
|
|
||||||
* which simplifies the code.
|
|
||||||
*/
|
|
||||||
if (is_seat0) {
|
|
||||||
if (!seat_supports_graphics) {
|
|
||||||
if (!factory->seat0_graphics_check_timed_out) {
|
|
||||||
if (factory->seat0_graphics_check_timeout_id == 0) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: seat0 doesn't yet support graphics. Waiting %d seconds to try again.", SEAT0_GRAPHICS_CHECK_TIMEOUT);
|
|
||||||
factory->seat0_graphics_check_timeout_id = g_timeout_add_seconds (SEAT0_GRAPHICS_CHECK_TIMEOUT,
|
|
||||||
on_seat0_graphics_check_timeout,
|
|
||||||
factory);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* It is not yet time to force X11 fallback. */
|
|
||||||
g_debug ("GdmLocalDisplayFactory: seat0 display requested when there is no graphics support before graphics check timeout.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Assuming we can use seat0 for X11 even though system says it doesn't support graphics!");
|
|
||||||
g_debug ("GdmLocalDisplayFactory: This might indicate an issue where the framebuffer device is not tagged as master-of-seat in udev.");
|
|
||||||
seat_supports_graphics = TRUE;
|
|
||||||
- session_type = "x11";
|
|
||||||
wayland_enabled = FALSE;
|
|
||||||
+ g_strfreev (session_types);
|
|
||||||
+ session_types = g_strdupv ((char **) legacy_session_types);
|
|
||||||
} else {
|
|
||||||
g_clear_handle_id (&factory->seat0_graphics_check_timeout_id, g_source_remove);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!seat_supports_graphics)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (session_type != NULL)
|
|
||||||
+ if (session_types != NULL)
|
|
||||||
g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested",
|
|
||||||
- session_type, seat_id);
|
|
||||||
+ session_types[0], seat_id);
|
|
||||||
else if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0)
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Legacy Xorg login display for seat %s requested",
|
|
||||||
seat_id);
|
|
||||||
|
|
||||||
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
|
|
||||||
|
|
||||||
if (is_seat0)
|
|
||||||
display = gdm_display_store_find (store, lookup_prepared_display_by_seat_id, (gpointer) seat_id);
|
|
||||||
else
|
|
||||||
display = gdm_display_store_find (store, lookup_by_seat_id, (gpointer) seat_id);
|
|
||||||
|
|
||||||
/* Ensure we don't create the same display more than once */
|
|
||||||
if (display != NULL) {
|
|
||||||
g_debug ("GdmLocalDisplayFactory: display already created");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we already have a login window, switch to it */
|
|
||||||
if (gdm_get_login_window_session_id (seat_id, &login_session_id)) {
|
|
||||||
GdmDisplay *display;
|
|
||||||
|
|
||||||
display = gdm_display_store_find (store,
|
|
||||||
lookup_by_session_id,
|
|
||||||
(gpointer) login_session_id);
|
|
||||||
if (display != NULL &&
|
|
||||||
(gdm_display_get_status (display) == GDM_DISPLAY_MANAGED ||
|
|
||||||
gdm_display_get_status (display) == GDM_DISPLAY_WAITING_TO_FINISH)) {
|
|
||||||
g_object_set (G_OBJECT (display), "status", GDM_DISPLAY_MANAGED, NULL);
|
|
||||||
g_debug ("GdmLocalDisplayFactory: session %s found, activating.",
|
|
||||||
login_session_id);
|
|
||||||
gdm_activate_session_by_id (factory->connection, seat_id, login_session_id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Adding display on seat %s", seat_id);
|
|
||||||
|
|
||||||
#ifdef ENABLE_USER_DISPLAY_SERVER
|
|
||||||
if (g_strcmp0 (preferred_display_server, "wayland") == 0 ||
|
|
||||||
g_strcmp0 (preferred_display_server, "xorg") == 0) {
|
|
||||||
if (is_seat0) {
|
|
||||||
- g_autoptr (GPtrArray) supported_session_types = NULL;
|
|
||||||
-
|
|
||||||
- if (session_type == NULL) {
|
|
||||||
- g_warning ("GdmLocalDisplayFactory: Both Wayland and Xorg sessions are unavailable");
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- supported_session_types = g_ptr_array_new ();
|
|
||||||
-
|
|
||||||
- if (g_strcmp0 (preferred_display_server, "wayland") == 0) {
|
|
||||||
- if (wayland_enabled)
|
|
||||||
- g_ptr_array_add (supported_session_types, "wayland");
|
|
||||||
- } else {
|
|
||||||
- if (xorg_enabled)
|
|
||||||
- g_ptr_array_add (supported_session_types, "x11");
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (!falling_back) {
|
|
||||||
- if (g_strcmp0 (preferred_display_server, "wayland") == 0) {
|
|
||||||
- if (xorg_enabled)
|
|
||||||
- g_ptr_array_add (supported_session_types, "x11");
|
|
||||||
- } else {
|
|
||||||
- if (wayland_enabled)
|
|
||||||
- g_ptr_array_add (supported_session_types, "wayland");
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- g_ptr_array_add (supported_session_types, NULL);
|
|
||||||
-
|
|
||||||
display = gdm_local_display_new ();
|
|
||||||
- g_object_set (G_OBJECT (display), "session-type", session_type, NULL);
|
|
||||||
- g_object_set (G_OBJECT (display), "supported-session-types", supported_session_types->pdata, NULL);
|
|
||||||
+ g_object_set (G_OBJECT (display),
|
|
||||||
+ "session-type", session_types[0],
|
|
||||||
+ "supported-session-types", session_types,
|
|
||||||
+ NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (display == NULL) {
|
|
||||||
guint32 num;
|
|
||||||
- const char *supported_session_types[] = { "x11", NULL };
|
|
||||||
|
|
||||||
num = take_next_display_number (factory);
|
|
||||||
|
|
||||||
display = gdm_legacy_display_new (num);
|
|
||||||
- g_object_set (G_OBJECT (display), "supported-session-types", supported_session_types, NULL);
|
|
||||||
+ g_object_set (G_OBJECT (display),
|
|
||||||
+ "session-type", legacy_session_types[0],
|
|
||||||
+ "supported-session-types", legacy_session_types,
|
|
||||||
+ NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_set (display, "seat-id", seat_id, NULL);
|
|
||||||
g_object_set (display, "is-initial", is_seat0, NULL);
|
|
||||||
|
|
||||||
store_display (factory, display);
|
|
||||||
|
|
||||||
/* let store own the ref */
|
|
||||||
g_object_unref (display);
|
|
||||||
|
|
||||||
if (! gdm_display_manage (display)) {
|
|
||||||
gdm_display_unmanage (display);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
delete_display (GdmLocalDisplayFactory *factory,
|
|
||||||
const char *seat_id) {
|
|
||||||
|
|
||||||
GdmDisplayStore *store;
|
|
||||||
|
|
||||||
g_debug ("GdmLocalDisplayFactory: Removing used_display_numbers on seat %s", seat_id);
|
|
||||||
|
|
||||||
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
|
|
||||||
gdm_display_store_foreach_remove (store, lookup_by_seat_id, (gpointer) seat_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
250
SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch
Normal file
250
SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
From 738a10ca78e154ad4c3df9a1298eaad01516457e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 14:30:59 -0400
|
||||||
|
Subject: [PATCH 4/4] daemon: handle upgrades from RHEL 7
|
||||||
|
|
||||||
|
RHEL 7 users need to stay on X if they were using X,
|
||||||
|
and they need to stay on gnome-classic if they were using
|
||||||
|
gnome-classic.
|
||||||
|
|
||||||
|
This commit examines the user's config to deduce whether
|
||||||
|
or not they were using RHEL 7 and in the event they were
|
||||||
|
try to get the right settings.
|
||||||
|
---
|
||||||
|
daemon/gdm-session-settings.c | 19 +++++++++++++++++++
|
||||||
|
daemon/gdm-session.c | 19 ++++++++-----------
|
||||||
|
2 files changed, 27 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
|
||||||
|
index a4b7f1a6..a84b2ffa 100644
|
||||||
|
--- a/daemon/gdm-session-settings.c
|
||||||
|
+++ b/daemon/gdm-session-settings.c
|
||||||
|
@@ -270,95 +270,114 @@ gdm_session_settings_get_property (GObject *object,
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GdmSessionSettings *
|
||||||
|
gdm_session_settings_new (void)
|
||||||
|
{
|
||||||
|
GdmSessionSettings *settings;
|
||||||
|
|
||||||
|
settings = g_object_new (GDM_TYPE_SESSION_SETTINGS,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_session_settings_is_loaded (GdmSessionSettings *settings)
|
||||||
|
{
|
||||||
|
if (settings->priv->user == NULL) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return act_user_is_loaded (settings->priv->user);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
load_settings_from_user (GdmSessionSettings *settings)
|
||||||
|
{
|
||||||
|
+ const char *system_id = NULL, *system_version_id = NULL;
|
||||||
|
const char *object_path;
|
||||||
|
const char *session_name;
|
||||||
|
const char *session_type;
|
||||||
|
const char *language_name;
|
||||||
|
|
||||||
|
if (!act_user_is_loaded (settings->priv->user)) {
|
||||||
|
g_warning ("GdmSessionSettings: trying to load user settings from unloaded user");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
object_path = act_user_get_object_path (settings->priv->user);
|
||||||
|
|
||||||
|
if (object_path != NULL) {
|
||||||
|
g_autoptr (GError) error = NULL;
|
||||||
|
settings->priv->user_system_proxy = gdm_accounts_service_user_system_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
|
G_DBUS_PROXY_FLAGS_NONE,
|
||||||
|
"org.freedesktop.Accounts",
|
||||||
|
object_path,
|
||||||
|
NULL,
|
||||||
|
&error);
|
||||||
|
if (error != NULL) {
|
||||||
|
g_debug ("GdmSessionSettings: couldn't retrieve user system proxy from accountsservice: %s",
|
||||||
|
error->message);
|
||||||
|
+ } else {
|
||||||
|
+ system_id = gdm_accounts_service_user_system_get_id (settings->priv->user_system_proxy);
|
||||||
|
+ system_version_id = gdm_accounts_service_user_system_get_version_id (settings->priv->user_system_proxy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
session_type = act_user_get_session_type (settings->priv->user);
|
||||||
|
session_name = act_user_get_session (settings->priv->user);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionSettings: saved session is %s (type %s)", session_name, session_type);
|
||||||
|
|
||||||
|
+ if (system_id == NULL || (g_strcmp0 (system_id, "rhel") == 0 && g_str_has_prefix (system_version_id, "7."))) {
|
||||||
|
+ /* if there's also no session name in the file and we're coming from RHEL 7,
|
||||||
|
+ * then we should assume classic session
|
||||||
|
+ */
|
||||||
|
+ if (session_name == NULL || session_name[0] == '\0')
|
||||||
|
+ session_name = "gnome-classic";
|
||||||
|
+
|
||||||
|
+ /* only presume wayland if the user specifically picked it in RHEL 7
|
||||||
|
+ */
|
||||||
|
+ if (g_strcmp0 (session_name, "gnome-wayland") == 0)
|
||||||
|
+ session_type = "wayland";
|
||||||
|
+ else
|
||||||
|
+ session_type = "x11";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (session_type != NULL && session_type[0] != '\0') {
|
||||||
|
gdm_session_settings_set_session_type (settings, session_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (session_name != NULL && session_name[0] != '\0') {
|
||||||
|
gdm_session_settings_set_session_name (settings, session_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
language_name = act_user_get_language (settings->priv->user);
|
||||||
|
|
||||||
|
g_debug ("GdmSessionSettings: saved language is %s", language_name);
|
||||||
|
if (language_name != NULL && language_name[0] != '\0') {
|
||||||
|
gdm_session_settings_set_language_name (settings, language_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
g_object_notify (G_OBJECT (settings), "is-loaded");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_user_is_loaded_changed (ActUser *user,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
GdmSessionSettings *settings)
|
||||||
|
{
|
||||||
|
if (act_user_is_loaded (settings->priv->user)) {
|
||||||
|
load_settings_from_user (settings);
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (settings->priv->user),
|
||||||
|
G_CALLBACK (on_user_is_loaded_changed),
|
||||||
|
settings);
|
||||||
|
}
|
||||||
|
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
||||||
|
index d1e2c301..d4a46d87 100644
|
||||||
|
--- a/daemon/gdm-session.c
|
||||||
|
+++ b/daemon/gdm-session.c
|
||||||
|
@@ -3207,98 +3207,95 @@ gdm_session_get_session_id (GdmSession *self)
|
||||||
|
return conversation->session_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
gdm_session_get_conversation_session_id (GdmSession *self,
|
||||||
|
const char *service_name)
|
||||||
|
{
|
||||||
|
GdmSessionConversation *conversation;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GDM_IS_SESSION (self), NULL);
|
||||||
|
|
||||||
|
conversation = find_conversation_by_name (self, service_name);
|
||||||
|
|
||||||
|
if (conversation == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return conversation->session_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
get_session_filename (GdmSession *self)
|
||||||
|
{
|
||||||
|
return g_strdup_printf ("%s.desktop", get_session_name (self));
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||||
|
static gboolean
|
||||||
|
gdm_session_is_wayland_session (GdmSession *self)
|
||||||
|
{
|
||||||
|
- GKeyFile *key_file;
|
||||||
|
+ g_autoptr (GKeyFile) key_file = NULL;
|
||||||
|
gboolean is_wayland_session = FALSE;
|
||||||
|
- char *filename;
|
||||||
|
- char *full_path = NULL;
|
||||||
|
+ g_autofree char *filename = NULL;
|
||||||
|
+ g_autofree char *full_path = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (self != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (GDM_IS_SESSION (self), FALSE);
|
||||||
|
|
||||||
|
filename = get_session_filename (self);
|
||||||
|
|
||||||
|
if (supports_session_type (self, "wayland")) {
|
||||||
|
key_file = load_key_file_for_file (self, filename, NULL, &full_path);
|
||||||
|
|
||||||
|
if (key_file == NULL) {
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
- if (full_path != NULL && strstr (full_path, "/wayland-sessions/") != NULL) {
|
||||||
|
- is_wayland_session = TRUE;
|
||||||
|
+ if (full_path != NULL && strstr (full_path, "/wayland-sessions/") != NULL) {
|
||||||
|
+ is_wayland_session = TRUE;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
- g_debug ("GdmSession: checking if file '%s' is wayland session: %s", filename, is_wayland_session? "yes" : "no");
|
||||||
|
|
||||||
|
out:
|
||||||
|
- g_clear_pointer (&key_file, g_key_file_free);
|
||||||
|
- g_free (filename);
|
||||||
|
+ g_debug ("GdmSession: checking if file '%s' is wayland session: %s", filename, is_wayland_session? "yes" : "no");
|
||||||
|
return is_wayland_session;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_session_type (GdmSession *self)
|
||||||
|
{
|
||||||
|
#ifdef ENABLE_WAYLAND_SUPPORT
|
||||||
|
gboolean is_wayland_session = FALSE;
|
||||||
|
|
||||||
|
- if (supports_session_type (self, "wayland"))
|
||||||
|
- is_wayland_session = gdm_session_is_wayland_session (self);
|
||||||
|
+ is_wayland_session = gdm_session_is_wayland_session (self);
|
||||||
|
|
||||||
|
if (is_wayland_session) {
|
||||||
|
set_session_type (self, "wayland");
|
||||||
|
} else {
|
||||||
|
set_session_type (self, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gdm_session_session_registers (GdmSession *self)
|
||||||
|
{
|
||||||
|
g_autoptr(GError) error = NULL;
|
||||||
|
g_autoptr(GKeyFile) key_file = NULL;
|
||||||
|
gboolean session_registers = FALSE;
|
||||||
|
g_autofree char *filename = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (self != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (GDM_IS_SESSION (self), FALSE);
|
||||||
|
|
||||||
|
filename = get_session_filename (self);
|
||||||
|
|
||||||
|
key_file = load_key_file_for_file (self, filename, NULL, NULL);
|
||||||
|
|
||||||
|
session_registers = g_key_file_get_boolean (key_file,
|
||||||
|
G_KEY_FILE_DESKTOP_GROUP,
|
||||||
|
"X-GDM-SessionRegisters",
|
||||||
|
&error);
|
||||||
|
if (!session_registers &&
|
||||||
|
error != NULL &&
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,149 +0,0 @@
|
|||||||
From 0131864b339dc0cc5f23def75e6caa5872c9ed11 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Mon, 7 Mar 2022 10:16:39 -0500
|
|
||||||
Subject: [PATCH 4/4] data: Use latest upstream udev rules
|
|
||||||
|
|
||||||
This pulls in the latest udev rule from upstream that gives us
|
|
||||||
wayland on nvidia when we can, and disables wayland on nvidia
|
|
||||||
when we should.
|
|
||||||
|
|
||||||
It also pulls in the latest handling for passthrough gpus.
|
|
||||||
---
|
|
||||||
data/61-gdm.rules.in | 139 +++++++++++++++++++++++++++++++++++++++++--
|
|
||||||
1 file changed, 135 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
|
|
||||||
index b1da191f..5dae00ea 100644
|
|
||||||
--- a/data/61-gdm.rules.in
|
|
||||||
+++ b/data/61-gdm.rules.in
|
|
||||||
@@ -1,6 +1,123 @@
|
|
||||||
+# identify virtio graphics cards to find passthrough setups
|
|
||||||
+SUBSYSTEM!="virtio", GOTO="gdm_virtio_device_end"
|
|
||||||
+ACTION!="add", GOTO="gdm_virtio_device_end"
|
|
||||||
+ATTR{vendor}=="0x1af4", ATTR{device}=="0x0010", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_virtio_device_end"
|
|
||||||
+LABEL="gdm_virtio_device_end"
|
|
||||||
+
|
|
||||||
+SUBSYSTEM!="pci", GOTO="gdm_pci_device_end"
|
|
||||||
+ACTION!="bind", ACTION!="add", GOTO="gdm_pci_device_end"
|
|
||||||
+
|
|
||||||
+# identify virtio graphics cards to find passthrough setups
|
|
||||||
+# cirrus
|
|
||||||
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
|
|
||||||
+# vga
|
|
||||||
+ATTR{vendor}=="0x1b36", ATTR{device}=="0x0100", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
|
|
||||||
+# qxl
|
|
||||||
+ATTR{vendor}=="0x1234", ATTR{device}=="0x1111", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-virtual-gpu", ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}="1", GOTO="gdm_pci_device_end"
|
|
||||||
+
|
|
||||||
# disable Wayland on Hi1710 chipsets
|
|
||||||
-ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
|
||||||
-# disable Wayland when using the proprietary nvidia driver
|
|
||||||
-DRIVER=="nvidia", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
|
||||||
+ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", GOTO="gdm_disable_wayland"
|
|
||||||
+
|
|
||||||
+LABEL="gdm_pci_device_end"
|
|
||||||
+
|
|
||||||
# disable Wayland if modesetting is disabled
|
|
||||||
-IMPORT{cmdline}="nomodeset", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
|
||||||
+KERNEL!="card[0-9]*", GOTO="gdm_nomodeset_end"
|
|
||||||
+SUBSYSTEM!="drm", GOTO="gdm_nomodeset_end"
|
|
||||||
+IMPORT{parent}="GDM_MACHINE_HAS_VIRTUAL_GPU"
|
|
||||||
+ENV{GDM_MACHINE_HAS_VIRTUAL_GPU}!="1", RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hardware-gpu"
|
|
||||||
+# but keep it enabled for simple framebuffer drivers
|
|
||||||
+DRIVERS=="simple-framebuffer", GOTO="gdm_nomodeset_end"
|
|
||||||
+IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland"
|
|
||||||
+LABEL="gdm_nomodeset_end"
|
|
||||||
+
|
|
||||||
+# The vendor nvidia driver has multiple modules that need to be loaded before GDM can make an
|
|
||||||
+# informed choice on which way to proceed, so force GDM to wait until NVidia's modules are
|
|
||||||
+# loaded before starting up.
|
|
||||||
+KERNEL!="nvidia", GOTO="gdm_nvidia_end"
|
|
||||||
+SUBSYSTEM!="module", GOTO="gdm_nvidia_end"
|
|
||||||
+ACTION!="add", GOTO="gdm_nvidia_end"
|
|
||||||
+RUN+="/usr/bin/touch /run/udev/gdm-machine-has-vendor-nvidia-driver"
|
|
||||||
+
|
|
||||||
+# Check if suspend/resume services necessary for working wayland support is available
|
|
||||||
+TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland"
|
|
||||||
+TEST{0711}!="/usr/lib/systemd/system-sleep/nvidia", GOTO="gdm_disable_wayland"
|
|
||||||
+IMPORT{program}="/bin/sh -c \"sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper:]]\)/\1_\2/g' -e 's/[[:lower:]]/\U&/g' -e 's/^/NVIDIA_/' /proc/driver/nvidia/params\""
|
|
||||||
+ENV{NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS}!="1", GOTO="gdm_disable_wayland"
|
|
||||||
+IMPORT{program}="/bin/sh -c 'echo NVIDIA_HIBERNATE=`systemctl is-enabled nvidia-hibernate`'"
|
|
||||||
+ENV{NVIDIA_HIBERNATE}!="enabled", GOTO="gdm_disable_wayland"
|
|
||||||
+IMPORT{program}="/bin/sh -c 'echo NVIDIA_RESUME=`systemctl is-enabled nvidia-resume`'"
|
|
||||||
+ENV{NVIDIA_RESUME}!="enabled", GOTO="gdm_disable_wayland"
|
|
||||||
+IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-suspend`'"
|
|
||||||
+ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland"
|
|
||||||
+LABEL="gdm_nvidia_end"
|
|
||||||
+
|
|
||||||
+# If this machine has an internal panel, take note, since it's probably a laptop
|
|
||||||
+# FIXME: It could be "ghost connectors" make this pop positive for some workstations
|
|
||||||
+# in the wild. If so, we may have to fallback to looking at the chassis type from
|
|
||||||
+# dmi data or acpi
|
|
||||||
+KERNEL!="card[0-9]-eDP-*", GOTO="gdm_laptop_check_end"
|
|
||||||
+SUBSYSTEM!="drm", GOTO="gdm_laptop_check_end"
|
|
||||||
+ACTION!="add", GOTO="gdm_laptop_check_end"
|
|
||||||
+RUN+="/usr/bin/touch /run/udev/gdm-machine-is-laptop"
|
|
||||||
+GOTO="gdm_hybrid_nvidia_laptop_check"
|
|
||||||
+LABEL="gdm_laptop_check_end"
|
|
||||||
+
|
|
||||||
+# If this is a hybrid graphics setup, take note
|
|
||||||
+KERNEL!="card[1-9]*", GOTO="gdm_hybrid_graphics_check_end"
|
|
||||||
+KERNEL=="card[1-9]-*", GOTO="gdm_hybrid_graphics_check_end"
|
|
||||||
+SUBSYSTEM!="drm", GOTO="gdm_hybrid_graphics_check_end"
|
|
||||||
+ACTION!="add", GOTO="gdm_hybrid_graphics_check_end"
|
|
||||||
+RUN+="/usr/bin/touch /run/udev/gdm-machine-has-hybrid-graphics"
|
|
||||||
+LABEL="gdm_hybrid_graphics_check_end"
|
|
||||||
+
|
|
||||||
+# If this is a hybrid graphics laptop with vendor nvidia driver, disable wayland
|
|
||||||
+LABEL="gdm_hybrid_nvidia_laptop_check"
|
|
||||||
+TEST!="/run/udev/gdm-machine-is-laptop", GOTO="gdm_hybrid_nvidia_laptop_check_end"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_hybrid_nvidia_laptop_check_end"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", GOTO="gdm_hybrid_nvidia_laptop_check_end"
|
|
||||||
+GOTO="gdm_disable_wayland"
|
|
||||||
+LABEL="gdm_hybrid_nvidia_laptop_check_end"
|
|
||||||
+
|
|
||||||
+# Disable wayland in situation where we're in a guest with a virtual gpu and host passthrough gpu
|
|
||||||
+LABEL="gdm_virt_passthrough_check"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_passthrough_check_end"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_passthrough_check_end"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_passthrough_check_end"
|
|
||||||
+GOTO="gdm_disable_wayland"
|
|
||||||
+LABEL="gdm_virt_passthrough_check_end"
|
|
||||||
+
|
|
||||||
+# Disable wayland when there are multiple virtual gpus
|
|
||||||
+LABEL="gdm_virt_multi_gpu_check"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_virt_multi_gpu_check_end"
|
|
||||||
+TEST!="/run/udev/gdm-machine-has-virtual-gpu", GOTO="gdm_virt_multi_gpu_check_end"
|
|
||||||
+TEST=="/run/udev/gdm-machine-has-hardware-gpu", GOTO="gdm_virt_multi_gpu_check_end"
|
|
||||||
+LABEL="gdm_virt_multi_gpu_check_end"
|
|
||||||
+
|
|
||||||
+# Disable wayland when nvidia modeset is disabled or when drivers are a lower
|
|
||||||
+# version than 470,
|
|
||||||
+# For versions above 470 but lower than 510 prefer Xorg,
|
|
||||||
+# Above 510, prefer Wayland.
|
|
||||||
+KERNEL!="nvidia_drm", GOTO="gdm_nvidia_drm_end"
|
|
||||||
+SUBSYSTEM!="module", GOTO="gdm_nvidia_drm_end"
|
|
||||||
+ACTION!="add", GOTO="gdm_nvidia_drm_end"
|
|
||||||
+# disable wayland if nvidia-drm modeset is not enabled
|
|
||||||
+ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
|
|
||||||
+# disable wayland for nvidia drivers versions lower than 470
|
|
||||||
+ATTR{version}=="4[0-6][0-9].*|[0-3][0-9][0-9].*|[0-9][0-9].*|[0-9].*", GOTO="gdm_disable_wayland"
|
|
||||||
+# For nvidia drivers versions Above 510, keep Wayland by default
|
|
||||||
+ATTR{version}=="[5-9][1-9][0-9].*", GOTO="gdm_end"
|
|
||||||
+# For nvidia drivers versions 470-495, prefer Xorg by default
|
|
||||||
+GOTO="gdm_prefer_xorg"
|
|
||||||
+LABEL="gdm_nvidia_drm_end"
|
|
||||||
+
|
|
||||||
+GOTO="gdm_end"
|
|
||||||
+
|
|
||||||
+LABEL="gdm_prefer_xorg"
|
|
||||||
+RUN+="@libexecdir@/gdm-runtime-config set daemon PreferredDisplayServer xorg"
|
|
||||||
+GOTO="gdm_end"
|
|
||||||
+
|
|
||||||
+LABEL="gdm_disable_wayland"
|
|
||||||
+RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
|
|
||||||
+GOTO="gdm_end"
|
|
||||||
+
|
|
||||||
+LABEL="gdm_end"
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 0e467e3fb32d9e2a7499069699527638eb2c2be1 Mon Sep 17 00:00:00 2001
|
From dfca67899ea33da08d3aa9e84c1b4487991adad0 Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Thu, 7 Oct 2021 15:34:27 -0400
|
Date: Thu, 7 Oct 2021 15:34:27 -0400
|
||||||
Subject: [PATCH 5/5] local-display-factory: Don't crash if Xorg and Wayland
|
Subject: [PATCH 4/4] local-display-factory: Don't crash if Xorg and Wayland
|
||||||
are both unavailable
|
are both unavailable
|
||||||
|
|
||||||
At the moment if Wayland doesn't work, the login screen will fall back
|
At the moment if Wayland doesn't work, the login screen will fall back
|
@ -1,7 +0,0 @@
|
|||||||
# These directories should be automatically created by systemd-tmpfiles(8) during boot
|
|
||||||
d /run/gdm 0711 root gdm - -
|
|
||||||
d /var/lib/gdm 1770 gdm gdm - -
|
|
||||||
d /var/lib/gdm/.config 0700 gdm gdm - -
|
|
||||||
d /var/lib/gdm/.config/pulse 0700 gdm gdm - -
|
|
||||||
d /var/log/gdm 0755 root root - -
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From cf4664891ede9648d096569900e8b95abd91a633 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
|
||||||
Date: Thu, 7 Apr 2022 12:44:10 -0400
|
|
||||||
Subject: [PATCH] session-settings: Explicitly cache remote users
|
|
||||||
|
|
||||||
Right now a user's cache file won't get written out if they are logging
|
|
||||||
in with entirely default settings.
|
|
||||||
|
|
||||||
This means remote users have to type in their usernames manually until
|
|
||||||
they change their session.
|
|
||||||
|
|
||||||
This commit explicitly caches remote users.
|
|
||||||
|
|
||||||
Closes: https://gitlab.gnome.org/GNOME/gdm/-/issues/743
|
|
||||||
---
|
|
||||||
daemon/gdm-session-settings.c | 13 +++++++++++++
|
|
||||||
1 file changed, 13 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
|
|
||||||
index 5b64cb65b..ef5d72e7f 100644
|
|
||||||
--- a/daemon/gdm-session-settings.c
|
|
||||||
+++ b/daemon/gdm-session-settings.c
|
|
||||||
@@ -406,6 +406,19 @@ gdm_session_settings_save (GdmSessionSettings *settings,
|
|
||||||
if (settings->priv->language_name != NULL) {
|
|
||||||
act_user_set_language (user, settings->priv->language_name);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (!act_user_is_local_account (user)) {
|
|
||||||
+ g_autoptr (GError) error = NULL;
|
|
||||||
+
|
|
||||||
+ act_user_manager_cache_user (settings->priv->user_manager, username, &error);
|
|
||||||
+
|
|
||||||
+ if (error != NULL) {
|
|
||||||
+ g_debug ("GdmSessionSettings: Could not locally cache remote user: %s", error->message);
|
|
||||||
+ g_object_unref (user);
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
g_object_unref (user);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
518
SPECS/gdm.spec
518
SPECS/gdm.spec
@ -1,3 +1,4 @@
|
|||||||
|
%global _changelog_trimtime %(date +%s -d "1 year ago")
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
%define libauditver 1.0.6
|
%define libauditver 1.0.6
|
||||||
@ -10,64 +11,77 @@
|
|||||||
|
|
||||||
Name: gdm
|
Name: gdm
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 40.1
|
Version: 40.0
|
||||||
Release: 21%{?dist}.alma.1
|
Release: 27%{?dist}
|
||||||
Summary: The GNOME Display Manager
|
Summary: The GNOME Display Manager
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://wiki.gnome.org/Projects/GDM
|
URL: https://wiki.gnome.org/Projects/GDM
|
||||||
Source0: http://download.gnome.org/sources/gdm/40/gdm-%{tarball_version}.tar.xz
|
Source0: http://download.gnome.org/sources/gdm/40/gdm-%{version}.tar.xz
|
||||||
Source1: org.gnome.login-screen.gschema.override
|
Source1: org.gnome.login-screen.gschema.override
|
||||||
Source2: gdm-tmpfiles.conf
|
|
||||||
|
|
||||||
# moved here from pulseaudio-gdm-hooks-11.1-16
|
# Lets customers using vendor nvidia driver pick wayland sessions from the login screen
|
||||||
Source5: default.pa-for-gdm
|
|
||||||
|
|
||||||
# Upstream backports
|
|
||||||
Patch10001: 0001-local-display-factory-Provide-more-flexibility-for-c.patch
|
Patch10001: 0001-local-display-factory-Provide-more-flexibility-for-c.patch
|
||||||
|
Patch10002: 0002-libgdm-Sort-session-list.patch
|
||||||
|
Patch10003: 0003-xdmcp-display-factory-Set-supported-session-types-fo.patch
|
||||||
|
Patch10004: 0004-local-display-factory-Don-t-crash-if-Xorg-and-Waylan.patch
|
||||||
|
|
||||||
Patch20001: 0001-xdmcp-display-factory-Set-supported-session-types-fo.patch
|
# Race fix
|
||||||
Patch20002: 0002-daemon-Don-t-update-session-type-if-no-saved-session.patch
|
Patch40001: 0001-display-Handle-failure-before-display-registration.patch
|
||||||
Patch20003: 0003-daemon-Infer-session-type-from-desktop-file-if-user-.patch
|
|
||||||
Patch20004: 0004-daemon-Consolidate-session-type-and-supported-sessio.patch
|
|
||||||
Patch20005: 0005-local-display-factory-Don-t-crash-if-Xorg-and-Waylan.patch
|
|
||||||
|
|
||||||
Patch30001: 0001-local-display-factory-Don-t-try-to-respawn-displays-.patch
|
# Don't bother building gdm-screenshot, nothing uses it
|
||||||
|
Patch50001: 0001-utils-Drop-gdm-screenshot.patch
|
||||||
Patch40001: 0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch
|
|
||||||
|
|
||||||
Patch50001: 0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch
|
|
||||||
Patch50002: 0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch
|
|
||||||
|
|
||||||
Patch60001: 0001-session-settings-Fetch-session-from-user-even-if-use.patch
|
|
||||||
|
|
||||||
Patch70001: 0001-manager-Fix-btmp-record-accounting.patch
|
|
||||||
|
|
||||||
# Latest udev rules and support code
|
|
||||||
Patch90001: 0001-local-display-factory-Stall-startup-until-main-graph.patch
|
|
||||||
Patch90002: 0002-common-Add-API-to-reload-settings-from-disk.patch
|
|
||||||
Patch90003: 0003-common-Reload-settings-when-graphics-initialize.patch
|
|
||||||
Patch90004: 0004-data-Use-latest-upstream-udev-rules.patch
|
|
||||||
|
|
||||||
# Non-upstreamable workarounds
|
|
||||||
Patch66610001: 0001-data-reap-gdm-sessions-on-shutdown.patch
|
|
||||||
|
|
||||||
# Questionable feature to support logging in over multiple XDMCP consoles at the same time
|
# Questionable feature to support logging in over multiple XDMCP consoles at the same time
|
||||||
Patch66620001: 0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch
|
Patch60001: 0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch
|
||||||
Patch66620002: 0002-gdm-x-session-run-session-bus-on-non-seat0-seats.patch
|
Patch60002: 0002-gdm-x-session-run-session-bus-on-non-seat0-seats.patch
|
||||||
Patch66620003: 0003-session-ensure-login-screen-over-XDMCP-connects-to-i.patch
|
Patch60003: 0003-session-ensure-login-screen-over-XDMCP-connects-to-i.patch
|
||||||
|
|
||||||
|
# Upstream change that's moderately risky so revert it
|
||||||
|
Patch70001: 0001-Revert-gdm-wayland-x-session-don-t-overwrite-user-en.patch
|
||||||
|
|
||||||
|
# Crash fix
|
||||||
|
Patch80001: 0001-local-display-factory-Don-t-try-to-respawn-displays-.patch
|
||||||
|
|
||||||
|
# VT handling fix from upstream
|
||||||
|
Patch90001: 0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch
|
||||||
|
|
||||||
|
# Wayland fix from upstream
|
||||||
|
Patch100001: 0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch
|
||||||
|
|
||||||
|
# Fix DisallowTcp=false from upstream
|
||||||
|
Patch110001: 0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch
|
||||||
|
Patch110002: 0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch
|
||||||
|
|
||||||
|
# Fix btmp accounting
|
||||||
|
Patch120001: 0001-meson-set-D_GNU_SOURCE-for-updwtmpx.patch
|
||||||
|
Patch120002: 0002-manager-Fix-btmp-record-accounting.patch
|
||||||
|
|
||||||
|
# Fix status error when stoppping gdm quickly after starting it
|
||||||
|
Patch130001: 0001-daemon-Don-t-error-on-shutdown.patch
|
||||||
|
|
||||||
|
# Fix LUKS password propagation
|
||||||
|
Patch140001: 0001-build-Support-keyutils-1.5.11-and-older.patch
|
||||||
|
Patch140002: 0002-pam_gdm-Use-the-last-cryptsetup-password-instead-of-.patch
|
||||||
|
|
||||||
|
# Non-upstreamable workarounds
|
||||||
|
Patch66620001: 0001-data-reap-gdm-sessions-on-shutdown.patch
|
||||||
|
|
||||||
# Non-upstreamable integration patches
|
# Non-upstreamable integration patches
|
||||||
Patch99910001: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch
|
Patch99910001: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch
|
||||||
|
|
||||||
|
Patch99920001: 0001-worker-don-t-load-user-settings-for-program-sessions.patch
|
||||||
|
Patch99920002: 0002-session-support-new-accountsservice-Session-and-Sess.patch
|
||||||
|
Patch99920003: 0003-daemon-save-os-release-in-accountsservice.patch
|
||||||
|
Patch99920004: 0004-daemon-handle-upgrades-from-RHEL-7.patch
|
||||||
|
|
||||||
|
Patch99920006: 0001-data-Disable-network-configuration-on-login-screen.patch
|
||||||
|
|
||||||
Patch99930001: 0001-data-add-system-dconf-databases-to-gdm-profile.patch
|
Patch99930001: 0001-data-add-system-dconf-databases-to-gdm-profile.patch
|
||||||
|
|
||||||
Patch99950001: 0001-data-Disable-network-configuration-on-login-screen.patch
|
Patch99940001: 0001-data-disable-wayland-on-certain-hardware.patch
|
||||||
|
|
||||||
|
|
||||||
# AlmaLinux patches:
|
|
||||||
Patch999990001: session-settings-Explicitly-cache-remote-users.patch
|
|
||||||
|
|
||||||
BuildRequires: accountsservice-devel
|
BuildRequires: accountsservice-devel
|
||||||
BuildRequires: audit-libs-devel >= %{libauditver}
|
BuildRequires: audit-libs-devel >= %{libauditver}
|
||||||
BuildRequires: dconf
|
BuildRequires: dconf
|
||||||
@ -78,6 +92,7 @@ BuildRequires: keyutils-libs-devel
|
|||||||
BuildRequires: libXdmcp-devel
|
BuildRequires: libXdmcp-devel
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
BuildRequires: libdmx-devel
|
BuildRequires: libdmx-devel
|
||||||
|
BuildRequires: audit-libs-devel >= %{libauditver}
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: nss-devel >= %{nss_version}
|
BuildRequires: nss-devel >= %{nss_version}
|
||||||
BuildRequires: pam-devel >= 0:%{pam_version}
|
BuildRequires: pam-devel >= 0:%{pam_version}
|
||||||
@ -85,7 +100,6 @@ BuildRequires: pkgconfig(accountsservice) >= 0.6.3
|
|||||||
BuildRequires: pkgconfig(check)
|
BuildRequires: pkgconfig(check)
|
||||||
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||||
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
|
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
|
||||||
BuildRequires: pkgconfig(gudev-1.0)
|
|
||||||
BuildRequires: pkgconfig(iso-codes)
|
BuildRequires: pkgconfig(iso-codes)
|
||||||
BuildRequires: pkgconfig(libcanberra-gtk3)
|
BuildRequires: pkgconfig(libcanberra-gtk3)
|
||||||
BuildRequires: pkgconfig(libselinux)
|
BuildRequires: pkgconfig(libselinux)
|
||||||
@ -99,9 +113,10 @@ BuildRequires: plymouth-devel
|
|||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
BuildRequires: which
|
BuildRequires: which
|
||||||
|
%ifnarch s390 s390x ppc ppc64
|
||||||
BuildRequires: xorg-x11-server-Xorg
|
BuildRequires: xorg-x11-server-Xorg
|
||||||
|
%endif
|
||||||
BuildRequires: xorg-x11-server-devel
|
BuildRequires: xorg-x11-server-devel
|
||||||
BuildRequires: yelp-devel
|
|
||||||
BuildRequires: yelp-tools
|
BuildRequires: yelp-tools
|
||||||
|
|
||||||
Requires(pre): /usr/sbin/useradd
|
Requires(pre): /usr/sbin/useradd
|
||||||
@ -109,7 +124,7 @@ Requires(pre): /usr/sbin/useradd
|
|||||||
|
|
||||||
Provides: service(graphical-login) = %{name}
|
Provides: service(graphical-login) = %{name}
|
||||||
|
|
||||||
Requires: accountsservice
|
Requires: accountsservice >= 0.6.50-3.el8
|
||||||
Requires: audit-libs >= %{libauditver}
|
Requires: audit-libs >= %{libauditver}
|
||||||
Requires: dconf
|
Requires: dconf
|
||||||
# since we use it, and pam spams the log if the module is missing
|
# since we use it, and pam spams the log if the module is missing
|
||||||
@ -124,19 +139,32 @@ Requires: libXau >= 1.0.4-4
|
|||||||
Requires: pam >= 0:%{pam_version}
|
Requires: pam >= 0:%{pam_version}
|
||||||
Requires: /sbin/nologin
|
Requires: /sbin/nologin
|
||||||
Requires: setxkbmap
|
Requires: setxkbmap
|
||||||
Requires: systemd >= 186
|
Requires: systemd >= 239-50
|
||||||
Requires: system-logos
|
Requires: system-logos
|
||||||
Requires: xhost xmodmap xrdb
|
Requires: xorg-x11-server-utils
|
||||||
Requires: xorg-x11-xinit
|
Requires: xorg-x11-xinit
|
||||||
|
Recommends: xorg-x11-server-Xorg
|
||||||
|
Conflicts: xorg-x11-server-Xorg < 1.20.8-4
|
||||||
|
|
||||||
# Until the greeter gets dynamic user support, it can't
|
# Until the greeter gets dynamic user support, it can't
|
||||||
# use a user bus
|
# use a user bus
|
||||||
Requires: /usr/bin/dbus-run-session
|
Requires: /usr/bin/dbus-run-session
|
||||||
|
|
||||||
Requires(posttrans): dconf
|
Obsoletes: gdm-libs < 1:3.12.0-3
|
||||||
|
|
||||||
Provides: gdm-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
Provides: gdm-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
# Swallow up old fingerprint/smartcard plugins
|
||||||
|
Obsoletes: gdm-plugin-smartcard < 1:3.2.1
|
||||||
|
Provides: gdm-plugin-smartcard = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
Obsoletes: gdm-plugin-fingerprint < 1:3.2.1
|
||||||
|
Provides: gdm-plugin-fingerprint = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
# moved here from pulseaudio-gdm-hooks-11.1-16
|
||||||
|
Source5: default.pa-for-gdm
|
||||||
|
Obsoletes: pulseaudio-gdm-hooks < 1:11.1-17
|
||||||
|
Provides: pulseaudio-gdm-hooks = 1:%{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
GDM, the GNOME Display Manager, handles authentication-related backend
|
GDM, the GNOME Display Manager, handles authentication-related backend
|
||||||
functionality for logging in a user and unlocking the user's session after
|
functionality for logging in a user and unlocking the user's session after
|
||||||
@ -158,6 +186,7 @@ files needed to build custom greeters.
|
|||||||
|
|
||||||
%package pam-extensions-devel
|
%package pam-extensions-devel
|
||||||
Summary: Macros for developing GDM extensions to PAM
|
Summary: Macros for developing GDM extensions to PAM
|
||||||
|
Group: Development/Libraries
|
||||||
Requires: pam-devel
|
Requires: pam-devel
|
||||||
|
|
||||||
%description pam-extensions-devel
|
%description pam-extensions-devel
|
||||||
@ -166,20 +195,18 @@ files that are helpful to PAM modules wishing to support
|
|||||||
GDM specific authentication features.
|
GDM specific authentication features.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -S git -n gdm-%{tarball_version}
|
%autosetup -S git
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%meson -Dpam-prefix=%{_sysconfdir} \
|
%meson -Dpam-prefix=%{_sysconfdir} \
|
||||||
-Drun-dir=/run/gdm \
|
-Drun-dir=/run/gdm \
|
||||||
-Dudev-dir=%{_udevrulesdir} \
|
-Dudev-dir=%{_udevrulesdir} \
|
||||||
-Ddefault-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin \
|
-Ddefault-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin \
|
||||||
-Dipv6=true \
|
|
||||||
-Dprofiling=true \
|
-Dprofiling=true \
|
||||||
-Dplymouth=enabled \
|
-Dplymouth=enabled \
|
||||||
-Dselinux=enabled
|
-Dselinux=enabled
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/gdm/Init
|
mkdir -p %{buildroot}%{_sysconfdir}/gdm/Init
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/gdm/PreSession
|
mkdir -p %{buildroot}%{_sysconfdir}/gdm/PreSession
|
||||||
@ -187,7 +214,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/gdm/PostSession
|
|||||||
|
|
||||||
%meson_install
|
%meson_install
|
||||||
|
|
||||||
install -p -m644 -D %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
||||||
install -p -m644 -D %{SOURCE5} %{buildroot}%{_localstatedir}/lib/gdm/.config/pulse/default.pa
|
install -p -m644 -D %{SOURCE5} %{buildroot}%{_localstatedir}/lib/gdm/.config/pulse/default.pa
|
||||||
|
|
||||||
rm -f %{buildroot}%{_sysconfdir}/pam.d/gdm
|
rm -f %{buildroot}%{_sysconfdir}/pam.d/gdm
|
||||||
@ -198,6 +224,9 @@ cp -a %{SOURCE1} %{buildroot}%{_datadir}/glib-2.0/schemas
|
|||||||
# docs go elsewhere
|
# docs go elsewhere
|
||||||
rm -rf %{buildroot}/%{_prefix}/doc
|
rm -rf %{buildroot}/%{_prefix}/doc
|
||||||
|
|
||||||
|
# we're not doing user sessions in rhel 8
|
||||||
|
rm -rf %{buildroot}%{_prefix}/lib/systemd/user
|
||||||
|
|
||||||
# create log dir
|
# create log dir
|
||||||
mkdir -p %{buildroot}/var/log/gdm
|
mkdir -p %{buildroot}/var/log/gdm
|
||||||
|
|
||||||
@ -209,6 +238,12 @@ mkdir -p %{buildroot}/run/gdm
|
|||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/dconf/db/gdm.d/locks
|
mkdir -p %{buildroot}%{_sysconfdir}/dconf/db/gdm.d/locks
|
||||||
|
|
||||||
|
cat << EOF > %{buildroot}%{_libexecdir}/gdm-disable-wayland
|
||||||
|
#!/bin/sh
|
||||||
|
%{_libexecdir}/gdm-runtime-config set daemon WaylandEnable false
|
||||||
|
EOF
|
||||||
|
chmod a+x %{buildroot}%{_libexecdir}/gdm-disable-wayland
|
||||||
|
|
||||||
%find_lang gdm --with-gnome
|
%find_lang gdm --with-gnome
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -219,6 +254,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/dconf/db/gdm.d/locks
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%{?ldconfig}
|
||||||
|
|
||||||
# if the user already has a config file, then migrate it to the new
|
# if the user already has a config file, then migrate it to the new
|
||||||
# location; rpm will ensure that old file will be renamed
|
# location; rpm will ensure that old file will be renamed
|
||||||
|
|
||||||
@ -272,11 +309,9 @@ fi
|
|||||||
%systemd_preun gdm.service
|
%systemd_preun gdm.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%{?ldconfig}
|
||||||
%systemd_postun gdm.service
|
%systemd_postun gdm.service
|
||||||
|
|
||||||
%posttrans
|
|
||||||
dconf update || :
|
|
||||||
|
|
||||||
%files -f gdm.lang
|
%files -f gdm.lang
|
||||||
%doc AUTHORS NEWS README.md
|
%doc AUTHORS NEWS README.md
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -300,15 +335,15 @@ dconf update || :
|
|||||||
%dir %{_sysconfdir}/dconf/db/gdm.d/locks
|
%dir %{_sysconfdir}/dconf/db/gdm.d/locks
|
||||||
%{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.xml
|
%{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.xml
|
||||||
%{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.override
|
%{_datadir}/glib-2.0/schemas/org.gnome.login-screen.gschema.override
|
||||||
%{_libexecdir}/gdm-host-chooser
|
%{_libexecdir}/gdm-disable-wayland
|
||||||
%{_libexecdir}/gdm-runtime-config
|
%{_libexecdir}/gdm-runtime-config
|
||||||
|
%{_libexecdir}/gdm-host-chooser
|
||||||
%{_libexecdir}/gdm-session-worker
|
%{_libexecdir}/gdm-session-worker
|
||||||
%{_libexecdir}/gdm-simple-chooser
|
%{_libexecdir}/gdm-simple-chooser
|
||||||
%{_libexecdir}/gdm-wayland-session
|
%{_libexecdir}/gdm-wayland-session
|
||||||
%{_libexecdir}/gdm-x-session
|
%{_libexecdir}/gdm-x-session
|
||||||
%{_sbindir}/gdm
|
%{_sbindir}/gdm
|
||||||
%{_bindir}/gdmflexiserver
|
%{_bindir}/gdmflexiserver
|
||||||
%{_bindir}/gdm-screenshot
|
|
||||||
%dir %{_datadir}/dconf
|
%dir %{_datadir}/dconf
|
||||||
%dir %{_datadir}/dconf/profile
|
%dir %{_datadir}/dconf/profile
|
||||||
%{_datadir}/dconf/profile/gdm
|
%{_datadir}/dconf/profile/gdm
|
||||||
@ -337,9 +372,6 @@ dconf update || :
|
|||||||
%{_sysconfdir}/pam.d/gdm-launch-environment
|
%{_sysconfdir}/pam.d/gdm-launch-environment
|
||||||
%{_udevrulesdir}/61-gdm.rules
|
%{_udevrulesdir}/61-gdm.rules
|
||||||
%{_unitdir}/gdm.service
|
%{_unitdir}/gdm.service
|
||||||
%dir %{_userunitdir}/gnome-session@gnome-login.target.d/
|
|
||||||
%{_userunitdir}/gnome-session@gnome-login.target.d/session.conf
|
|
||||||
%{_tmpfilesdir}/%{name}.conf
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%dir %{_includedir}/gdm
|
%dir %{_includedir}/gdm
|
||||||
@ -354,253 +386,247 @@ dconf update || :
|
|||||||
%{_libdir}/pkgconfig/gdm-pam-extensions.pc
|
%{_libdir}/pkgconfig/gdm-pam-extensions.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Dec 08 2023 Eduard Abdullin <eabdullin@almalinux.org> - 40.1-21.alma.1
|
* Mon Dec 12 2022 Ray Strode <rstrode@redhat.com> - 40.0-27
|
||||||
- session-settings: Explicitly cache remote users
|
- Fix LUKs password handling
|
||||||
|
Resolves: #2150649
|
||||||
|
|
||||||
* Fri Jan 27 2023 Ray Strode <rstrode@redhat.com> - 40.1-21
|
* Mon Dec 12 2022 Ray Strode <rstrode@redhat.com> - 40.0-26
|
||||||
- Enable IPV6 support
|
- Fix error in service status log
|
||||||
Resolves: #2165049
|
Resolves: #1924079
|
||||||
|
|
||||||
* Wed Jan 18 2023 Ray Strode <rstrode@redhat.com> - 40.1-20
|
* Wed Oct 19 2022 Ray Strode <rstrode@redhat.com> - 40.0-25
|
||||||
- Ensure /run/gdm and other gdm directories are created at boot up
|
|
||||||
Resolves: #2047942
|
|
||||||
|
|
||||||
* Wed Jan 11 2023 Ray Strode <rstrode@redhat.com> - 40.1-19
|
|
||||||
- Re-enable Wayland on aspeed
|
|
||||||
Resolves: #2131203
|
|
||||||
|
|
||||||
* Wed Nov 02 2022 Ray Strode <rstrode@redhat.com> - 40.1-18
|
|
||||||
- Fix btmp accounting
|
- Fix btmp accounting
|
||||||
Resolves: #2073275
|
Resolves: #2030043
|
||||||
|
|
||||||
* Thu Sep 29 2022 Ray Strode <rstrode@redhat.com> - 40.1-17
|
* Mon May 16 2022 Ray Strode <rstrode@redhat.com> - 40.0-24
|
||||||
- Disable Wayland on aspeed
|
|
||||||
Related: #2097308
|
|
||||||
|
|
||||||
* Tue Apr 12 2022 Ray Strode <rstrode@redhat.com> - 40.1-16
|
|
||||||
- Reenable Wayland for matrox and aspeed
|
|
||||||
Resolves: #2097308
|
|
||||||
|
|
||||||
* Tue Apr 12 2022 Ray Strode <rstrode@redhat.com> - 40.1-15
|
|
||||||
- Fix accountsservice user templates
|
|
||||||
Resolves: #2062827
|
|
||||||
- Properly force Xorg on matrox cards
|
|
||||||
Related: #2074013
|
|
||||||
- Fix typo that prevents the correct session type from being
|
- Fix typo that prevents the correct session type from being
|
||||||
used when user switching.
|
used when user switching.
|
||||||
Resolves: #2074014
|
Resolves: #2034092
|
||||||
|
|
||||||
* Tue Mar 22 2022 Ray Strode <rstrode@redhat.com> - 40.1-14
|
* Thu Jan 27 2022 Ray Strode <rstrode@redhat.com> - 40.0-23
|
||||||
- Fix erroneous jump back to login screen on udev events after login
|
- Fix crash when neither Xorg nor wayland is working great
|
||||||
Resolves: #2065901
|
Resolves: #2032180
|
||||||
|
|
||||||
* Mon Mar 07 2022 Ray Strode <rstrode@redhat.com> - 40.1-13
|
* Wed Dec 22 2021 Ray Strode <rstrode@redhat.com> - 40.1-22
|
||||||
- Pull in latest udev rules and race fixes for handling
|
- Fix DisallowTCP
|
||||||
udev rules.
|
Resolves: #2025768
|
||||||
Related: #2060793
|
|
||||||
|
|
||||||
* Tue Feb 22 2022 Ray Strode <rstrode@redhat.com> - 40.1-12
|
* Tue Dec 21 2021 Ray Strode <rstrode@redhat.com> - 40.1-21
|
||||||
- More fixes from RHEL 8:
|
- Fix Xorg/Wayland selection in some cases
|
||||||
- Fix DisallowTCP=false
|
Resolves: #2009045
|
||||||
- Fix crash when both wayland and xorg are unavailable
|
|
||||||
Related: #2056931
|
|
||||||
|
|
||||||
* Wed Oct 27 2021 Ray Strode <rstrode@redhat.com> - 40.1-11
|
* Mon Oct 25 2021 Ray Strode <rstrode@redhat.com> - 40.1-20
|
||||||
- Pull in RHEL 8 patches and drop unused patches
|
|
||||||
Related: #2017859
|
|
||||||
|
|
||||||
* Mon Oct 25 2021 Ray Strode <rstrode@redhat.com> - 40.1-10
|
|
||||||
- Remove module-rescue-stream from default.pa
|
- Remove module-rescue-stream from default.pa
|
||||||
Resolves: #2017439
|
Resolves: #1969846
|
||||||
|
|
||||||
* Mon Oct 25 2021 Ray Strode <rstrode@redhat.com> - 40.1-9
|
* Mon Oct 25 2021 Ray Strode <rstrode@redhat.com> - 40.0-19
|
||||||
- Synchronize permission and group ownership for log dir between
|
- Synchronize permission and group ownership for log dir between
|
||||||
rpm file manifest and daemon expectations.
|
rpm file manifest and daemon expectations.
|
||||||
Resolves: #1999586
|
Resolves: #1878119
|
||||||
|
|
||||||
* Wed Oct 13 2021 Ray Strode <rstrode@redhat.com> - 40.1-8
|
* Mon Oct 25 2021 Ray Strode <rstrode@redhat.com> - 40.0-18
|
||||||
- Add latest session type propagation fixes from upstream
|
- Drop usleep workaround for problem that's now fixed properly in systemd
|
||||||
Related: #2009044
|
Resolves: #1921732
|
||||||
|
|
||||||
* Mon Aug 23 2021 Ray Strode <rstrode@redhat.com> - 40.1-7
|
* Wed Oct 13 2021 Ray Strode <rstrode@redhat.com> - 40.0-17
|
||||||
- Don't use gdm-disable-wayland binary in udev rules.
|
- Properly switch VTs when jumping to multi-user target
|
||||||
It doesn't exist anymore.
|
Related: #1988958
|
||||||
Related: #1985099
|
|
||||||
|
|
||||||
* Thu Aug 19 2021 Ray Strode <rstrode@redhat.com> - 40.1-6
|
* Wed Sep 15 2021 Ray Strode <rstrode@redhat.com> - 40.0-16
|
||||||
- Disable wayland on server chips
|
- Fix XDMCP
|
||||||
Resolves: #1963919
|
Resolves: #2005011
|
||||||
|
- Fix crash at shutdown
|
||||||
|
Related: #2005011
|
||||||
|
|
||||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:40.1-5
|
* Wed Sep 01 2021 Ray Strode <rstrode@redhat.com> - 40.0-14
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Disable Wayland on HyperV
|
||||||
Related: rhbz#1991688
|
- Fix Xorg fallback
|
||||||
|
Related: #2000904
|
||||||
|
|
||||||
* Wed Jul 28 2021 Ray Strode <rstrode@redhat.com> - 40.1-4
|
* Thu Aug 19 2021 Ray Strode <rstrode@redhat.com> - 40.0-12
|
||||||
- Update to 40.1
|
- Redisable on server chips since rebase
|
||||||
- Allow vendor nvidia users to choose wayland sessions
|
Related: #1909300
|
||||||
Related: #1985099
|
|
||||||
|
|
||||||
* Wed Jun 16 2021 Ray Strode <rstrode@redhat.com> - 40.0-5
|
* Wed Aug 04 2021 Ray Strode <rstrode@redhat.com> - 40.0-11
|
||||||
- Ensure gdm dconf db is generated at install time
|
- Read session settings from users even if they've never saved
|
||||||
Related: #1972234
|
before. Needed to support accountsservice templated user
|
||||||
|
defaults.
|
||||||
|
Related: #1812788
|
||||||
|
|
||||||
* Tue Jun 15 2021 Ray Strode - 1:40.0-4
|
* Tue Jul 27 2021 Ray Strode <rstrode@redhat.com> - 40.0-10
|
||||||
- Provide gdm specific dconf sources
|
- Let customers using vendor nvidia driver choose wayland sessions
|
||||||
Related: #1972234
|
Resolves: #1962211
|
||||||
|
- Drop unused patches
|
||||||
|
|
||||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1:40.0-2
|
* Tue Jun 08 2021 Florian Müllner <fmuellner@redhat.com> - 40.0-3
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Disable network items on login screen
|
||||||
|
Resolves: #1935261
|
||||||
|
|
||||||
* Tue Mar 30 2021 Kalev Lember <klember@redhat.com> - 1:40.0-1
|
* Wed May 19 2021 Ray Strode <rstrode@redhat.com> - 40.0-2
|
||||||
- Update to 40.0
|
- Fix workaround for systemd bug that's breaking X11 fallback
|
||||||
- Remove old obsoletes and provides
|
Resolves: #1962049
|
||||||
|
|
||||||
* Tue Mar 16 2021 Kalev Lember <klember@redhat.com> - 1:40~rc-1
|
* Wed May 05 2021 Ray Strode <rstrode@redhat.com> - 40.0-1
|
||||||
- Update to 40.rc
|
- Rebase to 40.0
|
||||||
|
Resolves: #1909300
|
||||||
|
|
||||||
* Wed Mar 10 2021 Benjamin Berg <bberg@redhat.com> - 1:40~beta-2
|
* Wed Jan 27 2021 Ray Strode <rstrode@redhat.com> - 3.28.3-39
|
||||||
- Add patch to fix issues with the first login after boot
|
- Ensure login screen display server is is killed at log in
|
||||||
Resolves: #1937308
|
- Pull in fixes for two security issues
|
||||||
|
Resolves: #1918391
|
||||||
|
|
||||||
* Fri Feb 26 2021 Kalev Lember <klember@redhat.com> - 1:40~beta-1
|
* Tue Nov 10 2020 Jonas Ådahl <jadahl@redhat.com> - 3.28.3-38
|
||||||
- Update to 40.beta
|
- Re-add disabling Wayland for server GPUs
|
||||||
|
Related: #1670273
|
||||||
|
|
||||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.38.2.1-2
|
* Tue Nov 10 2020 Jonas Ådahl <jadahl@redhat.com> - 3.28.3-35
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Stop disabling Wayland for server GPUs
|
||||||
|
Related: #1670273
|
||||||
|
|
||||||
* Sat Dec 19 2020 Kalev Lember <klember@redhat.com> - 1:3.38.2.1-1
|
* Tue Sep 15 2020 Ray Strode <rstrode@redhat.com> - 3.28.3-34
|
||||||
- Update to 3.38.2.1
|
- Fix file descriptor leak
|
||||||
|
Resolves: #1877853
|
||||||
|
|
||||||
* Wed Nov 4 2020 Kalev Lember <klember@redhat.com> - 1:3.38.2-1
|
* Tue Sep 01 2020 Ray Strode <rstrode@redhat.com> - 3.28.3-33
|
||||||
- Update to 3.38.2
|
- Fix problem with Xorg fallback
|
||||||
|
Resolves: #1868260
|
||||||
|
|
||||||
* Tue Oct 13 2020 Ray Strode <rstrode@redhat.com> - 3.38.1-1
|
* Tue Aug 11 2020 Ray Strode <rstrode@redhat.com> - 3.28.3-32
|
||||||
- Update to 3.38.1
|
- Add dconf db to file manifest
|
||||||
|
Related: #1833158
|
||||||
|
|
||||||
* Sat Sep 12 2020 Kalev Lember <klember@redhat.com> - 1:3.38.0-1
|
* Thu Jul 23 2020 Ray Strode <rstrode@redhat.com> - 3.28.3-31
|
||||||
- Update to 3.38.0
|
- add back gdm system db to dconf profile
|
||||||
|
Resolves: #1833158
|
||||||
|
|
||||||
* Tue Sep 08 2020 Dan Horák <dan[at]danny.cz> - 3.37.90-2
|
* Mon Jul 13 2020 Ray Strode <rstrode@redhat.com> - 3.28.3-30
|
||||||
- Remove stale and unnecessary architecture-specific exceptions
|
- Make sure login screen is killed during login
|
||||||
|
Resolves: #1618481
|
||||||
|
|
||||||
* Mon Aug 17 2020 Kalev Lember <klember@redhat.com> - 1:3.37.90-1
|
* Wed Feb 05 2020 Ray Strode <rstrode@redhat.com> - 3.28.3-29
|
||||||
- Update to 3.37.90
|
- Make GNOME work slightly better in the multiple logins case.
|
||||||
|
Related: #1710882
|
||||||
|
|
||||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.37.3-4
|
* Sun Dec 15 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-28
|
||||||
- Second attempt - Rebuilt for
|
- Correct wayland session detection logic when deciding
|
||||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
whether or not to run Xsession script
|
||||||
|
Resolves: #1728330
|
||||||
|
|
||||||
* Tue Jul 28 2020 Adam Jackson <ajax@redhat.com> - 3.37.3-3
|
* Sun Dec 15 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-27
|
||||||
- Requires xhost xmodmap xrdb, not xorg-x11-server-utils
|
- Don't run initial-setup for machines enrolled in IPA setup.
|
||||||
|
Resolves: #1750516
|
||||||
|
|
||||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.37.3-2
|
* Fri Dec 13 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-26
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
- Forward port RHEL 7 patch to allow multiple logins for the
|
||||||
|
same user with XDMCP connections.
|
||||||
|
Resolves: #1710882
|
||||||
|
|
||||||
* Mon Jul 20 2020 Ray Strode <rstrode@redhat.com> - 3.37.3-1
|
* Thu Dec 12 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-25
|
||||||
- Update to 3.37.3
|
- Reenable wayland on hybrid setups (except virt pass through)
|
||||||
- Kills login screen after login on Xorg systems
|
Resolves: #1749960
|
||||||
- Fixes user switching bug
|
- Reenable wayland on qxl
|
||||||
Resolves: #1829079
|
Resolves: #1744452
|
||||||
|
|
||||||
* Tue May 05 2020 Ray Strode <rstrode@redhat.com> - 3.37.1-2
|
* Fri Dec 06 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-24
|
||||||
- Make sure users have dbus-run-session installed since
|
- Reenable wayland on cirrus
|
||||||
the greeter depends on it.
|
Resolves: #1744527
|
||||||
|
|
||||||
* Mon May 04 2020 Ray Strode <rstrode@redhat.com> - 3.37.1-1
|
* Thu Nov 21 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-23
|
||||||
- Update to 3.37.1
|
- Correct timedlogin based screenlock bypass
|
||||||
|
Resolves: #1672829
|
||||||
|
|
||||||
* Tue Apr 07 2020 Ray Strode <rstrode@redhat.com> - 3.34.1-3
|
* Mon Jun 24 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-22
|
||||||
- Fix autologin when gdm is started from VT other than VT 1
|
- Ensure user session is killed with its worker and that all
|
||||||
|
user sessions are cleaned up on shutdown
|
||||||
|
Resolves: #1690714
|
||||||
|
|
||||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.34.1-2
|
* Mon Jun 17 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-21
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Drop gdm-screenshot
|
||||||
|
Resolves: #1680164
|
||||||
|
|
||||||
* Mon Oct 07 2019 Kalev Lember <klember@redhat.com> - 1:3.34.1-1
|
* Mon Feb 11 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-20
|
||||||
- Update to 3.34.1
|
- Disable wayland on hybrid gpu machines, and server machines
|
||||||
|
again
|
||||||
|
Related: #1662087
|
||||||
|
Related: #1591250 1670273
|
||||||
|
|
||||||
* Wed Sep 25 2019 Benjamin Berg <bberg@redhat.com> - 1:3.34.0-2
|
* Mon Feb 11 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-19
|
||||||
- Add patch to fix fast user switching
|
- Fix XDMCP sessions when local console is using wayland
|
||||||
https://gitlab.gnome.org/GNOME/gdm/merge_requests/86
|
Resolves: #1640043
|
||||||
- Resolves: #1751673
|
|
||||||
|
|
||||||
* Wed Sep 11 2019 Kalev Lember <klember@redhat.com> - 1:3.34.0-1
|
* Thu Jan 31 2019 Adam Jackson <ajax@redhat.com> - 3.28.3-18
|
||||||
- Update to 3.34.0
|
- Add Recommends: xorg-x11-server-Xorg to fix more fallback cases
|
||||||
|
Resolves: #1617991
|
||||||
|
|
||||||
* Wed Sep 04 2019 Kalev Lember <klember@redhat.com> - 1:3.33.92-1
|
* Mon Jan 14 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-17
|
||||||
- Update to 3.33.92
|
- Reenable wayland on other server cards (missed one in -14)
|
||||||
|
Related: #1591250
|
||||||
|
|
||||||
* Wed Sep 04 2019 Benjamin Berg <bberg@redhat.com> - 1:3.33.90-4
|
* Mon Jan 14 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-15
|
||||||
- Add patch to fix environment setup
|
- Disable wayland on QXL devices
|
||||||
https://gitlab.gnome.org/GNOME/gdm/merge_requests/82
|
Related: #1641763
|
||||||
See also #1746563
|
|
||||||
|
|
||||||
* Mon Aug 26 2019 Adam Williamson <awilliam@redhat.com> - 1:3.33.90-3
|
* Fri Jan 04 2019 Ray Strode <rstrode@redhat.com> - 3.28.3-14
|
||||||
- Drop patch from -2, better fix was applied to systemd
|
- Reenable wayland on server cards
|
||||||
|
Related: #1591250
|
||||||
|
|
||||||
* Thu Aug 22 2019 Adam Williamson <awilliam@redhat.com> - 1:3.33.90-2
|
* Wed Nov 28 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-13
|
||||||
- Revert upstream commit that gives sbin priority in non-root $PATH
|
- rebuild
|
||||||
- Resolves: #1744059
|
Related: #1625683
|
||||||
|
|
||||||
* Tue Aug 20 2019 Kalev Lember <klember@redhat.com> - 1:3.33.90-1
|
* Tue Nov 13 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-12
|
||||||
- Update to 3.33.90
|
- rebuild
|
||||||
|
Related: #1625683
|
||||||
|
|
||||||
* Mon Aug 12 2019 Kalev Lember <klember@redhat.com> - 1:3.33.4-1
|
* Fri Nov 02 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-11
|
||||||
- Update to 3.33.4
|
- Fix non-autologin which go broken in previous build
|
||||||
|
Related: #1645135
|
||||||
|
|
||||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.32.0-4
|
* Thu Nov 01 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-10
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Fix autologin when X falls back
|
||||||
|
Resolves: #1645135
|
||||||
|
|
||||||
* Mon Apr 15 2019 Ray Strode <rstrode@redhat.com> - 1:3.32.0-3
|
* Mon Oct 29 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-9
|
||||||
- avoid wayland if nomodeset is on kernel command line
|
- workaround logind bug that breaks X fallback
|
||||||
Related: #1691909
|
Resolves: #1643874
|
||||||
|
|
||||||
* Mon Apr 15 2019 Ray Strode <rstrode@redhat.com> - 1:3.32.0-2
|
* Wed Oct 24 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-8
|
||||||
- Drop CanGraphical patch for now. It's causing problems.
|
- Disable wayland on proprietary nvidia
|
||||||
Resolves: #1683197
|
Related: #1639782
|
||||||
|
|
||||||
* Wed Mar 13 2019 Kalev Lember <klember@redhat.com> - 1:3.32.0-1
|
* Mon Oct 15 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-7
|
||||||
- Update to 3.32.0
|
- Drop dead code that makes coverity unhappy
|
||||||
|
Resolves: #1602510
|
||||||
|
|
||||||
* Wed Feb 27 2019 Ray Strode <rstrode@redhat.com> - 3.31.91-1
|
* Fri Oct 12 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-6
|
||||||
- Update to 3.31.91
|
- Move AccountsServiceUser extension from gdm to accountsservice,
|
||||||
|
since we need to use it when creating users from gnome-initial-setup
|
||||||
|
Related: #1628060
|
||||||
|
|
||||||
* Tue Feb 26 2019 Kalev Lember <klember@redhat.com> - 1:3.30.3-1
|
* Mon Oct 08 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-5
|
||||||
- Update to 3.30.3
|
- Fix WaylandEnable=false for autologin displays
|
||||||
|
Resolves: #1637102
|
||||||
|
|
||||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.30.2-2
|
* Wed Sep 12 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Fix typo in RHEL-7 upgrade patch causing classic to get
|
||||||
|
picked too often
|
||||||
|
Resolves: #1628060
|
||||||
|
Related: #1595825
|
||||||
|
|
||||||
* Wed Dec 19 2018 Kalev Lember <klember@redhat.com> - 1:3.30.2-1
|
* Thu Aug 23 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-3
|
||||||
- Update to 3.30.2
|
- Fix crash when wayland is disabled
|
||||||
|
Related: #1612915 1621226
|
||||||
|
|
||||||
* Sat Oct 06 2018 Ray Strode <rstrode@redhat.com> - 1:3.30.1-2
|
* Tue Aug 21 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-2
|
||||||
- Fix login screen for machines that boot to fast
|
- Handle upgrades from RHEL 7 better
|
||||||
- Fix autologin crash
|
Related: #1612915 1595825
|
||||||
|
- Fix wayland blacklisting and blacklist mga200 cards from
|
||||||
|
using wayland.
|
||||||
|
Related: #1591250
|
||||||
|
|
||||||
* Sat Sep 29 2018 Kalev Lember <klember@redhat.com> - 1:3.30.1-1
|
* Mon Aug 13 2018 Ray Strode <rstrode@redhat.com> - 3.28.3-1
|
||||||
- Update to 3.30.1
|
- Update to 3.28.3
|
||||||
|
Resolves: #1615447
|
||||||
* Fri Sep 07 2018 Kalev Lember <klember@redhat.com> - 1:3.30.0-3
|
|
||||||
- Rebuilt against fixed atk (#1626575)
|
|
||||||
|
|
||||||
* Fri Sep 07 2018 Ray Strode <rstrode@redhat.com> - 3.30.0-2
|
|
||||||
- More initial setup fixes
|
|
||||||
Resolves: #1625572
|
|
||||||
|
|
||||||
* Tue Sep 04 2018 Ray Strode <rstrode@redhat.com> - 3.30.0-1
|
|
||||||
- Update to 3.30.0
|
|
||||||
- Fixes initial setup
|
|
||||||
Resolves: #1624534
|
|
||||||
|
|
||||||
* Fri Aug 24 2018 Ray Strode <rstrode@redhat.com> - 1:3.29.91-1
|
|
||||||
- Update to 3.29.91
|
|
||||||
- Fix race at startup
|
|
||||||
|
|
||||||
* Mon Aug 13 2018 Kalev Lember <klember@redhat.com> - 1:3.29.90-1
|
|
||||||
- Update to 3.29.90
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.28.2-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu May 17 2018 Kalev Lember <klember@redhat.com> - 1:3.28.2-1
|
* Thu May 17 2018 Kalev Lember <klember@redhat.com> - 1:3.28.2-1
|
||||||
- Update to 3.28.2
|
- Update to 3.28.2
|
||||||
@ -635,7 +661,7 @@ dconf update || :
|
|||||||
* Fri Mar 02 2018 Kalev Lember <klember@redhat.com> - 1:3.27.91-1
|
* Fri Mar 02 2018 Kalev Lember <klember@redhat.com> - 1:3.27.91-1
|
||||||
- Update to 3.27.91
|
- Update to 3.27.91
|
||||||
|
|
||||||
* Mon Feb 19 2018 Ray Strode <rstrode@redhat.com>> - 1:3.27.4-4
|
* Mon Feb 19 2018 Ray Strode <rstrode@redhat.com> - 1:3.27.4-4
|
||||||
- Make sure GDM checks systemd dconf databases
|
- Make sure GDM checks systemd dconf databases
|
||||||
Related: #1546644
|
Related: #1546644
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user