If wicd's dbus configuration file is set up to allow only users that belong to a specific group to actually use wicd, then the client should have some way of telling users that they can't use it. To be clear, what happens currently is this:
On login, even though the tray icon is set to run on startup, it does not, and there's absolutely no kind of notification about *why* it didn't start. Click the wicd icon in the desktop menu, and absolutely nothing happens. Nothing.
If I start the client from a terminal, here's the traceback:
$ wicd-client
Loading...
Connecting to daemon...
Connected.
warning: ignoring exception org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.103" (uid=1002 pid=10237 comm="python -O /usr/lib/wicd/wicd-client.py ") interface="org.wicd.daemon" member="GetConnectionStatus" error name="(unset)" requested_reply=0 destination=":1.7" (uid=0 pid=25543 comm="python -O /usr/lib/wicd/wicd-daemon.py "))
Traceback (most recent call last):
File "/usr/lib/wicd/wicd-client.py", line 780, in <module>
main(sys.argv)
File "/usr/lib/wicd/wicd-client.py", line 757, in main
if DBUS_AVAIL and daemon.GetNeedWiredProfileChooser():
File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 622, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.103" (uid=1002 pid=10237 comm="python -O /usr/lib/wicd/wicd-client.py ") interface="org.wicd.daemon" member="GetNeedWiredProfileChooser" error name="(unset)" requested_reply=0 destination=":1.7" (uid=0 pid=25543 comm="python -O /usr/lib/wicd/wicd-daemon.py "))
If I start the curses client, here's what happens:
$ wicd-curses
Traceback (most recent call last):
File "/usr/lib/wicd/wicd-curses.py", line 954, in <module>
parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REVNO,daemon.Hello()))
File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 622, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.99" (uid=1002 pid=10104 comm="python -O /usr/lib/wicd/wicd-curses.py ") interface="org.wicd.daemon" member="Hello" error name="(unset)" requested_reply=0 destination=":1.7" (uid=0 pid=25543 comm="python -O /usr/lib/wicd/wicd-daemon.py "))
I don't know what the best way to handle this is, so discussion is welcome - I just think that we should do *something* besides nothing. :-)
In the curses client, that is literally the first thing called after DBus is initialized. So, I could wrap that in a try/except block and print out an error message if that the user were not "allowed" to use wicd.