Re: Modify LAN Settings



On Fri, 2010-03-05 at 12:14 +0000, Marc Herbert wrote:
> Prakash Krishnaswamy a écrit :
> > Looks like libnm-glib can be used. When I go through the header files I 
> > find only functions to get configurations.
> > Can some one tell me whether libnm-glib can be used to modify settings 
> > (like IP address) of eth0, wlan0, etc.
> > If so any pointer to some examples would be helpful.
> 
> Did you read this page?
>   http://live.gnome.org/NetworkManager/SystemSettings
> 
> Keep in mind that NetworkManager is sponsored by RedHat/Fedora.

Not that that has much to do with anything.  There's many other
contributors from various sources, including companies and individuals.

To answer the original question...

You can use libnm-glib, or you can use D-Bus directly.  The wiki pages
above have information on the D-Bus API which is very easily used from
Python or other languages with D-Bus bindings:

http://projects.gnome.org/NetworkManager/developers/spec-08.html

Basically, you can send new configuration data to the system settings
service, which will save your modifications to disk-backed
configuration.  Let us know if you more specific questions about how to
do this.

Dan




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