Posts

Showing posts from 2012

mp4 files playing problem in Ubuntu 12.10 in

Because of some bug in gstreamer0.10-plugins-bad, some time .mp4 file does not plays in totem video player (Ubuntu's default video player) in Ubuntu 12.10. There is a patch in launchpad to fix this problem. To install the patch follow the instruction bellow. sudo add-apt-repository ppa:diwic/gstreamer-h264-testing sudo apt-get update sudo apt-get dist-upgrade This will automatically change the plugin and after a restart you can play all video file with totem video player. Source: http://askubuntu.com/questions/143245/movie-player-wont-play-mp4-gxine-does/143374#143374 https://bugs.launchpad.net/ubuntu/+source/gst-plugins-bad0.10/+bug/973014

Installing ibus-avro in Ubuntu 12.10

Avro OmicronLab is one of the best software to write Bengali using phonetic key board. Previously avro was not available for ibus (now default input method for Ubuntu) in Linux, But recently they made it available for ibus which is known as ibus-avro . It was working fine with Ubuntu 12.04, but due to some dependency problem it has stopped working with Ubuntu 12.10. Also reinstalling from .deb file or form official repository is not possible because of the same dependency problem. When trying to install from deb file or from repo, the following error message I was getting: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ibus-avro : Depends: gir1.2-gjsdbus-1.0 but it is not instal

Git cloning behind proxy server

If you are behind proxy which is protected by firewall and want to use git clone using git:// protocol there is a huge chance that it will not work. But the beautiful thing is you can use http:// protocol instead. Which will work behind most of the proxy. So for example, suppose you want to clone ibus-avro from github.com/sarim. So normally you will run the following command: git clone git://github.com/sarim/ibus-avro.git Now if cloning fails, that means your proxy firewall is blocking it, you can run the following command instead. git clone http://github.com/sarim/ibus-avro.git Which will also clone the content of ibus-avro. Hope this will help. Cheers A.Paul

Micromax 352g modem in Ubuntu 12.10

Image
In one of my previous blog I have described how to configure Ubuntu 12.04 to use Micromax 352g Usb modem. But unfortunately this method is not working Ubuntu 12.10. But I have found another way to make same usb modem work in Ubuntu 12.10. First open terminal and run the following command: lsusb The out put will look something like this. Bus 001 Device 003: ID 0c45:63ea Microdia Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 002 Device 008: ID 1c9e:9605 OMEGA TECHNOLOGY Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Noter here the device ID for your modem. For my case it is 1c9e:9605 from OMEGA TECHNOLOGY . Now create a configuration file with above vendor and product id using following command: sudo gedit /etc/usb_modeswitch.d/1c9e:9605 And add the following

Send in Email in Background in Thunderbird

Image
Mozilla Thunderbird is one of the best email client available for Windows, Linux and Mac. Here I will tell how to send email in background in Thunderbird, so that when you send any mail that irritating "sending email" popup will not come out in front of you. First go to Preferences window: In windows: tools>options In linux: Edit>preferences Now go to Advance tab > General   and click on Config Editor Button, When asked click on I'll be careful, I promise button.  Then search for mailnews.sendinBackground and then select it. Then right click and toggle it to true. Now Thunderbird should send your email in background. You may need to restart the Thunderbird. Cheers A.Paul

How to creat short form of a long command

Some time we need to use very long command frequently for some job in Linux. And it is very irritating to write same thing again and again when using frequently. But there is an option to make command short in Linux. You have to edit .bashrc file for that using following command: gedit .bashrc Then add the following command at the end of the file and save it, alias new_command='long old_command' For example I use the following command to connect my departmental server from my institute to check my departmental mail ssh my_username@physics.iisc.ernet.in Now if I want to make it short to suppose dmail, I can add the following line at the end of the .bashrc file alias dmail='ssh username@physics.iisc.ernet.in' After logout and login again you can now use the New_command (say dmail) instead of full long command. Hope this will be helpful. Cheers A.Paul

"could not get lock /var/lib/apt/lists/lock" problem

Some time when we run sudo apt-get update command we see the following error message: sudo apt-get update && sudo apt-get upgrade Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) One possible reason for this error is that you are probably running synaptic package manager or some installation is still going on on software manager or some where some installation or update or up-gradation is going on in system. But some time you find that nothing is going on but it still showing same problem. Then you can solve the problem using following command sudo rm /var/lib/apt/lists/* -vf sudo apt-get update && sudo apt-get upgrade Now your update should start properly. Cheers A.Paul

How to downgrade software if you have used ppa to upgrade it

In this blog I will tell you how to downgrade some software to Ubuntu's default version if you have upgraded that software using ppa. Many times we want to upgrade some software to its newest version. But Ubuntu does not provide update for all software except for some critical bug fixes or security update. But almost all software maintain there ppa for Ubuntu so that user can get the latest version of that software. But some time you may fill that you should not have upgraded that software to newest version as that is not properly integrated with Ubuntu. So you want to downgrade it. Here I will tell you how you can do that. First you have to install a ppa-purge software. You can do that simply using the following command, sudo apt-get install ppa-purge Now you can purge the ppa using the following command sudo ppa-purge ppa:user/ppa-name Which will automatically downgrade the software to default version of Ubuntu. Cheers APaul

Using Indian rupee symbol in LaTeX

Image
On 15 July 2010 Indian Government accepted ₹ as Indian Rupee symbol . After accepting there was numerous attempt was made to bring the symbol to the digital world. Unicode U+20B9 was assigned to it. Also almost all modern operating system support inserting the symbol by some method. As one of the finest word processor LaTeX also support ₹ symbol.  TechFa t has created a package called tfrupee , which can be used to write rupee symbol in latex document. Let's see how to use it, first installation. Installation: Miktex: If you are using Windows then probably you are using Miktex as latex distribution. It is very easy to install any package in miktex. You can use miktex package manager to install it. First go windows Start button>Miktex>Administration>Package Manager . Search for tfrupee there and select it and click in "+" symbol to install it. If you have installed complete miktex 2.9 then probably it is already installed in your computer. TexLive:

Adding Defaults env_keep in visudo

Image
In my previous two blog I have discussed problem with add-apt-repository behind proxy and x-server problem with sudo command. In both cases solution was to add Defaults env_keep in sudoer's file. like Defaults env_keep=" DISPLAY XAUTHORITY" (for gedit) Defaults env_keep="http_porxy" (for adding repository) Problem is, if you add line like above, one that is las line work. Because above command actually keep envs that at the last line and reset all others. To add more than one env variable you can use any of the following methods. First method: You can specify, as many env variable as you want, in side the quote, separated by space. For example: Defaults env_keep="http_proxy ftp_proxy DSPLAY XAUTHORITY" Second Method: You can use "+=" sign instead of "=" sign in the command. For example: Defaults env_keep+="DSPLAY XAUTHORITY" Defaults env_keep+="http_proxy" Both are equally good method. You c

Adding Repository Behind Proxy Using add-apt-repository

Image
  If you are behind proxy then you may have noticed that adding repository is not easy in Ubuntu. Even though $sudo apt-get-update or $sudo apt-get-install kind of command work, $sudo add-apt-repository don't work. To get rid of this problem you have to add one line at the end of the sudoer's file. Use the following code in terminal. $sudo visudo And then add the following line at the end of the file Default env_keep="http_proxy" It should work now. Cheers A.Paul

X Server and Display Problem With sudo

Image
Some time it happens that when you run any graphical window with sudo command like $sudo gedit /etc/apt/apt.conf you may get error message like: ** (gedit:8392): WARNING **: Command line `dbus-launch --autolaunch=720d86dbc34b24ba21ce446600000009 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n Cannot open display: Run 'gedit --help' to see a full list of available command line options. or any error message involving launching x-server. To get rid of this kind of error message first open terminal and then run the following command $sudo visudo Then add the following line at the end of the file. Defaults env_keep="DISPLAY XAUTHORITY" Now if you are adding more than one variable in this form then use "+=" instead "=" (without quote). Hope this will solve the problem. Cheeres APaul

Insync, a command line client for google drive

Image
Recently Google has changed Google docs to Google Drive. Google drive is a cloud service which can be used to synchronize your files in local computer to different computer. Also you can create, edit and view documents, presentation and spread sheets. Google made software for windows and mac but not for linux. Don't Worry there is software available for linux which can be used for synchronize Google drives files, insync . Though this is a command line interfaced (cli) kind of software, but it works great. To install the software download the .deb file from here . Then just double click it and install. Now for first time running just open terminal and run command insync and then it will open up some window asking for Google account and password. Enter user name and password allow insync. You are done, all your cloud files and folder will be available locally. Now you can put it in auto start also. Go to system setting > Start up application > add and then in

How to Get Rid of Internal System Error Popups

Image
Apport is a debugging tool that automatically generates crash reports and submit it. In Ubuntu 12.04 we have seen that we always get popups showing error message "Sorry, Ubuntu 12.04 has experienced an internal error." as shown in above picture. This is because Apport is enabled by default in the newest version of Ubuntu (Ubuntu 12.04). To get rid of this message we have to disable the Apport, especially since most of the time there is no visible error/crashes. To disable this message we have to edit /etc/default/apport file using this code $sudo gedit /etc/default/apport and the change "enabled" from "1" to "0" , and them save the file. After completion the above steps Apport won't start after next reboots. But may be you also want to stop Apport in the current session only, you run the following command $sudo service apport stop You can also re-enable Apport by editing the same file again and changing "enabled" from

Firefox address bar search

Image
Firefox has a very good option to search anything directly from the address bar. We can change the search engine. To change the search engine go to address bar and tipe about:config > enter Then Firefox will show a warning massage like this click on "I'll be careful, I promise" button. Then you will get screen like this. Go to search bar and search for "kyeword.URL" without quote. Then select the option and right click on it and select modify and then any of the url given bellow according to your choice. Default Google Search (In case you want to restore originals) http://www.google.co.in/search?btnG=Google+Search&q= Google Search with I’m Feeling Lucky (what the hell is difference?) http://www.google.co.in/search?btnI=I%27m+Feeling+Lucky&q= Yahoo search http://search.yahoo.com/search?p= Microsoft’s Live.com http://search.live.com/results.aspx?q= Wikipedia http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&sea

Setting http_proxy value to local bashrc file

When I connect my laptop to internet from my institute I had to connect it through proxy. But when I connect it from my room I have to connect it directly. So I have to change my proxy frequently. But I have observed that changing proxy through network manager does not actually change the value of "http_proxy" variable. Neither the export command actually work. So we have changed the value by changing the ~/.bashrc file and adding the proxy value. Use the following command to edit file. $gedit ~/.bashrc Then add the following line http_proxy="http://userid:pass_word@proxy:port/" https_porxy="https://userid:pass_word@proxy:port/" ftp_proxy="ftp://userid:pass_word@proxy:port/" You can also set the domain which should not use proxy by no_proxy environment variable. This will be coma separated string containing domain name. Like no_proxy="first.domain,secon.domain" you can also edit some other file like /etc/environment /etc/bash

Configuring Texstudio to use Internal pdf viewer in user defined quick build

Image
LaTeX ( pronounced  as la-tech or ly-tech) is a macro package for TeX created by Leslie Lamport. This is a document processor software which creates  professional  document and typesetting, specially if you are writing scientific document and contained lots of equation, figure and table. This is kind of markup language, so you just create a logical structure of document and the formatting is taken care by LaTeX. This is different form the other popular document processor like MS Word or Open Office Writer where you can see formatting of the document directly, but here you can only see the structure of the document not the formatting. But since this is a command based kind of document processor you have to remember lots of command to create a document, which is bit difficult. Also there is huge chance that you will make some mistake in the commands of the document, which will then create problem when you will compile the document, and you will not get any output.  This is wh

Micromax 3G usb modem on ubuntu 12.04

I am using Micromax 3G USB modem to access Internet for long time, and it was working fine with previous distribution of Ubuntu. I have recently upgraded my operating system from Ubuntu 11.10 to 12.04. After upgrading I have seen that system is not detecting my Micromax modem. Fortunately I found a very simple solution and here I am sharing it. You have to just edit the /etc/modules file. Use this code $ sudo gedit /etc/modules and then add this two line at the end of the file usbserial option This has worked for me. Hope this will also solve your problem. Cheers APaul NB: If you are using Ubuntu 12.10 probably the above method is not working. Check this post for work around.