detect_os: Add option to retrieve su command.
authorJulien Lavergne <julien.lavergne@gmail.com>
Sun, 20 Jun 2010 13:21:25 +0000 (15:21 +0200)
committerJulien Lavergne <julien.lavergne@gmail.com>
Sun, 20 Jun 2010 13:21:25 +0000 (15:21 +0200)
src/common/detect_os.py

index 5dbb152..aa320bb 100644 (file)
@@ -33,15 +33,21 @@ if os_detection[0] == 'Ubuntu':
     if session == 'Lubuntu':
         config_lxdm = '/etc/xdg/lubuntu/lxdm/lxdm.conf'
         config_openbox_local = os.path.expanduser("~/.config/openbox/lubuntu-rc.xml")
+        command_su = "gksu"
     else:
         config_lxdm = '/etc/xdg/lxdm/default.conf'
         config_openbox_local = os.path.expanduser("~/.config/openbox/lxde-rc.xml")
+        command_su = "gksu"
 else:
     config_lxdm = '/etc/lxdm/lxdm.conf'
     config_openbox_local = os.path.expanduser("~/.config/openbox/lxde-rc.xml")
+    command_su = "su-to-root -X -c"
 
 def get_lxdm_config():
     return config_lxdm
 
 def get_openbox_config():
     return config_openbox_local
+
+def get_command_su():
+    return command_su