<div dir="ltr">We have that file in sugar module in the data directory.<div><br></div><div>Gonzalo </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 8, 2014 at 12:48 PM, Gustavo Duarte <span dir="ltr"><<a href="mailto:gus.duarte@gmail.com" target="_blank">gus.duarte@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ahh no, I didn't know this file, sound a good option, i'll try and let<br>
you know the results.<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
Gustavo.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 8, 2014 at 11:17 AM, Walter Bender <<a href="mailto:walter.bender@gmail.com">walter.bender@gmail.com</a>> wrote:<br>
> Did you try in /usr/share/sugar/data/mime-defaults by any chance?<br>
><br>
> On Mon, Dec 8, 2014 at 7:27 AM, Gustavo Duarte <<a href="mailto:gus.duarte@gmail.com">gus.duarte@gmail.com</a>> wrote:<br>
>> Unfortunately, this settings on <a href="http://activity.info" target="_blank">activity.info</a> doesn't work.<br>
>><br>
>> Now i'm wonder, where should be the best place to configure these mime<br>
>> entries, in which point of Sugar session starting procedure ?<br>
>><br>
>> Inside sugar-session script, it would be a right place ?<br>
>><br>
>> Because this mime types settings is valid only on Sugar desktop, when<br>
>> the PC switch to Gnome, the mime types should be changed to Firefox.<br>
>><br>
>> Thanks in advance.<br>
>><br>
>> Gustavo.<br>
>><br>
>><br>
>><br>
>> On Sun, Dec 7, 2014 at 12:01 PM, Gustavo Duarte <<a href="mailto:gus.duarte@gmail.com">gus.duarte@gmail.com</a>> wrote:<br>
>>> Good point, i'll try it and let you know.<br>
>>><br>
>>> El 07/12/2014 02:38, "Jerry Vonau" <<a href="mailto:me@jvonau.ca">me@jvonau.ca</a>> escribió:<br>
>>><br>
>>>> Just a thought, wonder if adding x-scheme-handler/http to mime_types= in<br>
>>>> browse's <a href="http://activity.info" target="_blank">activity.info</a> file would allow sugar to override what the system<br>
>>>> is providing? Another place for that definition might be in<br>
>>>> /usr/share/sugar/data/mime.defaults.<br>
>>>><br>
>>>> Jerry<br>
>>>><br>
>>>><br>
>>>> > On December 6, 2014 at 8:57 PM Gustavo Duarte <<a href="mailto:gus.duarte@gmail.com">gus.duarte@gmail.com</a>><br>
>>>> > wrote:<br>
>>>> ><br>
>>>> ><br>
>>>> > Finally I found the setting needed to open links with Browser Activity<br>
>>>> > by default.<br>
>>>> ><br>
>>>> > xdg-mime default sugar-browser.desktop x-scheme-handler/http<br>
>>>> > and<br>
>>>> ><br>
>>>> > xdg-mime default sugar-browser.desktop x-scheme-handler/https<br>
>>>> ><br>
>>>> > Adding this settings, links on notifications messages should be opened<br>
>>>> > by BrowserActivity.<br>
>>>> ><br>
>>>> > Offcourse a bash script to launch BrowserActivit is needed. Something<br>
>>>> > like:<br>
>>>> ><br>
>>>> > #!/bin/sh<br>
>>>> > while [ -n "$2" ] ; do<br>
>>>> > case "$1" in<br>
>>>> ><br>
>>>> > -u | --uri) uri="$2" ;;<br>
>>>> ><br>
>>>> > *) echo unknown argument $1 $2 ;;<br>
>>>> ><br>
>>>> > esac<br>
>>>> > shift;shift<br>
>>>> > done<br>
>>>> ><br>
>>>> > sugar-launch org.laptop.WebActivity --uri "$uri"<br>
>>>> ><br>
>>>> > Thanks a lot for all your tips, were very helpfully.<br>
>>>> ><br>
>>>> > Gustavo.<br>
>>>> ><br>
>>>> > On Sat, Dec 6, 2014 at 3:59 PM, Jerry Vonau <<a href="mailto:me@jvonau.ca">me@jvonau.ca</a>> wrote:<br>
>>>> > > Hi Gustavo,<br>
>>>> > ><br>
>>>> > >> On December 6, 2014 at 10:42 AM Gustavo Duarte <<a href="mailto:gus.duarte@gmail.com">gus.duarte@gmail.com</a>><br>
>>>> > >> wrote:<br>
>>>> > >><br>
>>>> > >><br>
>>>> > >> Add an actions, isn't an option, because the notification-daemon<br>
>>>> > >> (Ubuntu 12.04 precise) does't support actions.<br>
>>>> > >><br>
>>>> > >> From freedesktop specs <a href="https://developer.gnome.org/notification-spec/" target="_blank">https://developer.gnome.org/notification-spec/</a><br>
>>>> > >> "<br>
>>>> > >> Actions<br>
>>>> > >><br>
>>>> > >> The actions send a request message back to the notification client<br>
>>>> > >> when invoked. This functionality may not be implemented by the<br>
>>>> > >> notification server, conforming clients should check if it is<br>
>>>> > >> available before using it (see the GetCapabilities message in<br>
>>>> > >> Protocol). An implementation is free to ignore any requested by the<br>
>>>> > >> client. As an example one possible rendering of actions would be as<br>
>>>> > >> buttons in the notification popup.<br>
>>>> > >><br>
>>>> > >> Actions are sent over as a list of pairs. Each even element in the<br>
>>>> > >> list (starting at index 0) represents the identifier for the action.<br>
>>>> > >> Each odd element in the list is the localized string that will be<br>
>>>> > >> displayed to the user."<br>
>>>> > >><br>
>>>> > >><br>
>>>> > >> However hyperlinks is supported, if I add <a<br>
>>>> > >> href="<a href="http://sugarlabs.org" target="_blank">http://sugarlabs.org</a>"> SugarLabs , works. Not exactly as I<br>
>>>> > >> want .... :(<br>
>>>> > >><br>
>>>> > >> When I do a click on the link, Firefox is opened.<br>
>>>> > >><br>
>>>> > >> I tried change the system default browser setting with:<br>
>>>> > >><br>
>>>> > >> gconftool-2 -s /desktop/gnome/applications/browser/exec --type string<br>
>>>> > >> '/usr/local/bin/sugar-browser "%s"'<br>
>>>> > >><br>
>>>> > >> Notice: sugar-browser is a bash script to launch BrowserActivity.<br>
>>>> > >><br>
>>>> > >> But after that, Firefox still opened each doing click on link of<br>
>>>> > >> notification message.<br>
>>>> > >><br>
>>>> > >><br>
>>>> > >> So the problem now is, how change the default browser on Sugar.<br>
>>>> > >><br>
>>>> > ><br>
>>>> > > Hum, sounds like the system's default mime definitions might be<br>
>>>> > > pointed<br>
>>>> > > to<br>
>>>> > > Firefox in /usr/share/applications/defaults.list. What does "xdg-mime<br>
>>>> > > query<br>
>>>> > > default text/html" return? The XO here returns 'firefox.desktop' even<br>
>>>> > > without having the Firefox rpm installed. Not sure what the correct<br>
>>>> > > way<br>
>>>> > > of<br>
>>>> > > overriding this list would be, create<br>
>>>> > > "~/.local/share/applications/mimeapps.list", or maybe using "xdg-mime<br>
>>>> > > default ..."? Both of those ideas would need a .desktop file for<br>
>>>> > > browse<br>
>>>> > > thou.<br>
>>>> > ><br>
>>>> > > Hope it helps,<br>
>>>> > ><br>
>>>> > > Jerry<br>
>>>> > ><br>
>>>> > >> Any idea ?<br>
>>>> > >><br>
>>>> > >> Thanks in advance.<br>
>>>> > >><br>
>>>> > >> Gustavo.<br>
>>>> > >><br>
>>>> > >> On Fri, Dec 5, 2014 at 9:27 PM, Gustavo Duarte <<a href="mailto:gus.duarte@gmail.com">gus.duarte@gmail.com</a>><br>
>>>> > >> wrote:<br>
>>>> > >> > Greats !! Thanks for these tips.<br>
>>>> > >> ><br>
>>>> > >> > El 05/12/2014 17:59, "Gonzalo Odiard" <<a href="mailto:godiard@sugarlabs.org">godiard@sugarlabs.org</a>><br>
>>>> > >> > escribió:<br>
>>>> > >> ><br>
>>>> > >> >> +1<br>
>>>> > >> >><br>
>>>> > >> >> On Fri, Dec 5, 2014 at 4:57 PM, Sam P. <<a href="mailto:sam.parkinson3@gmail.com">sam.parkinson3@gmail.com</a>><br>
>>>> > >> >> wrote:<br>
>>>> > >> >>><br>
>>>> > >> >>> Hi,<br>
>>>> > >> >>><br>
>>>> > >> >>> If my memory is right, the freedesktop notification spec includes<br>
>>>> > >> >>> "actions". You can have multiple of these and they are displayed<br>
>>>> > >> >>> like<br>
>>>> > >> >>> buttons [1]. When they are clicked you get a callback event.<br>
>>>> > >> >>><br>
>>>> > >> >>> I would prefer to implement the standard ranter than something<br>
>>>> > >> >>> proprietary. That is just my opinions.<br>
>>>> > >> >>><br>
>>>> > >> >>> Thanks,<br>
>>>> > >> >>> Sam<br>
>>>> > >> >>><br>
>>>> > >> >>> [1]: <a href="http://imgur.com/e8r9OZr" target="_blank">imgur.com/e8r9OZr</a><br>
>>>> > >> >><br>
>>>> > >> >><br>
>>>> > >> >><br>
>>>> > >> >><br>
>>>> > >> >> --<br>
>>>> > >> >> Gonzalo Odiard<br>
>>>> > >> >><br>
>>>> > >> >> SugarLabs - Software for children learning<br>
>>>> > >> _______________________________________________<br>
>>>> > >> Sugar-devel mailing list<br>
>>>> > >> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>>>> > >> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>> _______________________________________________<br>
>> Sugar-devel mailing list<br>
>> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
><br>
><br>
> --<br>
> Walter Bender<br>
> Sugar Labs<br>
> <a href="http://www.sugarlabs.org" target="_blank">http://www.sugarlabs.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Gonzalo Odiard<br><br><div>SugarLabs - Software for children learning <br></div></div></div>
</div>