Commit ec5ca6da authored by Colin Walters's avatar Colin Walters

main: If we have systemd, initialize journal here

If gdm has been configured with the systemd journal, then the normal
output has "/etc/X11/gdm/Xsession" as the program name.  That's fugly.
As a purely cosmetic thing, let's reinitialize the journal here with
"gnome-session" as the program name.
parent 6e14faf9
......@@ -48,6 +48,10 @@
#include "gsm-system.h"
#include "gsm-fail-whale.h"
#include <systemd/sd-journal.h>
#define GSM_DBUS_NAME "org.gnome.SessionManager"
static gboolean failsafe = FALSE;
......@@ -292,6 +296,18 @@ main (int argc, char **argv)
gsm_util_init_error (TRUE, "%s", error->message);
int journalfd;
journalfd = sd_journal_stream_fd (PACKAGE, LOG_INFO, 0);
if (journalfd >= 0) {
dup2(journalfd, 1);
dup2(journalfd, 2);
/* Check GL, if it doesn't work out then force software fallback */
if (!check_gl (&error)) {
gl_failed = TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment