Re: org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.



On Wed, 2009-02-04 at 11:16 +0800, 代尔欣 wrote:
> Hi Dan, thanks your kindly reply.  Still have several questions bother
> you.
> 
> 1.  For WARNING **: Icon nm-device-wwan missing: Icon 'nm-device-wwan'
> not present in theme
> -- I use ./configure --prefix=/usr --localstatedir=/var
> --sysconfdir=/etc to configure both      NetworkManager and nm-applet.
> I think it is the correct config options.
> -- Before I receive your reply, I found
> the /usr/share/icons/hicolor/index.theme have line:
> Hidden=true
> After I comment this line, the nm-applet can find those icons
> correctly.
> -- After I receive your reply, I try your recommend:
>     a. Do not comment "Hidden=true"
> in /usr/share/icons/hicolor/index.theme
>     b. run "gtk-update-icon-cache -f /usr/share/icons/hicolor"
> Also can resolve this problem.  Hmm, Just ask a question nothing to do
> with NetworkManager.  if have answer, save me googling^_^.  I am not
> familiar with gtk icon theme. what is the purpose of "Hidden=true"?

I'm not sure; I haven't heard of that tag before.  It may be the
mechanism that appearance control panels use to turn themes on and off.
Ideally the applet should be using it's own theme directory or something

> 2. For WARNING **: Could not retrieve dbus connections: The name
> org.freedesktop.
> NetworkManagerSystemSettings was not provided by any .service files.
> -- After add the /etc/NetworkManager/nm-system-settings.conf. The
> warning gone. And I find below line from the syslog. The nm-applet
> also have a "Auto eth0" item now.

The "auto eth0" connection is added because the platform has an ethernet
device, but there are no connections available to handle it.  In the
spirit of "Just Works", the system settings service creates an automatic
DHCP connection for that device so that when you plug it in, you get a
connection.  That automatic connection will go away when a real system
connection for ethernet devices is created.

> localhost nm-system-settings: Loaded plugin keyfile ....
> localhost nm-system-settings: Adding default connection 'Auto eth0'
> for /org/freedesktop/Hal/devices/net_00_1e_c9_5b_a2_9e
> 
> -- But I still have a related question. From syslog, I find below
> line:
> 
> 
> localhost NetworkManager: <info>  Trying to start the supplicant... 
> localhost NetworkManager: <info>  Trying to start the system settings
> daemon... 
> 
> That info saying NetworkManager can't start the wpa_supplicant and
> nm-system-settings through dbus. right? 
> 
> I have to start them manually with:
> wpa_supplicant -B -u &
> nm-system-settings
> --config /etc/NetworkManager/nm-system-settings.conf &

That seems wrong; dbus activation is a bit hard to debug, mainly because
the helpers that actually spawn the activated services don't have
anywhere to dump logging information.  A few standard checks though...
what does the following command say when you run it *before* the
supplicant is manually started?

sudo dbus-send --print-reply --system --dest=fi.epitest.hostap.WPASupplicant /fi/epitest/hostap/WPASupplicant fi.epitest.hostap.WPASupplicant.getInterface string:eth2

(of course, replace "eth2" with your wifi device)

> I can add autostart script for them. But I want to know how to make
> NetworkManager start them automatically?

We need to debug the DBus system activation mechanism a bit.  It's
somewhat unforgiving about permissions, because wrong permissions can be
a security issue.

> 3. Regarding the polkit_context_can_caller_do_action(deprecated) and
> polkit_context_is_caller_authorized
> 
> If run:
> pkg-config --modversion polkit 
> 0.9

How about "pkg-config --modversion polkit-gnome" ?

You may need to install the PolicyKit-gnome-dev package, which should
have the right bits in it.  The "polkit-helpers/" directory is actually
just backported stuff from polkit-gnome to work with PolicyKit 0.6, but
PolicyKit 0.7 and later have polkit-gnome already.

dan

> The compile error I got:
>  gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/PolicyKit
> -DPOLKIT_VERSION_MAJOR=0 -DPOLKIT_VERSION_MINOR=9
> -DPOLKIT_VERSION_MICRO=0 -I/usr/include/PolicyKit
> -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DORBIT2=1
> -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/NetworkManager -I/usr/include/libnm-glib
> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
> -I/usr/include/libglade-2.0 -I/usr/include/libxml2
> -I/usr/include/gconf/2 -I/usr/include/orbit-2.0
> -I/usr/include/gnome-keyring-1 -Wall -Werror -std=gnu89 -g -O2
> -Wshadow -Wmissing-declarations -Wmissing-prototypes
> -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter
> -Wno-sign-compare -MT libpolkit_helpers_la-polkit-gnome-action.lo -MD
> -MP -MF .deps/libpolkit_helpers_la-polkit-gnome-action.Tpo -c
> polkit-gnome-action.c  -fPIC -DPIC
> -o .libs/libpolkit_helpers_la-polkit-gnome-action.o
> cc1: warnings being treated as errors
> polkit-gnome-action.c: In function '_compute_polkit_result_direct':
> polkit-gnome-action.c:817: warning:
> 'polkit_context_can_caller_do_action' is deprecated (declared
> at /usr/include/PolicyKit/polkit/polkit-context.h:175)
> polkit-gnome-action.c:831: warning:
> 'polkit_context_can_caller_do_action' is deprecated (declared
> at /usr/include/PolicyKit/polkit/polkit-context.h:175)
> make[3]: *** [libpolkit_helpers_la-polkit-gnome-action.lo]
> 
> 
> 2009/2/4 Dan Williams <dcbw redhat com>
>         On Mon, 2009-02-02 at 17:59 +0800, 代尔欣 wrote:
>         > Hi all,
>         >     I port the NetworkManager(revision 3202) and
>         applet(revision 425)
>         > to our embedded device. So far it works fine. From the
>         >
>         ftp://ftp.gnome.org/Public/GNOME/sources/NetworkManager/0.7
>         >     I saw the official 0.7 is already released. So I am
>         trying to
>         > upgrade our version. I have several questions. Thank help in
>         advance.
>         >
>         > 1. I download the applet from
>         >
>         ftp://ftp.gnome.org/Public/GNOME/sources/network-manager-applet/0.7.
>         > Is it the correct version work wit h NetworkManager 0.7.0?
>         >
>         > 2. After upgrade some packages(dbus1.1.1 dbus-glib0.7.6
>         etc.). I can
>         > compile and install the NetworkManager and nm-applet. When I
>         run the
>         > nm-applet, I get below warning:
>         >
>         > ** (nm-applet:3735): WARNING **: Icon nm-device-wwan
>         missing: Icon
>         > 'nm-device-wwan' not present in theme
>         > --It seems the applet search the gnome icon theme but not
>         the icons
>         > nm-applet installed.
>         
>         
>         What --prefix did you use when you installed it?  Check to be
>         sure they
>         are in /usr/share/icons/hicolor.  You'll also want to make
>         sure the GTK
>         icon cache is updated by doing:
>         
>         gtk-update-icon-cache -f /usr/share/icons/hicolor
>         
>         > ** (nm-applet:3735): WARNING **: Could not retrieve dbus
>         connections:
>         > The name org.freedesktop.NetworkManagerSystemSettings was
>         not provided
>         > by any .service files.
>         > --I checked. It
>         >
>         seems /usr/share/dbus-1/system-services/org.freedesktop.NetworkManagerSystemSettings.service already installed. why?
>         
>         
>         It may be that dbus system activation is not working correctly
>         on your
>         system.  Or, see below, you probably don't have the necessary
>         config
>         file for nm-system-settings.
>         
>         > ** (nm-applet:3114): WARNING **: couldn't communicate with
>         gnome
>         > keyring daemon via dbus: The name org.gnome.keyring was not
>         provided
>         > by any .service files
>         > --The gnome-keyring-daemon already run.
>         
>         
>         Yeah, looks like D-Bus isn't set up correctly on your system.
>         
>         > 3. Related question2 the first warning, nm-connection-editor
>         can't be
>         > run. Below warnings:
>         > ** (nm-connection-editor:3858): WARNING **: Icon
>         nm-device-wwan
>         > missing: Icon 'nm-device-wwan' not present in theme
>         
>         
>         Same thing; the connection editor uses the icons from the
>         applet too.
>         Fixing the icon cache thing will fix this too.
>         
>         > ** (nm-connection-editor:3858): WARNING **: Failed to
>         initialize the
>         > UI, exiting...
>         >
>         > 4. Related question2 the second warning, I run
>         > /usr/sbin/nm-system-settings
>         > --config /etc/NetworkManager/nm-system-settings.conf
>         > manually, I got
>         > ** (nm-system-settings:3946): WARNING **: Invalid config
>         file: No such
>         > file or directory.
>         > I checked, no conf file in /etc/NetworkManager/ where can
>         find this
>         > file? What is it for?
>         
>         
>         You may need to create it.  It provides system-level
>         connections to
>         NetworkManager, which can be used before login, and across
>         logins.  For
>         your case, it should probably just contain:
>         
>         [main]
>         plugins=keyfile
>         
>         and then it should work for you.
>         
>         > 5. NetworkManager0.7.0 work with PolicyKit. Which policykit
>         version
>         > should I use? PolicyKit0.6? Now I use PolicyKit0.9, but need
>         replace
>         > the function
>         > polkit_context_can_caller_do_action(deprecated) with
>         > polkit_context_is_caller_authorized
>         
>         
>         Hmm, that should already be working correctly for you, since
>         those calls
>         are already protected by checks for PolicyKit version.  Do you
>         have the
>         correct PolicyKit development headers
>         (including /usr/lib/pkgconfig/polkit.pc) installed?  What
>         version do you
>         get when you run:
>         
>         pkg-config --modversion polkit
>         
>         
>         Dan
>         
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]