Tag: linux

Checking website status with Bash under Ubuntu

Posted by – July 29, 2011

With few lines of code we can create a very smart bash script that doest the website status check for us, this script uses the ubuntu notification system to display a notification on desktop if the website goes down.

Here’s how you can do this.

First, you need to install required packages:

sudo apt-get install libnotify-bin msmtp openssl ca-certificates

And now configure account in msmtp:



Hello World with Qtopia (Part 5 – Building, Installing and Running Applications)

Posted by – August 16, 2008

In the previous article we talked a little about how to create the necessary code that shows how to create a basic hello world application on Qtopia platform, in this article with will show how to generate the makefile, build, install and run this application.

Please open a Konsole window and the execute the following commands:

#setting the appropiate environment variables
source /opt/Qtopia/SDK/scripts/devel-x86.sh

#changing to directory where the sources can be found
cd ~/projects/helloworld

#generating make files from helloworld.pro

#clean previous build
make clean

#build application binaries

#creating the application package to deploy on device (or emulator)
sdk –p

#installing application on device
sdk –i

You can run the application by clicking on runqpe icon on desktop.

I personally would like to see Qtopia platform as real option of application platform for Nokia devices, Qtopia has a lot of features that makes the application development much more easy than Symbian platform.


Hello World with Qtopia (Part 4 – Application Code)

Posted by – June 3, 2008

In my previous articles about Qtopia application development I showed the directory structure for a Qtopia project, the contents of basic Qtopia project file (helloworld.pro) and how to create the application interface with user interface files (helloworld.ui), in this article I’ll talk about the classes to be used in our helloworld application and how we can integrate the user interface files in our applications.

Every Qtopia application requires a initialization code like we have in the code block below:


We must include the header file below since it contains
the HelloWorld class definition.

#include "helloworld.h"
#include <qtopia /qtopiaapplication.h>

//Set the HelloWorld class as the main class of helloworld application.
QTOPIA_ADD_APPLICATION("helloworld", HelloWorld)
//Add initialization code to this application

In the example above we are using to macros QTOPIA_ADD_APPLICATION and QTOPIA_MAIN, both are only available if qtopia_main is set in CONFIG variable of application project file (helloworld.pro) as described in this article.



Hello World with Qtopia (Part 3 – User Interface Files)

Posted by – May 28, 2008

The majority of applications requires a user interface to allow user interaction with application functionalities, this third part of our article will talk about the user interface files that are xml files used to define the contents of Qtopia graphical elements like dialog boxes and windows.

In the example below we are defining a QWidget called HelloWorldBase, this widget is the main window of helloworld application, it contains a QLineEdit (input box), a QLabel and a QPushButton each of then can be declared in xml using the <widget> tag where the class attribute indicate the widget type and name attribute holds the object instance name. Each widget may have default values for its properties, you can define the widget properties using <property> tag, a property requires a name that must be supplied on name attribute of this tag.


Hello World with Qtopia (Part 2 – Project File)

Posted by – May 23, 2008

In my previous article we had a short introduction to Qtopia development, I also showed how to use the example project that comes with SDK to start a new one.

This article will talk a little about one of the most important files of any Qtopia project the applicationname.pro file, this file contains very important configuration parameters for every Qtopia application, please open your preferred text editor and put the code below (look the comments):