Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 579835 Details for
Bug 815671
gdm-fallback.session: shutdown / restart don't work without ConsoleKit
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
shutdown via gnome-session
0001-fallback-greeter-shutdown-computer-via-gnome-session.patch (text/plain), 5.29 KB, created by
Edward Sheldrake
on 2012-04-24 12:12:03 UTC
(
hide
)
Description:
shutdown via gnome-session
Filename:
MIME Type:
Creator:
Edward Sheldrake
Created:
2012-04-24 12:12:03 UTC
Size:
5.29 KB
patch
obsolete
>From f64f6b17bc6acce969f1b93ad98d5b17e6c39c3c Mon Sep 17 00:00:00 2001 >From: Edward Sheldrake <ejsheldrake@gmail.com> >Date: Tue, 24 Apr 2012 13:01:34 +0100 >Subject: [PATCH] fallback greeter: shutdown computer via gnome-session > >The restart and shutdown menu items in the fallback greeter do not work >without ConsoleKit, so instead use gnome-session dbus interface to shutdown. >The gnome-session dbus interface does not offer separate restart and shutdown >methods, so there will be no separate restart item in the menu. >--- > gui/simple-greeter/gdm-greeter-panel.c | 70 ++++---------------------------- > 1 file changed, 9 insertions(+), 61 deletions(-) > >diff --git a/gui/simple-greeter/gdm-greeter-panel.c b/gui/simple-greeter/gdm-greeter-panel.c >index 552e6fa..76b0549 100644 >--- a/gui/simple-greeter/gdm-greeter-panel.c >+++ b/gui/simple-greeter/gdm-greeter-panel.c >@@ -52,9 +52,9 @@ > #include "gdm-profile.h" > #include "gdm-common.h" > >-#define CK_NAME "org.freedesktop.ConsoleKit" >-#define CK_MANAGER_PATH "/org/freedesktop/ConsoleKit/Manager" >-#define CK_MANAGER_INTERFACE "org.freedesktop.ConsoleKit.Manager" >+#define SM_NAME "org.gnome.SessionManager" >+#define SM_PATH "/org/gnome/SessionManager" >+#define SM_INTERFACE "org.gnome.SessionManager" > > #define GPM_DBUS_NAME "org.gnome.SettingsDaemon" > #define GPM_DBUS_PATH "/org/gnome/SettingsDaemon/Power" >@@ -631,35 +631,11 @@ try_system_stop (DBusGConnection *connection, > g_debug ("GdmGreeterPanel: trying to stop system"); > > proxy = dbus_g_proxy_new_for_name (connection, >- CK_NAME, >- CK_MANAGER_PATH, >- CK_MANAGER_INTERFACE); >+ SM_NAME, >+ SM_PATH, >+ SM_INTERFACE); > res = dbus_g_proxy_call_with_timeout (proxy, >- "Stop", >- INT_MAX, >- error, >- /* parameters: */ >- G_TYPE_INVALID, >- /* return values: */ >- G_TYPE_INVALID); >- return res; >-} >- >-static gboolean >-try_system_restart (DBusGConnection *connection, >- GError **error) >-{ >- DBusGProxy *proxy; >- gboolean res; >- >- g_debug ("GdmGreeterPanel: trying to restart system"); >- >- proxy = dbus_g_proxy_new_for_name (connection, >- CK_NAME, >- CK_MANAGER_PATH, >- CK_MANAGER_INTERFACE); >- res = dbus_g_proxy_call_with_timeout (proxy, >- "Restart", >+ "Shutdown", > INT_MAX, > error, > /* parameters: */ >@@ -707,30 +683,6 @@ do_system_suspend (void) > } > > static void >-do_system_restart (void) >-{ >- gboolean res; >- GError *error; >- DBusGConnection *connection; >- >- error = NULL; >- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); >- if (connection == NULL) { >- g_warning ("Unable to get system bus connection: %s", error->message); >- g_error_free (error); >- return; >- } >- >- res = try_system_restart (connection, &error); >- if (!res) { >- g_debug ("GdmGreeterPanel: unable to restart system: %s: %s", >- dbus_g_error_get_name (error), >- error->message); >- g_error_free (error); >- } >-} >- >-static void > do_system_stop (void) > { > gboolean res; >@@ -738,9 +690,9 @@ do_system_stop (void) > DBusGConnection *connection; > > error = NULL; >- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); >+ connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); > if (connection == NULL) { >- g_warning ("Unable to get system bus connection: %s", error->message); >+ g_warning ("Unable to get session bus connection: %s", error->message); > g_error_free (error); > return; > } >@@ -905,10 +857,6 @@ add_shutdown_menu (GdmGreeterPanel *panel) > gtk_menu_shell_append (GTK_MENU_SHELL (panel->priv->shutdown_menu), menu_item); > } > >- menu_item = gtk_menu_item_new_with_label (_("Restart")); >- g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (do_system_restart), NULL); >- gtk_menu_shell_append (GTK_MENU_SHELL (panel->priv->shutdown_menu), menu_item); >- > menu_item = gtk_menu_item_new_with_label (_("Shut Down")); > g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (do_system_stop), NULL); > gtk_menu_shell_append (GTK_MENU_SHELL (panel->priv->shutdown_menu), menu_item); >-- >1.7.10 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 815671
: 579835