Sunday, August 23, 2009

deprecated conversion warning for char* in GCC

g++-4.x gives following warning whenever a string with in double quotes is assigned to a char * :

warning: deprecated conversion from string constant to ‘char*’

Though there is no fix available as far as I know except for following two solutions:
1. convert 'char *' to 'const char*' whenever a string is to be assigned.
2. use a type cast to convert a string to a char*.

For example:

const char *name = "Adam Smith"
char *name = (char*) "Adam Smith"


To get rid of deprecated conversion warning, pass -Wno-write-strings option to g++

opencv on Ubuntu Jaunty

Opencv does not handle videos properly on Ubuntu Jaunty. In order to fix this, please follow the instructions given at this link:

http://gijs.pythonic.nl/blog/2009/may/3/getting-video-io-working-opencv-and-ubuntu-jaunty-/

Monday, August 10, 2009

Vim-latex suite on Ubuntu Jaunty

First install vim-latex package using synaptic packet manager. Then run following command on a terminal :

$ sudo vim-addons -w install latex-suite

Now opening a tex document with gvim should show tex related menus on the menu bar.

If this does not help, then refer to ubuntu forums for solution. For instance check this link.

Friday, July 10, 2009

Automating chmod

Task is to change the permission modes for multiple directories

$ find . -type d -print0 | xargs -0 chmod 771

Tuesday, June 30, 2009

PDF Highlighting tool


Earlier I talked about few tools for editing PDF files (for free) on linux. You can go through the discussion here. I recently came across some more free tools that tend to make our life little easier, particularly when it comes to editing pdf files on linux. Some of these tools are as follows:
  1. Scribus : Limited capabilities
  2. Inkscape : Limited capabilities
  3. Okular : Limited capabilities. You can do some highlighting and add annotations. But they don't seem to be very neat. Just give a look at some screenshots.
  4. PDF-xchange-viewer. Its a windows based application which is free to download at present and can be run on linux using Wine. I could use it flawlessly on my Ubuntu Intrepid Ibex (8.10). Among all pdf editing tools, this seems to the best option for editing pdf files. Even though its not a native linux application, it is better than going back to windows just for editing a PDF file. However, I am still waiting for GNUpdf which, I believe, would provide a permanent relief to linux users in this regard.

    To get started, first use synaptic packet manager to install wine. For Ibex, follow the instructions given at this link. Download PDF-xchange-viewer from its website and run it using wine. That's all. It installs itself within a folder. A screenshot of PDF-xchange-viewer is shown in the adjacent thumbnail. Its really neat and close to what we find in Adobe Acrobat PDF editor.
  5. PDFescape: You can edit PDF files online (particularly fill up forms) at this website. This is useful if you are in a hurry and can't install a PDF editing software on a public machine.

Update: November 10, 2014

Wine does not support PDF-xchange-viewer properly. It crashes frequently. You may think of buying crossover to run PDF-xchange-viewer. Another alternative is to use Master PDF Editor. IT is pretty decent for highlighting and adding texts. It still does not have features to include boxes and circles.  

Installing Master PDF Editor is not very complicated. The following commands worked for me on a Linux Mint 17 machine (copied from here ... ):

$ wget -c http://code-industry.net/public/master-pdf-editor_1.9.25_amd64.deb
$ sudo dpkg -i master-pdf-editor_1.9.25_amd64.deb 

Tuesday, January 20, 2009

Installing Essential softwares on Debian Etch

In order to install softwares like acroread and mplayer, include following line into your '/etc/apt/sources.list'

deb http://www.debian-multimedia.org/ etch main


Download the key-ring from this site and install it as follows:

$ sudo dpkg -i debian-multimedia-keyring_2008.10.16_all.deb


and then run "apt-get update". More information regarding this is available here and here.

# sudo apt-get install acroread



For flash, you need to install the package "flashplugin-nonfree" which is available in backports repository. Include following line into your sources.list file:

deb http://www.backports.org/debian etch-backports main contrib non-free

and now get keyrings for backport repository.

#apt-get install debian-backports-keyring
#apt-get update
#apt-get -t etch-backports install flashplugin-nonfree