[Sugar-devel] Proxy Settings Feature in the recent versions of sugar

Gonzalo Odiard godiard at gmail.com
Tue Mar 15 16:37:30 EDT 2016


Are you using NetworkManager API to configure the proxy?

On Tue, Mar 15, 2016 at 5:27 PM, Manash Raja <mpdmanash at gmail.com> wrote:

> Dear James,
>
> 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.
>
> I would definitely look at the branch based development from next time.
>
> 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.
>
> Thanks.
>
> Regards.
> Manash Pratim Das (ManashRaja)
>
> On Tue, Mar 15, 2016 at 10:39 AM, James Cameron <quozl at laptop.org> wrote:
>
>> Thanks, that's interesting.
>>
>> Your /usr/bin/sugar (aka bin/sugar.in) will run gsettings many times,
>> and this is inefficient, causing unnecessary delay during startup.
>> Perhaps if you move this into src/jarabe/main.py which already uses
>> Gio.Settings?
>>
>> You have worked on your master branch and the pull request is
>> associated with that branch.  That's unusual.  It is more common to
>> use a new branch with a name that explains the feature.  Make a note
>> of that for next time.
>>
>> Your pull request has three commits; 09d363f, 682d0b2, 4fe1a2f.
>> Before merging, we will ask for these and later commits to be
>> collapsed, rebased, or re-written.  You may also combine and rewrite
>> the commit messages.  Then a push with --force will update the pull
>> request.
>>
>> The http://wiki.sugarlabs.org/go/Features/Proxy_Settings page is on a
>> Wiki, and any change can be rolled back.
>>
>> On Tue, Mar 15, 2016 at 09:58:31AM +0530, Manash Raja wrote:
>> > Hi,
>> >
>> > I thank you all for the guidance.
>> >
>> > I modified my PR as per your suggestions and now the implementation of
>> the
>> > proxy feature is far better.
>> > @Sam, as you suggested, I have now completely removed the need of
>> re-writing
>> > "proxy.sh" every time the settings changes and am using
>> > "org.gnome.system.proxy" schemas. Now "/usr/bin/sugar" is hard-coded to
>> read
>> > the proxy settings from "org.gnome.system.proxy" and export it to the
>> > environment variables required for the proxy settings to be available
>> easily.
>> >
>> > @Gonzalo, thanks for the link to that important patch from Manuel
>> QuiƱones. And
>> > @James, I have changed my "view.py" and "model.py" files to go with
>> Manuel
>> > QuiƱones' way of setting the "org.gnome.system.proxy" schemas via
>> GSettings.
>> > This has hence removed the dependence on polkit for file write
>> permissions and
>> > made us do away with extra files like "set_proxy.py" for running root
>> permitted
>> > scripts.
>> >
>> > Also I have removed the "logout.sh" script as now I am using the
>> pre-made
>> > "require-restart" feature present in "sectionview" which asks the user
>> for
>> > restart.
>> >
>> > Also @James, shall I now therefore submit the GUI changes and the
>> changes you
>> > proposed to for this update in the features page? [1]
>> wiki.sugarlabs.org/go/
>> > Features/Proxy_Settings
>> >
>> > Here is the patch I submitted: [2]
>> https://github.com/ManashRaja/sugar/commit/
>> > 4fe1a2fea7f37d036331c1a1ae736c88cc29d62d
>> >
>> > Thanks
>> > Regards
>> > Manash Pratim Das
>> >
>> > On Mon, Mar 14, 2016 at 8:03 AM, James Cameron <[3]quozl at laptop.org>
>> wrote:
>> >
>> >     On Sun, Mar 13, 2016 at 11:18:46PM -0300, Gonzalo Odiard wrote:
>> >     > On Sun, Mar 13, 2016 at 11:09 PM, Jerry Vonau <[1][4]me at jvonau.ca>
>> wrote:
>> >     >
>> >     > > Yea that has roots to the old ActivityCentral fork, any reason
>> >     > > why this has not been 'upstreamed' from OneEducation(OLPC-AU) to
>> >     > > SugarLabs?
>> >     >
>> >     > Yes. Was not accepted by sugar upstream.
>> >
>> >     Let's have another go then.  See what the objections are from the
>> >     current set of developers.
>> >
>> >     > I upstreamed all that was possible, the only changes that were
>> >     > developed just for OLPC-AU were the changes needed to deal with
>> the
>> >     > complex network environments common in Australian schools.
>> >
>> >     This disease is spreading.
>> >
>> >     --
>> >     James Cameron
>> >     [5]http://quozl.netrek.org/
>> >     _______________________________________________
>> >     Sugar-devel mailing list
>> >     [6]Sugar-devel at lists.sugarlabs.org
>> >     [7]http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> > References:
>> >
>> > [1] http://wiki.sugarlabs.org/go/Features/Proxy_Settings
>> > [2]
>> https://github.com/ManashRaja/sugar/commit/4fe1a2fea7f37d036331c1a1ae736c88cc29d62d
>> > [3] mailto:quozl at laptop.org
>> > [4] mailto:me at jvonau.ca
>> > [5] http://quozl.netrek.org/
>> > [6] mailto:Sugar-devel at lists.sugarlabs.org
>> > [7] http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>> --
>> James Cameron
>> http://quozl.netrek.org/
>>
>
>


-- 
Gonzalo Odiard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160315/f5c4f382/attachment.html>


More information about the Sugar-devel mailing list