Comment 1 for bug 1703118

Revision history for this message
carlos (altoid) wrote :

Hello:

I think I have found a simple solution to this issue which can be instrumented without any coding.

In my case, this problem arose because my distro (PCLinuxOS) does not have gksudo.
Or sudo for that matter.

I found a lead to the problem here:
https://bugs.debian.org/cgi-bin/bugr...cgi?bug=575403

Someone had a similar issue with the graphical sudo program needed for Wicd.

In the absence of any one of the three graphical sudo programs Wicd has as options (gksudo, gksu or ktsuss), the misc.py script does this:

[code]
549 def choose_sudo_prog(prog_num=0):
550 """ Try to intelligently decide which graphical sudo program to use. """
551 if prog_num:
552 return find_path(_sudo_dict[prog_num])
553 desktop_env = detect_desktop_environment()
554 env_path = os.environ['PATH'].split(":")
555 paths = []
556
557 if desktop_env == "kde":
558 progs = ["kdesu", "kdesudo", "ktsuss"]
559 else:
560 progs = ["gksudo", "gksu", "ktsuss"]
561
562 for prog in progs:
563 paths.extend([os.path.join(p, prog) for p in env_path])
564
565 for path in paths:
566 if os.path.exists(path):
567 return path
568 return ""

[/code]

In PCLinuxOS, gksudo exists but only as a link to the gksu executable, which is why running ...

[code]
gksudo /usr/share/wicd/gtk/configscript.py '4' 'wireless'
[/code]

... fails but ...

[code]
gksu /usr/share/wicd/gtk/configscript.py '4' 'wireless'
[/code]

... works as expected.

The script does find gksudo but it is not an executable so it fails. (?)

So the solution found by the author of the post above is to change the order of the graphical sudo programs the misc.py script will use when none is found.

ie:
---
560 progs = ["gksudo", "gksu", "ktsuss"] <- change to progs = ["gksu", "gksudo", "ktsuss"]
---

This would make the absence of gksudo (more and more common) a non-issue and carry it through until Wicd uses PolKit to authenticate UIs to the daemon.

Comments and corrections welcome.

Thanks in advance.

C.