My first Keynote at CONECIT 2017 in Tingo Maria

Yesterday, I open the KeyNote session at CONEISC 2017 with a talk in an hour and a half. I have presented some experiences I had with HPC (High Performance Computing) in universities and during the ISC 2016 to show what is going on in the world regarding HPC, not only in architecture matters, also in programming. Comming soon the video 🙂It was a large audicence that congregates more than 1000 students and professionals in Computer Science and all the Engineering School in Peru.People participated with question I did and also it seems that are so interested in the topic.I want to thanks all people who helped me backstage, this is not only my effort, this is a community effort! Thanks Leyla Marcelo and Toto Cabezas, part of the GNOME Lima! ❤Thanks so much CONECIT 2017 – Tingo Maria 😀

Posted in FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , , , , , | Leave a comment

Confirming Fedora and GNOME presence in INFOSOFT 2017

INFOSOFT is a tech event organized by AAII (asociation of alumni of informatic and engineering)  from Pontificia Universidad Católica del Perú – PUCP.

This year is going to happen on September, and as you can see in the official Web, it is going to be a free fee event with previous registration until September 1st. It is open to everyone!Thanks to my trip and little training at GUADEC, I will be able to talk about GTK, Python and WebKit, with the Web Browser example

And I will also talk about tools to writer papers and good quality and free academic programs as Latex and Octave.

Here you can see my schedules of the workshops: I think it is important to show Linux, in my case with Fedora and GNOME in tech conferences where most of the time, other big companies have a strong presence.

Here is the list with some speakers:Thanks so much to the organizers to consider GNOME and Fedora in INFOSOFT 2017:I am exciting to be part of this edition of INFOSOFT in the 100th years of PUCP! <3

Posted in FEDORA, GNOME | Tagged , , , , , , , , , , , | 1 Comment

Living an extraordinary GUADEC

Confucius once said, “Choose a job you love, and you will never have to work a day in your life.” Although I am not getting paid by GNOME financially for promoting the project, I have gained much more than money through this greatest decision I have made in my life! Once I decided to be involved with GNOME in 2010, I learned how to use Mallard and how to work with people around the world in a community, I learned how to be a writer, blogger, traveler, organizer, photographer, trainer,  system administrator, programmer and how to exert myself into this world where I also gained experiences that I had never imagined as a leader of Free Software in my local community, and many more practices that have helped me grow as a professional and as a person. Thanks for this GNOME! ❤It has been a really great pleasure to attend this GUADEC, where the 20th anniversary took place in Manchester. It started with a journey of almost three days traveling to get there, but this challenge was greatly rewarded! I celebrated with many friends during the Welcome Party. Thanks Sam, Lene and Javier Jardon to make it! CONGRATULATIONS!The talks were also interesting to renew votes for GNOME: Allan Day with the GNOME Way, and the brief history of GNOME by Jonathan Blandford. The Flatpak and Flathub talks were also full of eager, knowledgeable people. I also attended the Glade talk by Juan Pablo Ugarte from Argentina, and of course the talk of our chief executive Neil McGovern.I gave a talk about the work I did in 2016 and 2017 to spread the GNOME word in Peru and LatAm. Thanks to BacktracAcademy for the prizes to the GNOME Peru Challenge:Special thanks people who attended and participated and releasing the balloons 😀

I consider this GUADEC, one of the best I had attended, all the good and smoothing environment, neaty place, schedules on time, good bandwith of Internet, good topics, and social events well organized. I was impressed with the magic night of the 20th celebration, with useful trivias to integrate people, all the ballons with the GNOME cake, sharing and dancing with GNOME friends. We had a winner of the night, congrats Andreas Nilsson!The traditional annual report was presented, as well as the presentation of GSoC and lighting talks. Congratulations to Bastian for the pants 2017 and his work and support.“Healthy Mind, Healthy Body”… Games and the football were part of this GUADEC 😀 😀Unconference and hackfests were productive, since I used GTK with Python and C, as well as WebKit4. Mattias Clasen with Recipes was also part of the things I learnt! Thanks guys!Some pics of the weather, food and some drinks in Manchester!

Finally thanks my masters that not only taugh me software, they taugh me to be GNOME

Posted in FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , , , | 1 Comment

Writing my first Web Browser in Python with GTK

Installing packages

Before starting, make sure that you have installed development packages such as pygobject3-devel and webkitgtk3-devel.

Creating your first script

We are going to start from the beginning, by creating an empty window:

from gi.repository import Gtk
window = Gtk.Window()
Gtk.main()

The first line will let us import the Gtk library from gi, and the second line, will let us create a window.

Now, if you have copy-paste this code, you will see that it won’t do much… and it happens because you created the window but it has not been shown. So let’s call the method show. Even if you can see the Close Icon on the Window, it won’t work because it is not programmed to do anything. So, lets add the signal handler to our code:

def on_destroy(window):
    Gtk.main_quit()
window.connect("destroy",on_destroy)

After running, you will see that the close icon on the window will work. If you want to change the title of the window, you can do it by adding this line:

window.set_title("GUADEC 2017")

Coding a browser

Import the WebKit library as well in the first line and create a webview widget:

webview = WebKit.WebView()

Finally, we need to add the widget into the window

window.add(webview)

and call window.show_all() instead of window.show() because now our window contains a widget.As you can see, the webview is empty with a default size. We might open any website by calling it:Adding Scroll Bars

To have a better experience, we can add scroll bars. To code this, we must understand that we are going to have three objects: a window, a scrolled window, and a webview.  For this experience, I will also delete the on_destroy handler and just use the Gtk.main_quit, and add code for scrolling:Because it does not look good, let’s set an appropriate default size (800 x 600):

window.set_default_size(800,600)

GNOME has a defined an interface guidelines, so we are going to delete the title and add a header bar widget:

headerbar = Gtk.HeaderBar()
headerbar.set_show_close_button(True)
window.set_titlebar(headerbar)

We have written the method set_show_close_button in order to display the close icon of the window:Adding the URL textbox

To be able to type a URL on this Web browser, add a text entry widget:It is not able to browse any URL at all, so we can define a signal handler:

def on_enter(entry):
 url = entry.get_text()
 print(url)

The next step is to connect it:As you can see in the terminal, an URL written in the headerbar was printed. Now let’s open the page in the browser:Adding the back and forward buttons

First, we need to find the right name of the icon of the button in GNOME:Now we find the image to represent the Back icon. I’ve chosen “go-previous”:By adding these lines, we are going to be able to display the button:

go_back_button = Gtk.Button()
go_back_arrow = Gtk.Image.new_from_icon_name("go-previous", Gtk.IconSize.SMALL_TOOLBAR)
go_back_button.add(go_back_arrow)
headerbar.pack_start(go_back_button)

To make it useful, we are going to add the handler:Now, as homework, please do the forward button. Here is my picture 😉Adding historial

Create a file history.html in /tmp and paste this code inside on_enter function:

if (url == "about:history"):
 webview.open("/tmp/history.html")
 return

history_file = open("/tmp/history.html", "a+")
 history_file.writelines("* " + url + "<br>")
 history_file.close()
 webview.open(url)

Now we are able to see a list of a websites visited:Important Note before continuing

GTK3 is still working but it will be obsolete in Fedora 27. As the comments are claiming, there are some changes that must be done in this material.

1.- Replace WebKit2 instead of WebKit while it is importing or when it is used

2.- Instead of open, use load_uri for webview widget

3.- Delete creation and handlers of scrolled_window because it is not needed

4.- Replace window.add(scrolled_window) for window.add(webview)

Adding every event to the history

So far, we have save all the pages written including an ENTER at the end, but what about the pages I visited while clicking on tabs or that make the WebBrowser changed. Besides that the tmp will be lost if you reboot the machine, it is better to save the history in another path, in this case, the home. Function such as open_page and on_load_changed that can be developed and be called later while the webview will be loaded. Make sure you have defined the proper functions to make it work:

def open_page(url):
 entry.set_text(url)
 webview.load_uri(url)

def open_history(button):
 open_page("file:///home/yulytas/.browser.html")

def on_load_changed(webview, event):
 url = webview.get_uri ()
 history_file = open("/home/yulytas/.browser.html", "a+")
 history_file.writelines("* <a href=\"" + url + "\">" + url + "</a><br>")
 history_file.close()

def on_enter(entry):
 url = entry.get_text()
 webview.load_uri(url)
 if (url == "about:history"):
 open_history(webview)
 return

 open_page(url)

open_page("https://gnome.org")
webview.connect("load-changed", on_load_changed)

Present the history by clicking a button

All the code that includes saving history in the /home/yulytas/browser.html can be presented also in a history button. These are the lines required:

def open_history(button):
 open_page("file:///home/yulytas/.browser.html")

history_button = Gtk.Button()
history_button_image = Gtk.Image.new_from_icon_name("open-menu-symbolic", Gtk.IconSize.SMALL_TOOLBAR)
history_button.add(history_button_image)
history_button.connect("clicked", open_history)

headerbar.pack_end(history_button)

Test that the links and events are satisfied by the code:Naming global variables

Finally, instead of hard-coding the path of each user home, we can use the GLib library to capture the home path of any user with the following instructions:

1.- Add the GLib library in the first line to imported.

2.- Edit the sources of the file that will contain the history:

HISTORY_FILE = "/home/" + GLib.get_user_name() + "/browser1_history.html"
HOME_PAGE = "https://gnome.org"

3.- Edit the functions defined and use the global variables already set:

def open_history(button):
 open_page("file://" + HISTORY_FILE)

def on_load_changed(webview, event):
 url = webview.get_uri ()
 history_file = open(HISTORY_FILE, "a+")
 history_file.writelines("* <a href=\"" + url + "\">" + url + "</a><br>")
 history_file.close()

4.- Call properly the handlers using the variables

open_page(HOME_PAGE)

The End:Useful dictionary of GTK and PyGobject:

1.- https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Window.html#Gtk.Window

2.- Install devHelp from the Software Center or by terminal.Special thanks

Felipe Borges for teaching me & Michael Catanzaro for the GTK/WebKit update

Posted in FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , | 10 Comments

My talk at GUADEC 2017

Thanks so much to the GNOME Foundation for its support to the events I do to spread the GNOME word in my local community in Peru. I have had the opportunity to share my work done in 2016 and 2017 at GUADEC 2017.

This time I had 25 minutes to talk (including questions) and I presented the conferences and events we did in universities and institutions in Lima, as well as in other parts of Peru such as Pucallpa, Puno and Cusco during that period.

First of all, I started by defining what a newcomer is and the two I found to reach communication with potential new contributors to the GNOME project.

I have also presented the different programs I came up to make a better job by outreaching newcomers and I presented the last program called “GNOME Peru Challenge 2017-1” as well as the winners of the challenge: Toto and Solanch.

It was also part of my talk to give gifts to the audience who answered questions during the talk. Thanks to BackTrackAcademy for their support with the t-shirts of our local group in Peru. I am very glad the winner was a GNOME newcomer! 😀You can see the video of my participation at GUADEC 2017 here.

Special thanks to Bastian, Roxana, David King, Nuritzi, Andre Klapper, and people who attended and support my job. I appreciate their supporter for long years in GNOME.

Posted in FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , , , , , | 2 Comments

More GIMP effects

Since I have to prepare new material and slides to upcoming conferences… I couldn’t help doing some effects, I have seen on GIMP, with myself and the two Linux projects I belong.

The first one, regarded Fedora, was learning from here:And the second one, for GNOME <3. This experience was based on this video.I could not believe how easy was learning GIMP 😉

Posted in FEDORA, GNOME | Tagged , , , , , , , | 1 Comment

Getting Ready for ‎GUADEC 2017

Only a few days left until the GUADEC 2017 takes place in Manchester! 😀

 

Thanks so much to the GNOME Foundation for placing its trust and confidence in my abilities in involvement and commitment to the community over the past seven years.    So, this time I will talk about the ways of reaching newcomers during the last year.

It is also a pleasure to me to help in the organization of the GNOME Games to my friend Sam Thursfield as part of the celebration of the Twentieth Anniversary Party of GNOME. Ballons are my favorite tools to connect people and I will definitely carry with me lots of them! Please be prepared with History of GNOME and some author of GNOME apps fot the “trivias”.

This is a special ocassion! I will definitely share Pisco from Peru and I am packing in advance(to not forget), my power adapter plug converter, ticket flights, another card as backup for pictures, coins of the pound sterling, my passport and a pack of eye eyelashes 😉

See you then GNOME! Can’t wait to see again lovely GNOME people! ❤

Posted in FEDORA, GNOME | Tagged , , , , , , , , , , , , | 2 Comments