Index: gnome-commander-1.2.8.7/src/gnome-cmd-user-actions.cc
===================================================================
--- gnome-commander-1.2.8.7.orig/src/gnome-cmd-user-actions.cc
+++ gnome-commander-1.2.8.7/src/gnome-cmd-user-actions.cc
@@ -1107,24 +1107,45 @@ void command_open_nautilus_in_cwd (GtkMe
 void command_root_mode (GtkMenuItem *menuitem, gpointer not_used)
 {
     char *su;
+    gboolean need_c = TRUE;
 
-    su = g_find_program_in_path ("gksu");
+    su = g_find_program_in_path ("xdg-su");
+    if  (!su)
+    {
+        su = g_find_program_in_path ("gksu");
+        if (su)
+            need_c = FALSE;
+    }
+
+    if  (!su)
+        su = g_find_program_in_path ("gnomesu");
     if  (!su)
         su = g_find_program_in_path ("kdesu");
     if  (!su)
+    {
         su = g_find_program_in_path ("beesu");
+        if (su)
+            need_c = FALSE;
+    }
 
     if  (!su)
     {
-        gnome_cmd_show_message (NULL, _("gksu, kdesu or beesu is not found."));
+        gnome_cmd_show_message (NULL, _("xdg-su, gksu, gnomesu, kdesu or beesu is not found."));
         return ;
     }
 
-    char *argv[3];
-
-    argv[0] = su;
-    argv[1] = g_get_prgname ();
-    argv[2] = NULL;
+    int argc = 2;
+    if (need_c)
+        argc++;
+
+    char *argv[argc + 1];
+    int i = 0;
+
+    argv[i++] = su;
+    argv[i++] = g_get_prgname ();
+    if (need_c)
+        argv[i++] = "-c";
+    argv[i++] = NULL;
 
     GError *error = NULL;
 
