[gnome-commander/GSettings] Adds gksudo to the list of programs for starting gcmd in root mode



commit fef432b6c605322cca62e5de6b766a71ea67d09c
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Aug 7 22:43:41 2016 +0200

    Adds gksudo to the list of programs for starting gcmd in root mode

 src/gnome-cmd-user-actions.cc |    4 ++--
 src/utils.cc                  |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 64d307b..8d5c204 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1259,7 +1259,7 @@ void command_open_terminal_as_root (GtkMenuItem *menuitem, gpointer not_used)
         g_free (dpath);
     }
     else
-        gnome_cmd_show_message (NULL, _("xdg-su, gksu, gnomesu, kdesu or beesu is not found."));
+        gnome_cmd_show_message (NULL, _("gksudo, xdg-su, gksu, gnomesu, kdesu or beesu is not found."));
 
     g_free (argv);
     g_free (command);
@@ -1281,7 +1281,7 @@ void command_root_mode (GtkMenuItem *menuitem, gpointer not_used)
             gnome_cmd_error_message (_("Unable to start GNOME Commander in root mode."), error);
     }
     else
-        gnome_cmd_show_message (NULL, _("xdg-su, gksu, gnomesu, kdesu or beesu is not found"));
+        gnome_cmd_show_message (NULL, _("gksudo, xdg-su, gksu, gnomesu, kdesu or beesu is not found"));
 
     g_strfreev (argv);
 }
diff --git a/src/utils.cc b/src/utils.cc
index 7f7077d..0bf5881 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1374,8 +1374,10 @@ gboolean gnome_cmd_prepend_su_to_vector (int &argc, char **&argv)
     char *su = NULL;
     gboolean need_c = FALSE;
 
+    if ((su = g_find_program_in_path ("gksudo")))
+       goto without_c_param;
     if ((su = g_find_program_in_path ("xdg-su")))
-       goto with_c_param;
+       goto without_c_param;
     if ((su = g_find_program_in_path ("gksu")))
        goto without_c_param;
     if ((su = g_find_program_in_path ("gnomesu")))


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