Re: Auto-connect OFF option.
- From: Dan Williams <dcbw redhat com>
- To: Noes1s <blaksark gmail com>
- Cc: networkmanager-list gnome org
- Subject: Re: Auto-connect OFF option.
- Date: Wed, 04 May 2011 14:48:03 -0500
On Mon, 2011-05-02 at 20:44 +0200, Noes1s wrote:
> Im using this script to disable the autoconnect function on all my
> stored networks:
>
> ### Disables auto-connect on all saved networks
> netlist=$(ls .gconf/system/networking/connections/ | grep -v %)
> for l in ${netlist[*]}; { gconftool-2 --type bool
> --set /system/networking/connections/$l/connection/autoconnect
> false ;}
>
> 1) Can you add a button with this option?
Probably not; I'm not sure the functionality would be widely used enough
to justify one. That doesn't mean your needs are not valid, just that
this is the first time I've heard of anyone requesting this, leading me
to conclude that it's not a widely requested behavior at this time.
> 2) How can i detect the latest network added to disable the
> autoconnect on it instead of do it on all of them? (This is
> implemented on the program but dont know what code is used)
NM emits D-Bus signals when new connections are added to system
settings, and (for 0.8 and earlier) the "user settings service" also
does this. You are probably interested in listening to the user
settings service on D-Bus for the NewConnection signal.
> 3) How can i make this run everytime i connect to a network? (Tried
> using a new script on /etc/NetworkManager/dispatcher.d without luck)
Dispatcher scripts run in root context, while the connections you're
probably interested in are stored in the users session. Thus the
dispatcher scripts simply cannot access that user information. The best
bet is probably to run a small program in the user's session that
listens for new network connections, and then runs your script whenever
a new one shows up.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]