Re: Automatic proxy configuration in dispatcher.d

2011-09-21 Thread José Moyano
I don't need superuser rights. Network Manager's dispatcher.d runs as superuser, and I need to execute commands as a particular user to set its proxy configuration in gconf. As root, it is not possible to change user's gconf, because it cannot connect to the user's gconfd. 2011/9/21 José Queiroz :

Re: Automatic proxy configuration in dispatcher.d

2011-09-21 Thread José Queiroz
I don't think so. Consider if super-user rights is really needed inside the script, if so, use SUID-root. It's lame, but works. 2011/9/21 José Moyano > Hi José Queiroz (tocayo ;) > > Do you think that su $user -c will work instead of sudo? > > 2011/9/21 José Queiroz : > > Hello Jose Moyano, > >

Re: Automatic proxy configuration in dispatcher.d

2011-09-21 Thread José Moyano
Hi José Queiroz (tocayo ;) Do you think that su $user -c will work instead of sudo? 2011/9/21 José Queiroz : > Hello Jose Moyano, > > "sudo" only works if run from a valid terminal. This may be the problem with > your script. > > 2011/9/21 José Moyano >> >> Hi everybody, >> >> I write the follow

Re: Automatic proxy configuration in dispatcher.d

2011-09-21 Thread José Queiroz
Hello Jose Moyano, "sudo" only works if run from a valid terminal. This may be the problem with your script. 2011/9/21 José Moyano > Hi everybody, > > I write the following script to make network manager dispatcher to > change the proxy automagically based on site IP. > > #!/bin/sh > > IF=$1 >

Automatic proxy configuration in dispatcher.d

2011-09-21 Thread José Moyano
Hi everybody, I write the following script to make network manager dispatcher to change the proxy automagically based on site IP. #!/bin/sh IF=$1 STATUS=$2 echo "-" >> \ /var/log/autoproxy.log date >> /var/log/autoproxy.log e