<div dir="ltr"><div><div>Hi Gonzalo,<br><br></div>No, I am not using NetworkManager API for the proxy configuration. I am settings the proxy settings to "org.gnome.sugar.proxy" schemas and then exporting them to environment variables ($http_proxy).<br><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 2:07 AM, Gonzalo Odiard <span dir="ltr"><<a href="mailto:godiard@gmail.com" target="_blank">godiard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you using NetworkManager API to configure the proxy?</div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 5:27 PM, Manash Raja <span dir="ltr"><<a href="mailto:mpdmanash@gmail.com" target="_blank">mpdmanash@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear James,<br><br></div><div>Regarding moving to src/jarabe/main.py , as far as I know, there isn't a direct way for python to set the required environment variables (http_proxy) and make it accessible to all other processes. The various method in python for editing the environment variables, keeps the changes limited to only that process or its child processes. Hence if the implementation is done through main.py, other files to run bash scripts have to be introduced. So, to me it seems exporting proxy settings to the environment variables at /usr/bin/sugar is a fine implementation. Though we can use variables to reduce gsettings calls in that file.<br><br></div><div>I would definitely look at the branch based development from next time.<br><br></div><div>Tell me if I shall reduce gsettings call in /usr/bin/sugar file and continue with the present implementation or look for any other implementation that you suggest. Once the feature is final for merge, I will collapse/rebase the commits with new commit message and update the PR.<br><br></div><div>Thanks.<br><br></div><div>Regards.<br></div><div>Manash Pratim Das (ManashRaja) <br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 10:39 AM, James Cameron <span dir="ltr"><<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, that's interesting.<br>
<br>
Your /usr/bin/sugar (aka bin/<a href="http://sugar.in" rel="noreferrer" target="_blank">sugar.in</a>) will run gsettings many times,<br>
and this is inefficient, causing unnecessary delay during startup.<br>
Perhaps if you move this into src/jarabe/main.py which already uses<br>
Gio.Settings?<br>
<br>
You have worked on your master branch and the pull request is<br>
associated with that branch. That's unusual. It is more common to<br>
use a new branch with a name that explains the feature. Make a note<br>
of that for next time.<br>
<br>
Your pull request has three commits; 09d363f, 682d0b2, 4fe1a2f.<br>
Before merging, we will ask for these and later commits to be<br>
collapsed, rebased, or re-written. You may also combine and rewrite<br>
the commit messages. Then a push with --force will update the pull<br>
request.<br>
<br>
The <a href="http://wiki.sugarlabs.org/go/Features/Proxy_Settings" rel="noreferrer" target="_blank">http://wiki.sugarlabs.org/go/Features/Proxy_Settings</a> page is on a<br>
Wiki, and any change can be rolled back.<br>
<span><br>
On Tue, Mar 15, 2016 at 09:58:31AM +0530, Manash Raja wrote:<br>
> Hi,<br>
><br>
> I thank you all for the guidance.<br>
><br>
> I modified my PR as per your suggestions and now the implementation of the<br>
> proxy feature is far better.<br>
> @Sam, as you suggested, I have now completely removed the need of re-writing<br>
> "proxy.sh" every time the settings changes and am using<br>
> "org.gnome.system.proxy" schemas. Now "/usr/bin/sugar" is hard-coded to read<br>
> the proxy settings from "org.gnome.system.proxy" and export it to the<br>
> environment variables required for the proxy settings to be available easily.<br>
><br>
> @Gonzalo, thanks for the link to that important patch from Manuel Quiñones. And<br>
> @James, I have changed my "view.py" and "model.py" files to go with Manuel<br>
> Quiñones' way of setting the "org.gnome.system.proxy" schemas via GSettings.<br>
> This has hence removed the dependence on polkit for file write permissions and<br>
> made us do away with extra files like "set_proxy.py" for running root permitted<br>
> scripts.<br>
><br>
> Also I have removed the "logout.sh" script as now I am using the pre-made<br>
> "require-restart" feature present in "sectionview" which asks the user for<br>
> restart.<br>
><br>
> Also @James, shall I now therefore submit the GUI changes and the changes you<br>
</span>> proposed to for this update in the features page? [1]<a href="http://wiki.sugarlabs.org/go/" rel="noreferrer" target="_blank">wiki.sugarlabs.org/go/</a><br>
> Features/Proxy_Settings<br>
><br>
> Here is the patch I submitted: [2]<a href="https://github.com/ManashRaja/sugar/commit/" rel="noreferrer" target="_blank">https://github.com/ManashRaja/sugar/commit/</a><br>
<span>> 4fe1a2fea7f37d036331c1a1ae736c88cc29d62d<br>
><br>
> Thanks<br>
> Regards<br>
> Manash Pratim Das<br>
><br>
</span><span>> On Mon, Mar 14, 2016 at 8:03 AM, James Cameron <[3]<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a>> wrote:<br>
><br>
> On Sun, Mar 13, 2016 at 11:18:46PM -0300, Gonzalo Odiard wrote:<br>
</span><span>> > On Sun, Mar 13, 2016 at 11:09 PM, Jerry Vonau <[1][4]<a href="mailto:me@jvonau.ca" target="_blank">me@jvonau.ca</a>> wrote:<br>
> ><br>
> > > Yea that has roots to the old ActivityCentral fork, any reason<br>
> > > why this has not been 'upstreamed' from OneEducation(OLPC-AU) to<br>
> > > SugarLabs?<br>
> ><br>
> > Yes. Was not accepted by sugar upstream.<br>
><br>
> Let's have another go then. See what the objections are from the<br>
> current set of developers.<br>
><br>
> > I upstreamed all that was possible, the only changes that were<br>
> > developed just for OLPC-AU were the changes needed to deal with the<br>
> > complex network environments common in Australian schools.<br>
><br>
> This disease is spreading.<br>
><br>
> --<br>
> James Cameron<br>
</span>> [5]<a href="http://quozl.netrek.org/" rel="noreferrer" target="_blank">http://quozl.netrek.org/</a><br>
> _______________________________________________<br>
> Sugar-devel mailing list<br>
> [6]<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
> [7]<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
> References:<br>
><br>
> [1] <a href="http://wiki.sugarlabs.org/go/Features/Proxy_Settings" rel="noreferrer" target="_blank">http://wiki.sugarlabs.org/go/Features/Proxy_Settings</a><br>
> [2] <a href="https://github.com/ManashRaja/sugar/commit/4fe1a2fea7f37d036331c1a1ae736c88cc29d62d" rel="noreferrer" target="_blank">https://github.com/ManashRaja/sugar/commit/4fe1a2fea7f37d036331c1a1ae736c88cc29d62d</a><br>
> [3] mailto:<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a><br>
> [4] mailto:<a href="mailto:me@jvonau.ca" target="_blank">me@jvonau.ca</a><br>
> [5] <a href="http://quozl.netrek.org/" rel="noreferrer" target="_blank">http://quozl.netrek.org/</a><br>
> [6] mailto:<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
> [7] <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<div><div><br>
--<br>
James Cameron<br>
<a href="http://quozl.netrek.org/" rel="noreferrer" target="_blank">http://quozl.netrek.org/</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Gonzalo Odiard<br><br></div>
</font></span></div>
</blockquote></div><br></div>