Comment 7 for bug 138776

Revision history for this message
Martin Pitt (pitti) wrote :

What we actually want, is telling in s-c-p's .desktop file: "If the user is in lpadmin, run s-c-p as normal user, otherwise run it through gksu". This is not possible to do in the .desktop file itself, but this condition can be checked in s-c-p code: either in the binary itself (if it does not have sufficient permissions, it could exec itself through gksu), or the .desktop file calls a wrapper shell script instead, which checks for group membership and then execs the real s-c-p through gksudo IFF the user is not in lpadmin.

The latter is preferable, since s-c-p shuold not hardcode gksu (you can certainly use it from KDE, too). So the wrapper script should detect what's available (based on running session, then gksu/kdesudo availability).