I moved over from Ubuntu 9.04 to Debian 5.0 recently. It was not because I did not like Ubuntu. I think Ubuntu is simply great and it has made Linux as user friendly as Windows. But I faced problems in compiling and installing some scientific packages. Hence, I had to move over to Debian. Moreover, I had been using Debian for a long time (nearly 4 years) before switching to Ubuntu. I am quite happy to be back to Debian. The current version 5.0 is certainly better than its predecessors. GUI functions are more stable. I have all the ingredients necessary for my work. I really don't worry about having latest packages as long as the current package is stable and it works. On this aspect, I faced trouble with Ubuntu sometimes. I am planning keep updating my readers about the problems I faced with Debian 5.0 and how to get around them.
Today, I would talk about the problem of VLC player not showing the video. It happened because of debian-multimedia repository. It upgraded some codes and vlc player stopped displaying video. The solution is to remove the debian-multimedia repository from /etc/apt/sources.list and then do the following :
$ sudo apt-get update
$ apt-get remove ffmpeg libavcodec51 libavdevice52 libavformat52 libavutil49 libpostproc51 libswscale0
$ apt-get install ffmpeg libavcodec51 libavdevice52 libavformat52 libavutil49 libpostproc51 libswscale0
$ apt-get install vlc
After this, your VLC player should work normally. It worked for me.
Friday, February 26, 2010
Thursday, February 25, 2010
Adobe flash on Google Chrome, Ubuntu
If you are not able to see Youtube videos on Google chrome, then probably your flashplayer is not working properly.
For 64 bit machines, download the Adobe flashplayer from this link.
For 32 bit machines, download from here.
Extract from the tar ball :
$ tar -xzvf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
make a directory :
$ sudo mkdir /opt/google/chrome/plugins
$ sudo cp libflashplayer.so /opt/google/chrome/plugins
$ google-chrome --enable-plugins
You can change this command in your application menu as described here.
For 64 bit machines, download the Adobe flashplayer from this link.
For 32 bit machines, download from here.
Extract from the tar ball :
$ tar -xzvf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
make a directory :
$ sudo mkdir /opt/google/chrome/plugins
$ sudo cp libflashplayer.so /opt/google/chrome/plugins
$ google-chrome --enable-plugins
You can change this command in your application menu as described here.
Saturday, January 30, 2010
Google IME for Indian Languages ...
Using indian languages on a computer had never been so easy. I mean you can type directly in hindi in any windows application - notepad or word or web browser. Thanks to the google transliteration IME. You really don't need to remember the hindi key sequence (which is the case when you use window's native IME support. You can just type in the roman characters and it converts them into your native language (the same thing that happens in Gmail or in other google application. There is a free software called "Baraha" which does the same thing. I have been using this software for quite some time and I found it useful. However, its integration with other windows application is not that good.
After saying all this, I suggest you to download google transliteration IME tool from this link and see for yourself.
Also go through the installation instruction ....
Here is a screenshot of how it looks on my computer. I advise you to enable the short-cut key for enabling and disabling google IME. The google IME icon is sitting at the bottom right corner of the screen.
In fact, I can write directly in Hindi here ... for instance ... क्या आप हिंदी देख सकते हैं ? यह बहुत अच्छा है.
Thursday, January 21, 2010
Convert PS and EPS files into JPEG
I got this useful information from this link.
You can convert any ps or eps file into a jpeg using ghostscript:
This method has one flaw. It produces huge files. Depending on the eps file you may get something like 2000×3000 pixels which is slightly on the insane side. Also the file size of the JPG will be about 10 times that of the eps.
We will now need to trim and resize the file using some Image Magic tools:
In order to execute this command on multiple files, use following bash script
for k in $(ls *.eps); do b=`basename ${k%.eps}`; gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=$b.jpg $k; mogrify -trim -resize 800x600 $b.jpg; done
You can convert any ps or eps file into a jpeg using ghostscript:
gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=myfile.jpg myfile.epsThis method has one flaw. It produces huge files. Depending on the eps file you may get something like 2000×3000 pixels which is slightly on the insane side. Also the file size of the JPG will be about 10 times that of the eps.
We will now need to trim and resize the file using some Image Magic tools:
mogrify -trim -resize 800x600 myfile.jpgIn order to execute this command on multiple files, use following bash script
for k in $(ls *.eps); do b=`basename ${k%.eps}`; gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=$b.jpg $k; mogrify -trim -resize 800x600 $b.jpg; done
Saturday, January 9, 2010
Linux on windows: Cygwin
If you use applications that work on only windows (like gtalk, voipcall clients), then you feel like having linux environment on the side, so that you won't have reboot into linux for doing your work. For these people (including me), Cygwin is a good choice. For instance you can have the bash shell, emacs, gnuplot, xfig, gvim, latex, xdvi all at one place ... The installations is very easy. Don't forget to install X server of cygwin (cygwin/x) during the installation process. Particularly, latex is more neat to use on cygwin than installing miktex and other tools for the same purpose.
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++
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-/
http://gijs.pythonic.nl/blog/2009/may/3/getting-video-io-working-opencv-and-ubuntu-jaunty-/
Subscribe to:
Posts (Atom)
