1. Using QtCreator to deploy and run a Qt application to a remote Linux device

    QtCreator is a very flexible IDE and can really be adapted for a lot of things. I usually use it to develop mobile applications for Nokia N9 and BlackBerry 10, but it can be used for more generic tasks. In my case I wanted to be able to develop a Qt application using my desktop PC, deploy it and run on a remote (actually it's on the same desk) Linux machine running Xubuntu.

    Doing this is quite easy and you don't need any specific plugin on QtCreator, but be sure to have at least version 2.6.x. Other than QtCreator you also need two Linux based PC (I used Ubuntu 12.10 for my development machine and Xubuntu 12.10 for the remote netbook) and an SSH account on the remote PC.

    Add the remote device to QtCreator


    To add the remote Linux device on QtCreator, use the Tools->Options menu and click on "Devices" item. At this point click on "Add" button and fill the fields using values similar to the screenshot. In particular specify a name for the device, the IP of the remote machine and a username and password that must already exist (I just created the user "andrea" on the Xubuntu machine and used the same password). I also had to set the timeout to 20 seconds, because I had some connection problems and the connection kept dropping after 10 seconds trying. To verify if everything is working fine, just click on Test button.

    Add a specific Qt version


    To write your application you may need a specific Qt version that is different from the one distributed by your Linux distribution. There's no problem, QtCreator let you add different Qt versions without any conflict. In my case I installed the Qt5 version distributed by Canonical Qt5 Edgers Teamhttps://launchpad.net/~canonical-qt5-edgers
    Once it's installed, just click on "Add" button and select the qmake specific to the version you want to add (in my case it was in /opt/qt5/bin/qmake ).

    Add a Qt Kit


    QtCreator permits to add new Kit (development configurations) and these kits are used during project creation to specify what you want to target. In my example I added a new kit choosing an appropriate name "Qt5 Ubuntu", the device type, the actual device previously configured and finally the Qt version that we added before. With a kit I have a complete "toolchain" that allow me to write applications for a particular device, with a specific Qt version.

    Putting the pieces together

    At this point you just have to create a new "Qt Quick 2" application, and select the new kit you just created instead of the "Desktop" one. Please note that there is a little problem that I haven't fixed yet (but I'm working on it): if you create, for example, a project named "QtTest1" it will be deployed to the folder /opt/QtTest1/ on the remote machine. By default your user doesn't have read+write permissions for that folder so I manualy created the folder and I gave a chmod 777 on it, just for testing. There are two possible ways to fix this: you could create a specific user that has read+write permissions on /opt/ or you could modify the deployment configuration to have the app deployed to the user /home (I will investigate on this possibility and I will write something in one of the next posts).

    Final thoughts

    What all of this could be useful for? Well, do 2+2 and you'll easily guess ;) In the next weeks I will post more specific informations and I will update everyone with my progresses. Any comment is welcome! If you want to contribute to this you're welcome too of course.

    read more


  2. Ubuntu Release Sprint: calling for feedback!

    During the last UDS party, I had an idea to improve Ubuntu development, but I didn't know if it could be a good idea or a stupid one, so I talked to Daniel Holbach and David Planella about it and they were happy to hear about it and Daniel told me to talk about this directly to Mark (and I did it).

    Let's explain the basic idea.

    From an UDS and the next one, it would be useful to have a development sprint where people can talk about assigned UDS blueprints, at which point they are on their tasks, if they have any problems and if they will finish them within the next UDS.

    Of course Canonical cannot organize another meeting, it would be very expensive, so the idea is: why don't we use Google Hangout to organize the sprint? I has a limit of 10 people, I know, but we could select (for example) 5 from the community and 5 from Canonical. There would be parallel meeting and tracks, we would use the same blueprints used during the last UDS and we would add further notes. The attendees would be able to listen and watch the stream and make questions through the available chat.

    I've also created a wiki page with more informations and you can find it here: https://wiki.ubuntu.com/UbuntuReleaseSprint

    What do you think about? I know that Canonical is already organizing sprints and this could be a way to involve more the Ubuntu Community. Maybe we should schedule a session at next UDS to talk about this?

    I hope to get some feedback from you.

    read more


  3. Ubuntu 12.04, Nvidia 8800 GS and Nouveau drivers

    {.alignleft .wp-image-678 width="216" height="174"}

    After upgrading my desktop PC to Ubuntu 12.04 (actually my main machine) I started experimenting many Xorg crashes and instability issues. I reported the bug, but I had to find a solution or I should have rolled back to Ubuntu 11.10. The problem (from my point of view) is of the new Nvidia 295.40 binary drivers. I also tried an older version (295.33) experiencing the same problems. I then decided to give the Nouveau opensource drivers a try.

    I must say that in over 24 hours I didn't have a single Xorg crash. My desktop is very stable and Nouveau drivers are pretty fast: I can watch a 1080p video on Youtube in full screen without having any problem. The only problem with my machine is that I'm using a VGA Switcher to share my monitor wit Xbox (see this old post), so my monitor capabilities cannot be detected automatically and I had to do some manually tuning of the Xorg configuration.

    First of all I had to resolve a very annoying problem: the screen was blinking every 10 seconds and this really hurted my eyes. To fix this I had to add a kernel parameter: drm_kms_helper.poll=0
    you need to add this string in /etc/default/grub to the GRUB_CMDLINE_LINUX_DEFAULT parameter. After this your line should look like this one: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm_kms_helper.poll=0"

    Don't forget to execute: sudo update-grub from the command line.

    Then I had to create a proper xorg.conf setting my resolution (1680x1050) manually:

    [sourcecode lang="text"]
    Section "Monitor"
    Identifier "DVI-I-1"
    VendorName "Asus"
    ModelName "Ancor Communications Inc VW222"
    Modeline "1680x1050R" 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync
    Option "PreferredMode" "1680x1050R"

    Section "Screen"
    Identifier "Screen0"
    Monitor "DVI-I-1"

    How do you generate the Modeline line? It's very simple. Just execute: "cvt -r 1680 1050" in the command line and you'll get a line similar to the one I added (of course substitute those numbers with the resolution you want).

    You have to save this file in /etc/X11/xorg.conf and reboot your system to use all the new settings. Now my system runs nicely and very fast! I'm really enjoying the new Ubuntu 12.04 Precise Pangolin. I just hope that Nvidia guys will fix the sta
    bility issues of their driver as soon as possible, so I'll be able to choose again between the opensource driver and the closed source one (faster with 3D stuff, but more unstable as you can see).

    A big thanks to everyone in #nouveau IRC channel on Freenode. They were very kind to help me configuring their opensource driver.

    read more


  4. Ubuntu Global Jam Italy (Pistoia): a quick review

    Yesterday in Pistoia (Italy) we had the Ubuntu Global Jam and about 15 people attended the event. We began with an introductive talk by Paolo Sammicheli about the Italian Ubuntu Community and how it is possible to contribute to Ubuntu. We divided in two small groups, one translating from English to Italian (coordinated on IRC by the people of the community) and another group leaded by Marco Trevisan, learning how to implement automatic tests in Unity code (in particular he introduced us Autopilot, more information here: https://wiki.ubuntu.com/Unity/QA/Autopilot ). Next time I would like to ask people to register to Launchpad and sign the Code of Conduct before attending the global jam. We wasted a lot of time with this task.

    {.aligncenter .wp-image-639 width="403" height="302"}

    At the end of the day me and the other people from Pistoia, took the other people for a quick tour around the city where we had the possibility to eat some tasty food. It was a very amazing day and people who started collaborating for the first time were very happy! I think this has been a successful day, at least for us. I hope the other LoCo are having a good Jam as well and I really can't wait for the next Ubuntu Global Jam.

    read more


« Page 2 / 4 »