RSS
 

Author Archive

Geany – A basic programming IDE for Linoobs

09 Jun

While learning Programming we do need tools to make our work simpler. One such tool is Geany which is basically a text editor with IDE like features, and focuses on simplicity rather than features. It supports a variety of languages which include (but not limited to) C, Java, JavaScript, PHP, HTML, CSS, Python, Perl, Ruby, Pascal and Haskell.

Installing Geany

Geany is in Ubuntu repos and can be easily installed via Synaptic, Software Center, and obviously through terminal.

sudo apt-get install geany

The Interface

As it can be seen from the screen shot, Geany has a pretty basic interface and new users won’t really be lost as it is like any other text editor in terms of simplicity.

How it works

Geany works on the file extension principle. When you save a text file of a program code with an extension, Geany corresponds to the appropriate compiler and interpreter and thus serves multiple languages. For example for .c extension it corresponds to gcc, .py for Python, .rb for Ruby, .pl for Perl, etc.
It does not have the advanced features of IDEs like Eclipse or Code::Blocks, but it serves perfectly for learning programming.
Also note that it’s only an IDE and does not have the corresponding compiler or interpreter. For that you need to download and set that separately. For instance you can install C/C++ compiler by:

sudo apt-get install build-essential

Geany having a very simple interface can be easily used for practicing programming or creating basic programs. For instance, you can create a C program like this:

#include<stdio.h>
int main()
{
    printf("Hello, World!");
    return 0;
}

Now you have to save the file with a .c extension, and compile the code by going to Build->Compile or simply pressing F8. To link the code you have to go to Build->Build or press F9. If your program has been compiled and linked correctly, you can simply execute it as Build->Execute or pressing F5.

And in case of Python:

#!/usr/bin/env python
print "Hello, World!"
#

Now in case of Python you simply execute the code by pressing F5, since Python is an interpreted language. You can also “compile” which basically checks for few syntax errors.

Similarly Geany works in plenty of languages and saves a lot of time particularly for beginner programmers since they don’t really have to change to a particular directory and invoke compiler by terminal.

Happy Programming.

 

Setting up Oracle XE 10g in Ubuntu

18 Feb

The Oracle Database, also known as Oracle RDBMS is a relational database management system, which is produced and marketed by Oracle Corporation. The Oracle Database Systems is one of the most popular database systems, competing with likes of MySQL, PostgreSQL, IBM DB2, Sybase, Microsoft SQL Server among others. Oracle is a very robust database solution.

Of course Oracle is a non-free software, and might not be well really liked by free software purists, and its corporate versions and support cost a bomb, but to be fair Oracle does offer a free Express Edition for its somewhat older 10g release, more popularly known as Oracle XE 10g. It’s a free download and is available for variety of platforms including various distros of Linux and Microsoft Windows.

In this tutorial, we will discuss on setting up and configuring Oracle XE 10g in Ubuntu. Here I’ve used a 32 bit version of Ubuntu 9.10 for this purpose, but these instructions will easily work for previous or future iterations of Ubuntu.

First of all we download Oracle 10g XE from Oracle website. I suggest to download from the Oracle’s Debian Repos directly, here. Select the Universal or the standard package for Oracle. Note the client is bundled with the Oracle Software itself, so no need to install it separately. Of course if you wish client alone for connecting to an Oracle software, you may proceed to install it as any Debian package.

Note you need enough RAM for Oracle in your system. If you have less than 1GB RAM, then you need to create more a gig of swap in the system by:
sudo dd if=/dev/zero of=/swpfs bs=1M count=1000
sudo mkswap /swpfs
sudo swapon /swpfs

Also you have to download the libaio package, which is necessary for installation of Oracle. Note DEB packages may open directory in Firefox, so use “Save Link As…” in that case.
Note all these packages are 32bit packages, and there’s no 64 bit packages for any Oracle XE. However you can conveniently install the 32 bits packages in a 64 bit system as we will highlight further.
Download and save the packages in some convenient directory, say $HOME/Downloads, and then fire up the terminal and change to the directory containing the packages.

Read the rest of this entry »

 
 

Securing your files from unauthorised access with Ubuntu

05 Oct

We are all paranoid about our files. Aren’t we? Whether if they contain personal information or classified information, there is a certain degree of concern we have. However with the advent of digital age, it is not that we can simply put them in lockers and guard them. Indeed you can lock your PC and disconnect it from network access, but what’s the point of using a computer to store your documents, use paper then right? Encrytion provides the way by which we can protect our files and folders. It is a method of encoding the files so that they can’t be accessed without being decoded first. For this we need a pass phrase (read: password). Thus the goal to stop the unauthorised individuals from accessing your critical documents is achieved. Ubuntu allows encryption and decryption of files and folders, but Ubuntu (at least the latest versions) have the ability to create an encrypted file store in which files are automatically encrypted and the process is entirely invisible from the user’s perspective.

Create an Encrypted private/ directory

Ubuntu has the ability that allows encryption of files “on the fly”. With this method, only the user who’s home directory the ~/private directory is residing, can access those files. No body else can access those files. That is a certain loophole of users being able to use a Live CD for accessing the files is largely eliminated. Now in order to go further, you need to install the required packages. I would suggest using the terminal since that would be quicker. :p

sudo apt-get install ecryptfs-utils

Now set up the pass phrase such by running this command.

ecrpytfs-setup-private

You would be asked your login password for running this command. Next it will ask you the pass phrase, i.e. the mount pass phrase. Keep in mind that the mount pass phrase is not same as login password and also that you have to remember the passphrase in case you need to unlock the files manually at a future date. Once you have finished running the commands, log out and then log back in again. After logging in, you’ll find on opening the home directory that there’s a new private folder. This private folder will store all the files within itself encrypted and thus the files within it cannot be accessed without authority, i.e. only the original user can access it.

Read the rest of this entry »