Some computer related stuffs
Revtex4.cls not found in ubuntu 10.04
In ubuntu 10.04 revtex4 has been removed and replaced with revtex4.1. Typing only revtex4 will give error that revtex4.cls not found. One simple solution worked for me is to replace revtex4 by revtex4-1 in the document class specification.
\documentclass[showpacs,amsmath,amssymb,prl,twocolumn]{revtex4-1}
You also require the package texlive-fonts-extra. Install it
sudo apt-get install texlive-fonts-extra
Post Info - Category | 0 Comments
Switching on the vim-latexsuit in ubuntu
I recently installed a vim addon named vim-latexsuit for vim editor wich makes typing in latex much easy. However just sudo apt-get installation did not switch on the latexsuit. In order to use it type the following command
sudo vim-addons -w install latex-suite
Post Info - Category | 0 Comments
error: iostream.h: No such file or directory
This is because you must have added a line at the beginning of your program
#include
Omit the .h extension i.e. the correct line would be
#include
Post Info - Category | 0 Comments
‘cout’ was not declared in this scope
If you are getting this error means you have not added the line
using namespace std;
Add this and you will not get this error.
Post Info - Category | 0 Comments
Move the minimize, maximize, close keys from the left to the right of the window
For ubuntu 10.04 in the default setting the maximize, minimize and close buttons are on the top left panel, like the mac style. I did not like and changed it by the following command
gconftool-2 --set /apps/metacity/general/button_layout
--type string :minimize,maximize,close
Post Info - Category | 0 Comments
Find the format type of a harddisk
If the device name for the hddisk is /dev/sdc then type fdisk -l /dev/sdc
Post Info - Category | 0 Comments
Recover data fromed a crashed Harddisk
Recently a harddisk with ubuntu installed on it crashed and I was not able to mount the partitions on a second computer. Using the command
mount /dev/
was giving me output like
Wrong fs type ...
If you are having similar problem follow this instruction to recover you data. You will need a working computer with linux on it and also a third hddisk. One can use a rescue cd but I will not describe that. You can see more details in the related links.
- Connect the hard disk to a working computer, as a secondary harddisk.
- Find device name for the crashed hddisk. For me it was /dev/sdb and the partition I want to recover was /dev/sdb7. Make an image of the crashed hddisk on the third hddisk. For me it was /dev/sdc.
ddrescue -r 3 /dev/sda7 /dev/sdc /home/logfile.txt
- Now on the copied image run
fsck /dev/sdc
- It will most probably will give you an error like wrong fs type.... Run the following command
fsck --rebuild-sb /dev/sdc
Thenfsck --check /dev/sdc
If you still get errors then runfsck --rebuild-tree /dev/sdc
- This should work. Try mounting the hddisk on a file
mkdir recovered
mount /dev/sdc recovered
All your recovered files will be inside folder recovered/lost+found.
Post Info - Category | 0 Comments
Ubuntu 10.04 beta not able to connect the repositories
I was trying the beta release of ubuntu 10.04 Lucid Lynx, and after installation when I pressed reload on the synaptic manager it gave me an error saying it is unable to connect the server to download thep ackage. However my internet is working. It turned out that I was using the Indian server and that was not working. In order to change it got to the settings => repositories and change the download from option to main server. then reload, and it worked
Post Info - Category | 0 Comments
First step towards hacking!
If you want to surprise your friends by writing a mail from their mail account follow this
Telnet into your mail server by 25 port
telnet yourmailserver 25
If you are lucky you can get into the server. Then type the following
MAIL FROM: sender's mail id
Remember to give a space between the colon and the mail id.
RCPT TO: recipient's mail id
To type the message
DATA
Then press enter and type your message
After you finish typing the message press enter then type "." and then press enter. This will send your message
Post Info - Category | 0 Comments
Merge multiple pdf files
If you want to merge multiple pdf files into single file, this tutorial tells you how to do that
First you need to have gv installed. Then use the following command in the terminal.
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=combined.pdf
file1.pdf file2.pdf
Post Info - Category | 0 Comments
UBUNTU: Wireless not working in dell laptop / Installing wireless driver for bcm4312 on Ubuntu
This problem I faced in dell inspiron laptop. After installing Ubuntu (9.04) wireless was not working. There was a red cross on the wireless signal bar on top right panel on the desktop.
Solution: Install the correct driver for the wireless network card. I will describe how to install wireless driver for BCM4312 wireless card.
To find out your wireless card type the following on the terminal
lspci | grep Network
For me the out put has BCM4312 802.11b/g (rev 01) term and this is my wireless card. If you have this follow the instruction bellow or make suitable changes according to your network card.
- Create a directory "driverwl" anywhere
mkdir driverwl
and then go inside the directorycd driverwl
- go to the site http://www.broadcom.com/support/802.11/linux_sta.php and download the corresponding tar.gz file for your laptop. Mine was 32-bit system. Save the file inside the "driverwl" directory you just created
- Untar the file.
tar -xvzf hybrid-portsrc-x86_32-v5_10_91_9.tar.gz
- Run the following command
pwd
Use this output in the "full path name" place in the next two commands. - Type
make -C /lib/modules/<2.6.xx.xx>/build M="full path name" clean
To get the number <2.6.xx.xx> type up to "..modules/" and then press tab. - Then run the command
make -C /lib/modules/<2.6.xx.xx>/build M="full path name"
- Then
sudo depmod
andsudo modprobe wl
You are done. Your wireless should detect available signals. Sometimes you need to reboot your comp.
Post Info - Category | 0 Comments
"Firefox is already running, but not responding..."
If you get this message do the following.
- Open a terminal and type
ps -e | grep firefox
. If you get an output like5433 ? 00:07:40 firefox
, use the number on the left to kill the firefox.kill -9 5433
Again ensure that no firefox is runningps -e | grep firefox
. There should be no output this time. - Now go to the .mozila/firefox directory
cd ~/.mozilla/firefox/
- Do ls here.
ls
There will be a directory with some apparently meaningless name with numbers. If you are using default profile there will be only one directory with .default extension. Like I have a directory "dvermul9.default" - go inside the directory and do ls -a there
cd dvermul9.default
ls -a
You will find two files "lock" and ".parentlock". Delete them.rm lock .parentlock
- Start the firefox. It will work.
- Sometime this procedure removes you bookmarks. To get them back open the firefox, and then go to Bookmarks in the menu list => Organise Bookmarks. Then go to Import and Backup => Restore => Choose File. This will open a file opener. Type ~/.mozilla/firefox in the address bar. If you don't see the address bar click on "pen and paper" symbol on top left. Then go to directory dvermul9.default => bookmarkbackups. Choose the .json file with recent most date. Restart the firefox. This will get your bookmarks back
Post Info - Category | 0 Comments
Mathematica6 Fonts not visible in Ubuntu 8.04
Problem: In mathematica6 if the fonts are not readable and it looks like the following
Solution: Open a terminal and type the following commands.
sudo apt-get install libqt4-core libqt4-gui
sudo mv /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux/libQtCore.so.4 /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux/libQtCore.so.4.old
sudo mv /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux/libQtGui.so.4 /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux/libQtGui.so.4.old
Then start the mathematica.
Post Info - Category | 0 Comments
Many windows opening in Mathematica 6
Problem: When starting mathematica it opens more than one blank windows.
Solution: Open mathematica => Go to Edit => Preferences => Advanced Options => Notebook Options => Window Property => WindowFrame. Change this from normal to generic This fixes the problem
Post Info - Category | 0 Comments
Flowers of India
As the name suggests this is a website about flowers from India. This site is maintained by a group of enthusiastic people, some of them are friends of mine. They have a very good collection of Indian flowers and their scientific names. Please have a look.
Post Info - Category | 0 Comments