Friday, November 26, 2010

Fast Mail Merge - Openoffice.org extension.

There is a new extension tool to Openoffice.org called Fast Mail Merge. This will help you to send multiple email messages within a short period of time. In addition to that it provides enhanced features for existing Mail Merge Options.

If you need to download the extension file from the link given below,

http://extensions.services.openoffice.org/e-files/1082/7/FastMailMerge-0.8.1.oxt

To INSTALL, Select Tools-->Extension Manager under Openoffice.org software and add....

To work on the tool, open a Openoffice.Org spreadsheet database and Select the FMM button just under File Menu. This will open a small widow wizard which will ask for some inputs. Proceed with your options.

Saturday, November 13, 2010

Boot Multiple Operating Systems (OSs) using a USB Drive.

There are some cases where you may need to maintain many number of CDs, DVDs and USB drives written with different Operating Systems for the purpose of installation or booting Live OS. Its really tiresome to create different OS images on different devices. Hence, here is a solution that helps you to maintain a Single device with Large number of OS images installed in it. The method is very easy and you may delete or add any number of OS images (depending on the size of your device) without much efforts.

In this method, we make use of USB (pen) drives. I prefer Ubuntu Linux to do this and the steps are as explained below.

Steps:

1. Get a USB drive with 4GB / 8 GB or higher memory capacity. Format the drive to vfat or ext4 filesystem.


Note : 
        a). In ubuntu you may use gparted command to do this. Or you my use fdisk too.
        b). You need to unmount the drive before partitioning.

2. Now, install grub (which is known as a bootloader) on the drive with following command.

sudo grub-install --no-floppy --root-directory=/mnt /dev/sdc 

Note : 
        a). Where /mnt is the mount location for the drive. /dev/sdc is device ID.
        b). Please ensure that you have grub2 installed in your  Ubuntu, in order to get better results.


After "grub-install", you will be able to see a folder boot which contains subfolder grub with lots of files in it.

3.  Add menus to your "grub" by editing the file grub.cfg.

For example :


menuentry "Ubuntu 10.04 Desktop i386" {
  loopback loop /iso/ubuntu-10.04-desktop-i386.iso
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/ubuntu-10.04-
desktop-i386.iso noeject noprompt --
  initrd (loop)/casper/initrd.lz
}
 
Add menus If your grub.cfg contents are as given above, then this will show 
a Menu "Ubuntu 10.04 Desktop i386" while you boot from the USB Drive.
You may add sufficient number of menus depending on the number of .iso files.
4. Now create a folder named "iso" in the same location where your boot folder is.
5. Copy iso image, Ubuntu-10.04-desktop-i386.iso into the "iso" folder.
You may copy more ".iso" images of different OSs and add the menu entry into the 
"grub.cfg" file.
6. Restart your computer and select the USB drive as the boot device. This will 
display a menu list of OSs to select and boot.
Thats all folks!!!!!
grub
 

Tuesday, November 2, 2010

Import PDF files into OpenOffice.org and edit.

Sometimes, a need may arise to import PDF files and re-edit the file to correct errors in it. There may be a lot solutions available for this, but I prefer the "sun-pdfimport.oxt" Openoffice.org extension to import almost any PDF file into openoffice and edit.

Steps I used are as given below,

1. Download "sun-pdfimport.oxt", which is known as PDF import extension file, from the link http://extensions.services.openoffice.org/project/pdfimport.

2. Open Openoffice.Org Wordprocessor. Goto Tools-->Extension manager.... option.

3. Click on "Add...". Select the downloaded file (sun-pdfimport.oxt). This will install the Extension file. Restart  Openoffice.

4. Now, you can open a .pdf file using wordprocessor. Another option to open pdf file is to Right Click on PDF file and select "open with...." command. Then select the Application as "wordprocessor".

I hope this information was useful to you all....

Monday, October 18, 2010

Use Graphical Libray of GTK+ 2.0 in C programs and Complie with GCC / G++.

In ubuntu (10.10, Lucid Lynx), you can use GTK+ graphical libraries along with gcc / g++ to write graphical applications. There are 2 ways to install Gtk+ in ubuntu.


1. Download Source code and install using ./configure, make, make install. You need to ensure that some dependant packages are already installed (pango, cairo, atk, pixman, glib, gdk-pixbuff, etc).


2. Second method is to use the binary (.deb) packages available on Ubuntu repositories.


In order to Install GTK+-2.0 package under ubuntu, you need to install all below packages, which will install all libraries needed for GTK+ to work.


* gir1.0-gtk-2.0_2.20.1-0ubuntu2_i386.deb (543.7 KiB)

* gtk2-engines-pixbuf_2.20.1-0ubuntu2_i386.deb (718.8 KiB)

* gtk2.0-examples_2.20.1-0ubuntu2_i386.deb (977.7 KiB)

* libgail-common_2.20.1-0ubuntu2_i386.deb (442.7 KiB)

* libgail-dbg_2.20.1-0ubuntu2_i386.deb (869.5 KiB)

* libgail-dev_2.20.1-0ubuntu2_i386.deb (333.2 KiB)

* libgail-doc_2.20.1-0ubuntu2_all.deb (333.1 KiB)

* libgail18_2.20.1-0ubuntu2_i386.deb (332.6 KiB)

* libgtk-directfb-2.0-0_2.20.1-0ubuntu2_i386.deb (2.1 MiB)

* libgtk-directfb-2.0-0-udeb_2.20.1-0ubuntu2_i386.udeb (1.8 MiB)

* libgtk-directfb-2.0-dev_2.20.1-0ubuntu2_i386.deb (327.3 KiB)

* libgtk2.0-0_2.20.1-0ubuntu2_i386.deb (2.4 MiB)

* libgtk2.0-0-dbg_2.20.1-0ubuntu2_i386.deb (10.2 MiB)

* libgtk2.0-bin_2.20.1-0ubuntu2_all.deb (328.9 KiB)

* libgtk2.0-common_2.20.1-0ubuntu2_all.deb (706.0 KiB)

* libgtk2.0-dev_2.20.1-0ubuntu2_i386.deb (3.6 MiB)

* libgtk2.0-doc_2.20.1-0ubuntu2_all.deb (3.8 MiB)


Note : The package libgtk-directfb-2.0-0-udeb_2.20.1-0ubuntu2_i386.udeb may fail to install. You may ignore it.


3. Write a simple Program in C (sample given below),

#include

/* This is a callback function. The data arguments are ignored
* in this example. More on callbacks below. */

static void hello( GtkWidget *widget, gpointer data )
{
   g_print ("Hello World\n");
}

static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data )
{
/* If you return FALSE in the "delete-event" signal handler,
* GTK will emit the "destroy" signal. Returning TRUE means
* you don't want the window to be destroyed.
* This is useful for popping up 'are you sure you want to quit?'
* type dialogs. */

g_print ("delete event occurred\n");

/* Change TRUE to FALSE and the main window will be destroyed with
* a "delete-event". */
return TRUE;
}

/* Another callback */
static void destroy( GtkWidget *widget, gpointer data )
{
gtk_main_quit ();
}

int main( int argc, char *argv[] )
{
/* GtkWidget is the storage type for widgets */
GtkWidget *window;
GtkWidget *button;

/* This is called in all GTK applications. Arguments are parsed
* from the command line and are returned to the application. */
gtk_init (&argc, &argv);

/* create a new window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

/* When the window is given the "delete-event" signal (this is given
* by the window manager, usually by the "close" option, or on the
* titlebar), we ask it to call the delete_event () function
* as defined above. The data passed to the callback
* function is NULL and is ignored in the callback function. */
g_signal_connect (window, "delete-event",G_CALLBACK (delete_event), NULL);

/* Here we connect the "destroy" event to a signal handler.
* This event occurs when we call gtk_widget_destroy() on the window,
* or if we return FALSE in the "delete-event" callback. */
g_signal_connect (window, "destroy",G_CALLBACK (destroy), NULL);

/* Sets the border width of the window. */
gtk_container_set_border_width (GTK_CONTAINER (window), 10);

/* Creates a new button with the label "Hello World". */
button = gtk_button_new_with_label ("Hello World");

/* When the button receives the "clicked" signal, it will call the
* function hello() passing it NULL as its argument. The hello()
* function is defined above. */
g_signal_connect (button, "clicked",G_CALLBACK (hello), NULL);

/* This will cause the window to be destroyed by calling
* gtk_widget_destroy(window) when "clicked". Again, the destroy
* signal could come from here, or the window manager. */
g_signal_connect_swapped (button, "clicked",G_CALLBACK (gtk_widget_destroy), window);

/* This packs the button into the window (a gtk container). */
gtk_container_add (GTK_CONTAINER (window), button);

/* The final step is to display this newly created widget. */
gtk_widget_show (button);

/* and the window */
gtk_widget_show (window);

/* All GTK applications must have a gtk_main(). Control ends here
* and waits for an event to occur (like a key press or
* mouse event). */
gtk_main ();
return 0;
}
4.Compile using below command,
gcc -Wall -g HellowWorld.c -o HellowWorld `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`

 
5.To run the output file, ./HellowWorld


Saturday, October 16, 2010

How to Install Graphics Libraries and use under (Linux) gcc/g++ (graphics.h)



Here are the steps that I used.

  1. In order to include graphics.h header file, you need to install libgraph package.
  2. Search the source code for “libgraph”. Install by using commands,
    ./configure
    make
    make install
  3. Sometimes, you may get error message “configure: error: *** SDL version x.x.x not found!”. You can solve this by installing “apt-get install libsdl1.2-dev”.
  4. Sometimes, you may get error message “configure: cannot find guile-config; is Guile installed?”. You can solve this by installing “sudo apt-get install guile guile-dev”.
  5. Sometimes, you may get error message “SDL_image-x-xx-x not found”. You may install by searching sourcecode “SDL_image” and following commands “./cofigure make make install”.
  6. When I tried to compile a C file, I got error message,
    vksalian@vksalian-laptop:~/Desktop$ gcc vvv.c -o vvv -lSDL -lSDL_image
    In file included from /usr/local/include/grtext.h:26,
    from /usr/local/include/graphics.h:116,
    from vvv.c:8:
    /usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or directory
    /usr/local/include/SDL/SDL_image.h:29:25: error: SDL_version.h: No such file or directory
    /usr/local/include/SDL/SDL_image.h:30:24: error: begin_code.h: No such file or directory
    /usr/local/include/SDL/SDL_image.h:134:24: error: close_code.h: No such file or directory
  7. sudo apt-get install libsdl-image1.2-dev freetype, libsdl1.2, libsdl1.2-dev, libsdl-image1.2-dev, and libsdl-image1.2.
  8. Copy header files with command “sudo cp /usr/local/lib/libgraph.* /usr/lib
  9. Then changed the arguiments to compile the C Program and the command looks like (all libraries included),
    gcc -g -Wall -I/usr/include/SDL -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -L/usr/lib -lSDL -I/usr/local/include/SDL -lSDL -lSDL_image -I/usr/local/include -lgraph -o vvv vvv.c
  10. Please note the below point.
    `sdl-config –cflags` & `sdl-config –libs` can replaced for -I/usr/include/SDL -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -L/usr/lib -lSDL -I/usr/local/include/SDL -lSDL -lSDL_image -I/usr/local/include
  11. Sample C Program I used to test this,
    #include
    #include
    #include
    void main()
    {
    int gd,gm=VGAMAX;
    int a;
    gd=DETECT;
    initgraph(&gd,&gm,NULL);
    line(200,200,100,100);
    scanf("%d",&a);
    return 0;
    }

  1. You may use the article below (for more details).

        Graphics.h in GNU/Linux By rajivnair.in

    Ive read and pondered upon lots of blogs and posts regarding the topics "20xx is the year of the linux desktop" , "linux is not yet ready for the desktop" etc etc.I guess the answer to all such questions is personal in nature. I mean id say "try and find out". I started using a GNU/Linux distribution about 8 months ago. Since then my aim was to do whatever stuff i was doing on XP, on GNU/Linux and maybe find stuff i couldnt do on XP. Thats how i approached/read about GNU/Linux though i later found out that, that approach isn't exactly right, as i was merely "reducing" GNU/Linux to a windows replacement, while its actually a whole another approach to computing.
    Anyways, since i joined engineering if there was one thing i didnt like at all, then it was the "Blue Screen Of Death" or the Turbo C interface. Since s3 i never used Turbo C at home. I've always preferred Visual Studio or Dev C++ over Turbo C. I just didnt like the interface. This dislike of turbo C didnt however hamper my coding functionalities in other IDE's as they always had what i wanted. After moving to GNU/Linux i was able to do the same programs and compile them using G++. But s7 is were the problem starts. Now i gotta "computer graphics" lab which makes extensive use of the "graphics.h" library. I had heard rumours earlier that it wasnt available in all IDE's and to my dismay i found out that it wasnt there in GNU/Linux either. Another problem was that since the functions it included involved direct access to the hardware merely copying the graphics.h header to the library folders wouldnt help. As always google helped. Stumbled upon the blog of a person who was in the same situation as I am and he had found a solution. The answer to my problem was a set of libraries called libgraph which wraps around the SDL API.
    His blog did contain steps to install in debian but it didnt work for me coz of minor hiccups. SO i spent sometime and finally succeeded in getting it to work on my ubuntu feisty install. I just thought i'd post it here so that google drops this in front of another seeker :)

    Step 1: Installing dependencies

    run sudo apt-get install build-essential to make sure you have installed all necessary compiler tools

    Now comes the real achy part. Open synaptic and install the following packages

    libsdl-image1.2
    libsdl-image1.2-dev
    guile-1.8
    guile-1.8-dev
    libsdl1.2debian-arts
    libartsc0-dev
    libaudiofile-dev
    libesd0-dev
    libdirectfb-dev
    libdirectfb-extra
    libfreetype6-dev
    libxext-dev
    x11proto-xext-dev
    libfreetype6(upgrade)
    libaa1
    libaa1-dev
    libslang2-dev
    libasound2
    libasound-dev

    You can install them in a single go by adding all the above package names(separated by a black space) to the end of sudo apt-get install Even if it asks you to uninstall some already installed stuff, tell it to proceed. After all this is over. Download this file onto your home folder: libgraph-1.0.1

    Right click on the file u just downloaded and click "Extract here"

    open terminal and navigate into the folder u just extracted the file contents into by running cd libgraph-1.0.1
    Now run the following commands one after the another. Proceed to the next command only if the preceding command executes without any errors.
    ./configure

    sudo make
    make install
    If you get any errors during the "sudo make" step, paste it in the comments section of this post.

    Now technically install is over. Try writing a simple program including graphics.h. Declare the values of gd and gm and call initgraph as follows

    int gd,gm=VGAMAX; gd=DETECT;initgraph(&gd,&gm,NULL);

    and when compiling using g++ add an extra paramter -lgraph
    i.e if you are compiling a program dda.cpp in the terminal u type in

    g++ dda.cpp -o dda.o -lgraph
    And execute the program by runnung ./dda.o

    If on compile it gives u an error that says "could not load shared libraries" or something like that just run the following command and it should fix it

    sudo cp /usr/local/lib/libgraph.* /usr/lib
    I also read somewhere that graphics.h dosen't have ANY practical use in today's world and that its only "use" now is to help students learn to apply different algorithm's they have to study in a paper called "Computer Graphics"

Wednesday, October 13, 2010

Vruksham Software Core Developers.

 
An enthusiastic team situated in Hanchinal, Kundgol Taluk, Dist. Dharwad have started a Software Development Group for development of customised software solutions for both RPM and DEBIAN linux Operating Systems. The team is known as Vruksham Software Core Developers.

Scope : The main target of the team is to customize the softwares used for VLSI DESIGN and SIMULATION. With the solutions provided at VSCD, one can automate most of the design related stuffs and there by reducing sufficient time and money spent on works.
For example, there is a software (development version) that is capable of automating Magic Layout generation as per the given input data. The layout of any size can be regenerated automatically, several times with no much effort. You can download the package at below links,


The team is headed by Mr. Basavaraj Tambur,  with plenty of knowledge in Python, Perl, TK/TCL, Java, C/C++ scripting.

One more person named Mr. VKSALIAN has knowledge on RPM and DEBIAN packages and basic script knowledge is assisting the team in creating Installer packages for Linux. Presently he is concentrating on Package creation methods and customization of packages.

Basically, the idea for software development came into mind when they found some scope for customization and automation of softwares. Then, with little knowledge they started creating small packages and found success, surprisingly. They continued the work as an entertainment which resulted in technical knowledge development. Soon, they thought of forming a group to develop such softwares, and the result is VSCD.


The present Projects being handled at VSCD are,

1. File converter from .rm to mp3 (all formats) for Linux.
2. Automation for Magic Layouts (VLSI).

Future projects we planned,

1. Decoder package for all formats in single package. (Linux).
2. Karaoke Maker software for Linux (High quality).
3. Simulation program for VLSI designs with flexibility (replacement for ngspice).
4. Mini Linux OS (VSCD Linux).

You may download trial base sample development packages here, below,


 

Thursday, October 7, 2010

Cheapest Mic-Set, using Ubuntu Linux OS, for conducting seminars and functions.

If you are using a laptop (ASUS LAPTOP in my case) with UBUNTU 9.04 Linux, then you can use the computer to setup a Cheapest MIC-SET that you may need to conduct functions, meetings etc.

What are the things needed ?

1. A small MIC from a Mobile Head Phone..

2. 3mm Audio Jack with paired wires of sufficient length.

3. Any cheap Amplifier / FM set that is available in market for Rs. 300/-.

4. Old PC speakers- 2 Nos.

HOW TO ?

1. Solder MIC to the cable that connects to the Audio Jack.

2. Insert the audio jack into ASUS eeePc Laptop.

3. Swith on the Laptop.

4. Use Volume Control Panel to switch the MIC ON. Make Volume level high.

5. Connect the audio output to Amplifier.

6. Talk at the MIC and correspondingly adjust the MIC volume.

YOUR SIMPLE MIC-SET is ready.


Advantages :

1. You can save upto Rs. 1000 / day. Because the rented MIC_SET costs around Rs. 1000/ day at our place.


Note : This article is to just show that how differently we can think.

Friday, July 2, 2010

Winff - Video Converter for Ubuntu Linux.

    I found a software on net that is capable of converting almost any video from one type to another. It makes use of ffmpeg package and related plugins for video conversion.

The program winff can be installed as,

sudo apt-get install winff

Please make sure that ffmpeg is already installed. To run the program, just type in winff in a console window.

The winff makes use of GUI and very easy to use.

The softwares are readily available under Ubuntu. I have tested the software in both Ubuntu 9.10 and 10.04 and worked fine for me.

Tuesday, May 18, 2010

Screen Video Capture using kx11grab & ffmpeg in Ubuntu 10.04.

     Suppose, you need to teach someone on how to use a particular software etc. In such cases it will be useful if you capture the video display and send to one who needs it. There are some tools that can capture the screen and save in different video formats such as avi, mpeg etc.

     In Ubuntu, there are two tools that work together to capture screen. They are
1. ffmpeg
2. kx11grab

These can be installed as,

sudo apt-get install ffmpeg
sudo apt-get install kx11grab

Usage :

Use the below sample command to capture screen,

ffmpeg -f x11grab -s 1024x768 -r 75 -i :0.0 /tmp/out.avi

Monday, March 29, 2010

Ubuntu 10.04 Linux will be released on 27th April 2010.

    The next version of Ubuntu will be Lucid Lynx and will be known as 10.04 version. The date for release of final version is on 27th April 2010. The version will be a LTS i.e. long term support.

Monday, February 8, 2010

A Solution to BUG in Desktop-switcher of Ubuntu 9.04 Netbook Remix. (Bug #370133)

Introduction:
     In NBR Ubuntu 9.04 version, there are 2 modes of Desktops.

1. Ubuntu Netbook Desktop.
2. Classic Desktop.

    Switching between these 2 modes can be done by running a command "desktop-switcher" in Terminal Window Or By selecting it from 
"Menu
->System->Preferences->Switch Desktop Mode".

Problem: There is a BUG in the desktop-switcher package that comes as a default package of Ubuntu NBR 9.04. The bug will affect the Desktop Modes as a result of which the "Classic desktop" will lose its panels, Menu, etc. You will see only a Background Image + any Icons on Desktop. No Keys will work at that stage. But you can add a Terminal LAUNCHER to Desktop and run some commands.

Note : You need a Terminal window to go for below steps. If you are in "Classic desktop" mode, you can Right Click on Desktop area and select "Create a Launcher......" from the menu. Use command "gnome-terminal".

Solution:

Steps are,

1. Remove old desktop Switcher package.
sudo dpkg -r --force-all desktop-switcher
2. Remove Configeration data of desktop switcher.
rm -rf ~/.config/desktop-switcher
3. Install desktop-switcher_0.4.6_i386.deb from the link : http://swiss.ubuntuforums.org/attachment.php?attachmentid=111829&d=1241109082

4. Try switching between Desktop Modes and finally Restart the computer if needed.

Reference : My practical Testing + Information from the site http://swiss.ubuntuforums.org/attachment.php?attachmentid=111829&d=1241109082