a494d840f5
OBS-URL: https://build.opensuse.org/package/show/X11:MATE:Factory/mate-system-monitor?expand=0&rev=20
50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
--- a/src/procman_gksu.cpp
|
|
+++ b/src/procman_gksu.cpp
|
|
@@ -28,18 +28,20 @@ static void load_gksu(void)
|
|
gboolean procman_gksu_create_root_password_dialog(const char *command)
|
|
{
|
|
GError *e = NULL;
|
|
+ gchar *cmd;
|
|
|
|
- /* Returns FALSE or TRUE on success, depends on version ... */
|
|
- gksu_run(command, &e);
|
|
+ cmd = g_strdup_printf("xdg-su -c '%s'", command);
|
|
+ g_spawn_command_line_sync(cmd, NULL, NULL, NULL, &e);
|
|
+ g_free(cmd);
|
|
|
|
if (e) {
|
|
- g_critical("Could not run gksu_run(\"%s\") : %s\n",
|
|
+ g_critical("Could not run xdg-su -c '%s') : %s\n",
|
|
command, e->message);
|
|
g_error_free(e);
|
|
return FALSE;
|
|
}
|
|
|
|
- g_message("gksu_run did fine\n");
|
|
+ g_message("xdg-su did fine\n");
|
|
return TRUE;
|
|
}
|
|
|
|
@@ -48,7 +50,6 @@ gboolean procman_gksu_create_root_passwo
|
|
gboolean
|
|
procman_has_gksu(void)
|
|
{
|
|
- load_gksu();
|
|
- return gksu_run != NULL;
|
|
+ return g_file_test("/usr/bin/gksu", G_FILE_TEST_EXISTS);
|
|
}
|
|
|
|
--- a/src/procman_matesu.cpp
|
|
+++ b/src/procman_matesu.cpp
|
|
@@ -19,8 +19,8 @@ load_matesu(void)
|
|
|
|
init = TRUE;
|
|
|
|
- load_symbols("libmatesu.so.0",
|
|
- "matesu_exec", &matesu_exec,
|
|
+ load_symbols("libgnomesu.so.0",
|
|
+ "gnomesu_exec", &matesu_exec,
|
|
NULL);
|
|
}
|
|
|