[gnome-shell] If systemd is enabled send a message with MESSAGE_ID after gnome-shell has started in user mode



commit 1c8036b8633b8de4f6d68127cb2fcbc64eef355b
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Fri Apr 18 16:31:18 2014 +0200

    If systemd is enabled send a message with MESSAGE_ID after gnome-shell has started in user mode
    
    Also adds a new dependency - libgsystem
    https://bugzilla.gnome.org/show_bug.cgi?id=728449

 js/ui/main.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 22a561f..1958abe 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -9,6 +9,7 @@ const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
 const Shell = imports.gi.Shell;
 const St = imports.gi.St;
+const GSystem = imports.gi.GSystem;
 
 const Components = imports.ui.components;
 const CtrlAltTab = imports.ui.ctrlAltTab;
@@ -43,6 +44,7 @@ const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
 
 const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
 const STICKY_KEYS_ENABLE = 'stickykeys-enable';
+const GNOMESHELL_STARTED_MESSAGE_ID = 'f3ea493c22934e26811cd62abe8e203a';
 
 let componentManager = null;
 let panel = null;
@@ -188,8 +190,6 @@ function _initializeUI() {
 
     _startDate = new Date();
 
-    log('GNOME Shell started at ' + _startDate);
-
     let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
     if (perfModuleName) {
         let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
@@ -213,6 +213,12 @@ function _initializeUI() {
                               if (screenShield) {
                                   screenShield.lockIfWasLocked();
                               }
+                              if (LoginManager.haveSystemd() && sessionMode.currentMode === 'user') {
+                                  GSystem.log_structured_print('GNOME Shell started at ' + _startDate,
+                                                               ['MESSAGE_ID=' + 
GNOMESHELL_STARTED_MESSAGE_ID]);
+                              } else {
+                                  log('GNOME Shell started at ' + _startDate);
+                              }
                           });
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]