Posts

Showing posts from October, 2012

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