Trying to start the pyNetworkManager -plugin from xfce4-panel. Nothing shows up. When running xfce4-panel from the command line, it outputs: CLIENT: Regenerating networks list... Traceback (most recent call last): File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 28, in ? pyNMxfcePanel() File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 18, in __init__ NM = pyNetworkManager.NM() File "/usr/share/xfce4/pyNetworkManager/pyNetworkManager.py", line 76, in __init__ self.server = pyNMServer.server( self ) File "/usr/share/xfce4/pyNetworkManager/pyNMServer.py", line 55, in __init__ __name = dbus.service.BusName( NMI_DBUS_SERVICE, bus=__bus ) File "//usr/lib/python2.4/site-packages/dbus/service.py", line 107, in __new__ retval = bus.request_name(name, name_flags) dbus.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.7" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in the configuration file ** Message: Network Manager: screen changed: 0 ** Message: No valid plug window. (xfce4-panel:6993): Gtk-CRITICAL **: gtk_socket_get_id: assertion `GTK_WIDGET_ANCHORED (socket)' failed ** (xfce4-panel:6993): CRITICAL **: An item was unexpectedly removed: "Network Manager". Traceback (most recent call last): File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 28, in ? pyNMxfcePanel() File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 17, in __init__ xfce4.panel.Plugin.__init__(self) RuntimeError: could not create xfce4.panel.ExternalPanelPlugin object Have tried this on two computers, other running amd64 and the other runnin x86 Reproducible: Always Steps to Reproduce: 1.emerge pynetworkmanager 2.restart dbus and networkmanager 3.try to add plugin to xfce4-panel Actual Results: Nothing shows up. Expected Results: Should get the plugin visible. gandalf jarda # emerge --info Portage 2.1.2.7 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.20-suspend2-r6 i686) ================================================================= System uname: 2.6.20-suspend2-r6 i686 Intel(R) Pentium(R) M processor 1.73GHz Gentoo Base System release 1.12.9 Timestamp of tree: Wed, 27 Jun 2007 18:20:01 +0000 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.public.fix.fi/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LINGUAS="fi en_US" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.fi.gentoo.org/gentoo-portage" USE="X acl acpi alsa berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam ffmpeg firefox fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kdeenablefinal kdehiddenvisibility kerberos lcms ldap libg++ mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session spell spl ssl startup-notification svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xml xorg xscreensaver xv zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fi en_US" USERLAND="GNU" VIDEO_CARDS="radeon fglrx" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Did you restart dbus after installing this?
As I said in the "Steps to Reproduce" I did restart dbus.
Additional info: I got the plugin to show up, when i modified the /etc/dbus-1/system.d/NetworkManager.conf and added line into group="plugdev" portion: <allow own="org.freedesktop.NetworkManagerInfo"/> Maybe this isn't really a pynetworkmanager problem? Allthough I'm now getting "IOError: [Errno 13] Permission denied: '/usr/share/xfce4/pyNetworkManager/pyNMNets.stored'" And that sure is related to pynetworkmanager. And the digging contiunues...
Sorry for spamming. Finally I got tto access a non-encrypted wlan. I had to command: touch /usr/share/xfce4/pyNetworkManager/pyNMNets.stored chmod o+w /usr/share/xfce4/pyNetworkManager/pyNMNets.stored Then it started to work. When trying to connect a wpa-protected network it doesn't work. In /var/log/messages it appears: Jun 29 03:31:19 gandalf NetworkManager: <info> Device eth1 activation scheduled... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) started... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) Stage 1 of 5 (Device Prepare) scheduled... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) Stage 1 of 5 (Device Prepare) started... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) Stage 2 of 5 (Device Configure) scheduled... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) Stage 1 of 5 (Device Prepare) complete. Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) Stage 2 of 5 (Device Configure) starting... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1/wireless): access point 'ihq-verkko' is encrypted, but NO valid key exists. New key needed. Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) New wireless user key requested for network 'ihq-verkko'. Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) Stage 2 of 5 (Device Configure) complete. Jun 29 03:31:20 gandalf NetworkManager: <WARN> nm_dbus_get_user_key_for_network_cb(): nm_dbus_get_user_key_for_network_cb(): dbus returned an error. (org.freedesktop.DBus.Python.dbus.exceptions.UnknownMethodException) Traceback (most recent call last): File "//usr/lib/python2.4/site-packages/dbus/service.py", line 429, in _message_cb (candidate_method, parent_method) = _method_lookup(self, method_name, interface_name) File "//usr/lib/python2.4/site-packages/dbus/service.py", line 222, in _method_lookup raise UnknownMethodException('%s is not a valid method of interface %s' % (method_name, dbus_interface)) UnknownMethodException: Unknown method: getKeyForNetwork is not a valid method of interface org.freedesktop.NetworkManagerInfo Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) failure scheduled... Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) failed for access point (ihq-verkko) Jun 29 03:31:20 gandalf NetworkManager: <info> Activation (eth1) failed. Jun 29 03:31:20 gandalf NetworkManager: <info> Deactivating device eth1. Maybe this is just a feature lack? I didn't get much info from the pynetworkmanager home site.
Unfortunately I have no hardware to even start working on it. I made the ebuild and nichoj tested it for me. However he is using Gnome and configured his networkmanager using Gnome tools far as I understood and then adding it to panel worked for him. We need modifications to ebuild or configuration howto/guide for this at our site.. So anyone able to get it working, please report here how and what you did to get it working _without_ gnome tools and we'll make the changes necessary. Upstream also doesn't want to mention his contact info in his homepage.
Sorry with contact information. I've missed it. The homepage is updated. I hope I can fix some of the basic but the dbus.DBusException: org.freedesktop.DBus.Error.AccessDenied error I don't have a clue about. Could be with signing messages or something. Sorry once again, All feedback (except larger penis or stock information) is apreciated Martin Forsgren mk0foma at student.chalmers.se
First of all, Martin, Thanks for your efforts to bring networkmanager interface to Xfce environment. So far I've only heard it worked for one developer which had his networkmanager configured from Gnome so for that and this bug it's package.masked for fixing, testing, writing guide etc. Keeping this bug open to work on this.
Oh, And there's a new release. Only fixed some smaller bugs. mosltly configuration file and variable names. ( www.tfd.chalmers.se/~mk0foma/pyNetworkManager )
(In reply to comment #8) > Oh, And there's a new release. Only fixed some smaller bugs. Adding that. There is still a typing error in .desktop file, "Network Mangager".
I don't have wireless and no networkmanager is running, when *trying to add* pynetworkmanager-0.2 to panel I get this, -- cut -- Traceback (most recent call last): File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 32, in <module> pyNMxfcePanel() File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 18, in __init__ NM = pyNetworkManager.NM() File "/usr/share/xfce4/pyNetworkManager/pyNetworkManager.py", line 75, in __init__ self.client = pyNMClient.client( self ) File "/usr/share/xfce4/pyNetworkManager/pyNMClient.py", line 30, in __init__ self.__object = self.__bus.get_object( NM_DBUS_SERVICE, NM_DBUS_PATH ) File "//usr/lib/python2.5/site-packages/dbus/bus.py", line 226, in get_object follow_name_owner_changes=follow_name_owner_changes) File "//usr/lib/python2.5/site-packages/dbus/proxies.py", line 236, in __init__ self._named_service = conn.activate_name_owner(bus_name) File "//usr/lib/python2.5/site-packages/dbus/bus.py", line 165, in activate_name_owner self.start_service_by_name(bus_name) File "//usr/lib/python2.5/site-packages/dbus/bus.py", line 261, in start_service_by_name 'su', (bus_name, flags))) File "//usr/lib/python2.5/site-packages/dbus/connection.py", line 596, in call_blocking message, timeout) dbus.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files ** Message: Network Manager: screen changed: 0 ** Message: No valid plug window. (xfce4-panel:3676): Gtk-CRITICAL **: gtk_socket_get_id: assertion `GTK_WIDGET_ANCHORED (socket)' failed ** (xfce4-panel:3676): CRITICAL **: An item was unexpectedly removed: "Network Manager". Traceback (most recent call last): File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 32, in <module> pyNMxfcePanel() File "/usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py", line 17, in __init__ xfce4.panel.Plugin.__init__(self) RuntimeError: could not create xfce4.panel.ExternalPanelPlugin object -- cut -- I'm not expecting it work but it doesn't seem right it just disappears. Should print a message why, what, when..
Created attachment 123510 [details, diff] pynetworkmanager-0.2-gentoo.patch For record, since upstream CCed here is likely not even using Gentoo: Current patch we apply. Current location of files we install, /usr/share/xfce4/pyNetworkManager/sysNetworkSpeed.py /usr/share/xfce4/pyNetworkManager/icons/quality_3.png /usr/share/xfce4/pyNetworkManager/icons/quality_4.png /usr/share/xfce4/pyNetworkManager/icons/wlan_error.png /usr/share/xfce4/pyNetworkManager/icons/cable.png /usr/share/xfce4/pyNetworkManager/icons/wireless.png /usr/share/xfce4/pyNetworkManager/icons/unknown.png /usr/share/xfce4/pyNetworkManager/icons/working.png /usr/share/xfce4/pyNetworkManager/icons/wlan_new.png /usr/share/xfce4/pyNetworkManager/icons/error.png /usr/share/xfce4/pyNetworkManager/icons/quality_1.png /usr/share/xfce4/pyNetworkManager/icons/quality_2.png /usr/share/xfce4/pyNetworkManager/pyNMNets.py /usr/share/xfce4/pyNetworkManager/pyNMServer.py /usr/share/xfce4/pyNetworkManager/pyNMWin.py /usr/share/xfce4/pyNetworkManager/isconnected.py /usr/share/xfce4/pyNetworkManager/sysNetworkMonitor.py /usr/share/xfce4/pyNetworkManager/pyNMgtk.py /usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py /usr/share/xfce4/pyNetworkManager/pyNMClient.py /usr/share/xfce4/pyNetworkManager/pyNetworkManager.py /usr/share/xfce4/panel-plugins/pyNetworkManager.desktop
And we byte compile .py files into .py[co] but that's irrelevant here, I suppose.
>Samuli Suominen You must have NetworkManager running! the plugin requires it. try running "NetworkManager" as root,
(In reply to comment #13) > >Samuli Suominen > > You must have NetworkManager running! the plugin requires it. > try running "NetworkManager" as root, > Err, sorry about the noise. _I_ got that part, what I meant was it could be a bit more informative for _end users_, print a error dialog 'NetworkManager is not running.' for example. This is just a request, like you said.. you didn't expect anyone else to use it. :-)
Unmasking.. Added some instructions to post installation for users. I'll look into writing Makefile for this if I nobody else gets to it before me..
New release, for now only small changes and some structural changes. And some bug-fixes. http://www.tfd.chalmers.se/~mk0foma/pyNetworkManager/
Created attachment 123796 [details] Makefile for installation. For upstream. Simple Makefile which respects DESTDIR for pyNetworkManager-0.3, which needs.. - X-XFCE-Exec in .desktop file to point at /usr/share/xfce4/pyNetworkManager/pyNMxfcePanel.py - FILES_PATH in pyNetworkManager.py to point at /usr/share/xfce4/pyNetworkManager/'
And another minor thing, typing error in filename of LICENCE, should be LICENSE.
Created attachment 123799 [details, diff] Makefile and required modifications in unified patch format.
Err, typing error from me. Should be 755 instead of 744 for installing .py files. Sorry about that.
Thanks Samuli for the makefile. Just a question: Is it possible to do a makefile that works like "make destdir" copys everything and changes the desktop file and also checks dependencies? Another question maby not suited here. Is there anyone who has this plugin working? and uses it regularly? except for me. It would be great to know. Please send an e-mail.
(In reply to comment #21) > Thanks Samuli for the makefile. > > Just a question: Is it possible to do a makefile that works like > "make destdir" copys everything and changes the desktop file and also checks > dependencies? It's possible, I'll do these modifications. > Another question maby not suited here. Is there anyone who has this plugin > working? and uses it regularly? except for me. > It would be great to know. Please send an e-mail. I know few users (likely not following this bug) on Freenode, IRC. You'll get a lot more when it supports encryption, including few other Gentoo developers.
Created attachment 123804 [details] Makefile New one, works like.. make - Byte compiles .py into .pyc and optimizes them to .pyo make install - Installation make uninstall - Uninstallation But it still needs those paths changed, doing that next..
And typo again, "/usr" shouldn't be quoted. *shrug*
Created attachment 123819 [details, diff] pyNetworkManager.patch I'm not so good with python but we can't actually install .py[co] in /usr/share so using distutils is required to get it right. Would this work, python part of it? (make uninstall is broken in this version)
User contributed my patch fixed, it had syntax error.. http://www.narhinen.net/~jarda/pynetworkmanager/pynetworkmanager-0.3-r1.patch But he is getting: (which might not even be related to it?) jarda@gandalf ~ $ xfce4-panel CLIENT: Regenerating networks list Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/pyNMxfcePanel.py", line 32, in ? pyNMxfcePanel() File "/usr/lib/python2.4/site-packages/pyNMxfcePanel.py", line 18, in __init__ NM = pyNetworkManager.NM() File "/usr/lib/python2.4/site-packages/pyNetworkManager.py", line 82, in __init__ self.client = pyNMClient.client( self ) File "/usr/lib/python2.4/site-packages/pyNMClient.py", line 44, in __init__ self.Update() File "/usr/lib/python2.4/site-packages/pyNMClient.py", line 167, in Update strength = obj.getStrength() ) ) File "/usr/lib/python2.4/site-packages/pyNMNets.py", line 65, in addNetwork oldNetID = self.__findNetID( newNetwork[NI_ESSID],newNetwork[NI_DEVICE_TYPE] ) File "/usr/lib/python2.4/site-packages/pyNMNets.py", line 139, in __findNetID if essid==self[netID][NI_ESSID]: File "/usr/lib/python2.4/site-packages/configobj.py", line 532, in __getitem__ val = dict.__getitem__(self, key) KeyError: 'ESSID' ** Message: Network Manager: screen changed: 0 ** Message: No valid plug window. (xfce4-panel:10087): Gtk-CRITICAL **: gtk_socket_get_id: assertion `GTK_WIDGET_ANCHORED (socket)' failed ** (xfce4-panel:10087): CRITICAL **: An item was unexpectedly removed: "Network Manager". Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/pyNMxfcePanel.py", line 32, in ? pyNMxfcePanel() File "/usr/lib/python2.4/site-packages/pyNMxfcePanel.py", line 17, in __init__ xfce4.panel.Plugin.__init__(self) RuntimeError: could not create xfce4.panel.ExternalPanelPlugin object
Err, here: http://www.narhinen.net/~jarda/pynetworkmanager/pynetworkmanager-0.3-r1.patch
The file with stored networks is sometimes altered between versions (for now). Try remove the old one (~/.config/pyNetworkManager/stored-networks.conf) if there is any problem.
damn, hardcoded path is still present in .desktop which needs to be modified by Makefile.. I was trying to avoid using 'sed' but that seems a bit hard now :)
Created attachment 123916 [details, diff] pynetworkmanager.patch Should be all fixed in this version. Everything working, make, make install, make uninstall using python distutils to figure out python site-packages directory for safe installation.
Created attachment 123918 [details, diff] Really working patch. Shrug.. Forgot '' again.
Version 0.6 is released. Sorry to say it is rewritten so the installation patch doesn't work anymore. The good part. It now supports encryption. Not without problem but the framework is there and it works for atleast wep40bithex (havn't tested other).