http://gambaswiki.org/bugtracker/edit?object=BUG.973&from=L21haW4-
Comment #8 by Mufeed ALI: Correction: Public Sub RunAsRoot(Command As String, Optional SuApp As Integer) Dim sDE As String Command = System.Find("define") Shell "echo $XDG_CURRENT_DESKTOP" To sDE If SuApp = 1 Then Exec ["kdesudo", Command] Else If SuApp = 2 Then Exec ["gksudo", Command] Else If SuApp = 3 Then Exec ["lxde-sudo", Command] Else If InStr(sDE, "KDE", gb.IgnoreCase) Then Exec ["kdesudo", Command] Else If InStr(sDE, "LXQT", gb.IgnoreCase) Then Exec ["lxde-sudo", Command] Else If InStr(sDE, "Unity", gb.IgnoreCase) Or InStr(sDE, "GNOME", gb.IgnoreCase) Or InStr(sDE, "XFCE", gb.IgnoreCase) Or InStr(sDE, "LXDE", gb.IgnoreCase) Or InStr(sDE, "cinnamon", gb.IgnoreCase) Or InStr(sDE, "Mate", gb.IgnoreCase) Or InStr(sDE, "Pantheon", gb.IgnoreCase) Or InStr(sDE, "Budgie-Desktop", gb.IgnoreCase) Then Exec ["gksudo", Command] Endif Endif End ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user