Sunday, March 29, 2009

Upgrading Open Office 2.4.1 to 3.0.0 in Intrepid

OS: UBUNTU 8.10 (Intrepid Ibex)
Kernel: 2.6.27-3-rt
Date: March 29th, 2009

Hey everyone,
Well have you seen Ooo 3.0.x, It completely rocks, I mean with Ooo 2.4.1 I had too many issues like completely killing my system resources: I don't know about everyone but 2.4.1 was obviously too heavy on my system - it used to make everything run in slow motion, sometimes completely hang up. However even after (quite long after) releasing Ooo 3.0.0 I couldn't get update for Open Office through synaptic. So I searched a little bit and here is solution if anyone need to use 3.0.0 instead of 2.4.1 on Hardy or Intrepid. And ya if you are thinking of having Jaunty (9.04) then no worries Ooo 3.0.0 comes with it.
So here is the way you can upgrade 2.4.1 to 3.0.0:

P.S. I've done this on Intrepid(8.10) However I'm trying to post it for Hardy(8.04) as well, For Hardy please try it on your own. I'm just posting the best possible way to so it.

Add Open Office.org 3.0 repositories:
Go to
  • System -> Administration -> Software Sources
  • (OR System -> Administration -> Synaptic Package Manager Then Settings -> Repositories)
  • Go to Second tab Third-Party Software
  • Click on Add button and paste following line as it is - This one is for Intrepid I haven't tried it for Hardy but still try to put which generally works - TRY IT ON YOUR OWN.
  • deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main
  • Now for Hardy you should try something like:
  • deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu Hardy main
  • Get an authentication key from: here (You may want to right click on link and select option save link as Save it as whatever you want - officekey would be appropriate but hey its your choice).
  • Now in the same Software Sources Navigate to Authentication tab
  • Click on Import Key File, Navigate to your key file (officekey if you go by name suggested by me) Select the file and press OK.
  • You will see the new entry as: 247D1CFF 2009-01-21 Launchpad PPA for OpenOffice.org Scribblers.
  • If this way of adding key doesn't work for you then try the other way that I've suggested in previous post (specially for Hardy) - but ya I'm not sure.
  • Press Close and then press Reload else if you are in synaptic package manager then press Close and click on Reload button.
  • You will have that upgrade/update icon glowing in your task bar (System tray). Just update your system and you will have all new Ooo 3.0 which will stay updated all the time.
And ya the next post will be about installing Open Office.org on 8.10 completely from scratch or after removing previous version - if anyone doesn't like upgrading.

This solution was posted at: http://news.softpedia.com/news/How-To-Install-OpenOffice-org-3-0-in-Ubuntu-8-10-96449.shtml (Last checked March 29th, 2009)

Thursday, March 26, 2009

Adding GPG key

OS: UBUNTU 8.10 (Intrepid Ibex)
Kernel: 2.6.27-3-rt
Date: March 26th, 2009

Hey guys as I said in previous post I'm using upgraded Intrepid from Hardy, After upgrading I got too many error messages saying I need to add GPG key for repositories. I'm not sure for what purpose the key is required but it seems its for encrypted information about few packages.
So here is the way how you can add new GPG key to synaptic package manager

Suppose you get an error message saying:
W: GPG error: ......... : NO_PUBKEY $KEY (In my case $KEY = 43C0AFF0D7FAE680)

Here are two commands which may fix the issue:
  • gpg --keyserver keyserver.ubuntu.com --recv-keys $KEY
In my case
gpg --keyserver keyserver.ubuntu.com --recv-keys 43C0AFF0D7FAE680

Then you will see required key for particular repository is being imported (This one was for XBMC)

You need to export this key to apt (synaptic) with following command:
  • gpg --export --armor $KEY | sudo apt-key add -
In my case
gpg --export --armor 43C0AFF0D7FAE680 | sudo apt-key add -

And you are done adding key for that particular repositories. You may need to do the same procedure number of times for different repositories :)

This solution was posted at: http://ubuntu-ky.ubuntuforums.org/showthread.php?t=1055420 (last check March 26th, 2009)

Tuesday, March 24, 2009

Painting -1st one

Hey everyone,
Its spring break and I'm too lazy to work so here comes one of my painting. I painted all these on my Sony Ericsson W950i, so may not seem quite good, Its not like I'm good painter otherwise but with that said I've an excuse :)


Most basic one every child must have drawn this one at least once (at least in India). Hmm enjoy spring :)

Messing up with Inspiron Keyboard

This one is not related to Ubuntu or any kinda solution for any problem.
Its just something I did with my Inspiron 1525 keyboard. If any of you are interested in whats down there under the hood (keyboard) then have a look.
P.S. If you want to try it as well please do so on your own risk. I won't take any responsibility at all.
That said, It took me around 7 hrs to disassemble and assemble that keyboard, phew it was too much work.
  • The way you see your laptop:


  • After removing these keys you will see little white mechanical holders:
  • And here are the keys those reminded me of LEGO :) :
  • Then comes the rubber pads which actually make contact with the keyboard matrix (About matrix type keyboard I'm not quite sure however thats what I learned for my embedded systems):


  • That pad needed to be removed to have a look at plastic connector:


  • Then we have plastic connector matrix:


  • Well next 2 are nearly same but for first of them I want you to have a look at flip side of blue connector & never think of removing it I suppose it used to be glued for proper connections:


  • And here is the bottom most layer can't go below it and not even sure whether it has any connections or no:


Well thats all. :)

Wednesday, March 18, 2009

installing UBUNTU via LAN

OS: UBUNTU 8.04 (Hardy Heron)
Kernel: 2.6.24
Date: March 19th, 2009

Hi everyone, Its been a long from last post, I had been busy :(.
Anyway buckle up this one is going to take a while even to read :)
So today I'll try to explain our (me with one of my buddy) successful effort of installing UBUNTU 8.10 on a laptop without USB booting and apparently its DVD drive was dead. If anyone have same issue or you want it to do it for some other reason (embedded solution, Server- Client type installation system).
Requirements:
1. Obviously working LAN.
2. DHCP server on host.
3. PXE booting capability for client.
4. Bootable ISO of UBUNTU (which you want to install) - called as Alternate CD/DVD.
5. And ya little knowledge of configuring network and about your NIC is nice to have.
6. Host (Server) is considered to be running on Linux (Mine is Ubuntu so packages may be called little different).

So enough of talking, here are the steps:
On your host (Server) you should have following packages installed : (If you don't have them use sudo apt-get install OR synaptic package manager whatever you are comfortable with)

  • tftpd-hpa
  • tftp-hpa
  • dhcp3-server
  • apache2
You may get error message first time you install dhcp server, just because you haven't configured any subnets yet, don't worry we will come to it later.
Now in your web directory (/var/www - default, if you are not sure and you have apache installed) create a directory with the distribution name (well whatever is fine if you don't create a folder thats okay as well however it would look neat and manageable):
  • sudo mkdir /var/www/intrepid (in my case it was /var/www/ubuntu8.04Protik)
  • We will use intrepid for example
If you have DVD/CD then copy the content to this directory:
  • sudo cp /media/path/to/cd/* /var/www/intrepid/ -R
If you have an iso there are 2 ways - Either mount it somewhere and copy the data or mount it directly in /var/www/intrepid. I would suggest copy the content if you want to make it a long term solution, by long term it means at least 10-20 installations otherwise just mounting iso is fine (though will be little bit slower).
We will see command to mount image in the web folder:
  • sudo mount -t iso9660 -o loop /path/to/iso/ubuntu-8.10-alternate-i386.iso /var/www/intrepid
  • P.S. use the ALTERNATE DVD only (it has necessary files for net/lan booting) and substitute ubuntu-8.10 with whichever you have.
  • After this step you can check whether you have it at proper place by opening following page in your browser
http://localhost/intrepid
  • You should see the content of the DVD on this page.

Now configuring tftp :
Edit tftpd-hpa (Use gedit, kate, vi, nano, vim or whatever you like, I'll stick to vi)
  • sudo vi /etc/default/tftpd-hpa
This file should look like :

#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS=" -l -s /var/lib/tftpboot"

P.S. RUN_DAEMON line should look exact same and note down the directory its pointing to (in above case /var/lib/tftpboot its default case but you may have different one according to configuration).
Now putting required files for netbooting in this directory:
Copy contents of netboot directory from mounted iso image directory to /var/lib/tftpboot
  • sudo cp -R /var/www/intrepid/install/netboot/* /var/lib/tftpboot
Restart tftps server
  • sudo /etc/init.d/tftp-hpa restart
Check if its been setup properly:
  • tftp localhost -c get pxelinux.0
  • ls -l pxeli*
Make sure the file is bigger than 0 bytes. If not something is wrong go over the above mentioned steps again. Otherwise you are there now proceed (It happened with me that I had pxelinux file as 0 byte as it was a softlink and I had to go through it again :( so make sure you do it carefully and properly).

Now time to setup the DHCP server which will allow client to boot via network
Edit dhcpd.conf according to your settings: (Here I've put general steps as well as part of my dhcpd.conf just to compare both of these may not work for you please check your settings then proceed).
  • sudo vi /etc/dhcp3/dhcpd.conf
Add subnet entry similar to following
      subnet 10.0.0.0 netmask 255.255.0.0 {
host desktop02 {
# only give DHCP information to client computer:
hardware ethernet 00:00:00:00:00:00;
#The MAC address of the network card of the client computer
# Basic DHCP info (see 'ifconfig', 'route', 'cat /etc/resolv.conf')
fixed-address 10.0.0.13;
#the ip address that the regular dhcp server (the router) issues to the client
option subnet-mask 255.255.0.0;
option routers 10.0.0.1;
# the ip address of the router
option domain-name-servers 172.28.1.67, 172.28.1.69;
#the domain name servers your router uses. Don't really know if these are necessary...

# TFPT server for PXE boot
next-server 10.0.0.5;
# ip address of server (this computer)
filename "pxelinux.0";
}
}

And now following is the part of my dhcpd.conf if above one is not clear enough: I preferred wired connection between host and client while server was connected to internet with wireless so the settings given below are for my NIC.

subnet 169.254.9.0 netmask 255.255.255.0{
host desktop02{
hardware ethernet 00:A0:D1:B0:44:87;
#this as the mac address of client fixed-address
fixed-address 169.254.9.13;
# I (hence DHCP while booting process)assigned this ip address client
option subnet-mask 255.255.0.0;
option routers 169.254.9.254;
# I don't think this one even being used :P but I put it. If its useful somehow I can't remeber what should we put there
option domain-name-servers 172.28.1.67, 172.28.1.69;
#These weren't being used for sure as I never connected client to internet
next-server 169.254.9.38;
#this was the ip address of my server (assigned to my NIC) hence subnet is changed to 169.254.9.0
filename "pxelinux.0";
}
}

I'm not that good at network configuration so you may do better job :)
Anyway now start/restart the DHCP server:
  • sudo /etc/init.d/dhcp3-server restart

Now to client side:
  • Put client in pxe booting option (through booting menu most probably F12)
  • Start the installation when UBUNTU ask for country chose:
Enter Information Manually
(The very first entry in country list).
  • When it prompts for hostname put the ip address of server (host)
  • Path to publicly shared folder - folder under www - in our case /intrepid/ (in my case /ubuntu8.04Protik/)
  • Next step (about proxy or something) - leave it blank.
Continue the installation.
And eventually you are done. This kinda installation is little slower than CD/DVD however faster than internet plus if you configure network properly then you can install it on number of machines at a same time :)
Phew I'm completely out of fuel, hope you can read it completely while trying. All the best :)

This solution was posted at : http://ubuntuforums.org/showthread.php?p=6686273#post6686273 (Last checked March 19th, 2009)

Wednesday, March 11, 2009

Installing RealVNC

OS: UBUNTU 8.04 (Hardy Heron)
Kernel: 2.6.24
Date: March 11th, 2009

Hi, I'm not sure how much important is it to get realvnc installed on your UBUNTU box, as there are too many remote desktop connection software available in UBUNTU.
I needed realvnc only because one of my lab at school is been setup using realvnc server. So while connecting (through realvnc) we don't need to give specific terminal number (just host name is fine) and we use to be directed to lowest loaded terminal, otherwise terminal number is must and at peek time there is good chance to have very slow connection.
The other thing is monitor size (Resolution) at school's terminal can't be matched with my laptop so while connecting we can specify to optimize connection for viewing at particular resolution.
e.g. :4 (specifies that we should be able to view host screen - 4:3 monitor compatible with widescreen monitors - Laptop)
So if any of you want to install realvnc for any reason you have then follow the steps and it should be working fine:
  • Download VNC Free Edition for Linux (x86) (gzip) from http://www.realvnc.com/products/download.html
  • Extract most probably to one of the directory in your home folder
  • If you directly want to invoke vncviewer instead of path-to-the-folder/vncviewer then issue following command (considering you are in the extracted folder in above step) to install vnc in your bin directory
  • sudo ./vncinstall /usr/local/bin
Hold on it won't work just now you will need libstdc++ to run it properly. I'm not sure what it does but its a dependency.
libstdc++ is not available in deb repositories so there is a problem. So here is what I did:
  • The version I used here was latest at that time please make sure to visit the link and get latest version.
  • Get libstdc++2.10-2.96-0.83mdk.i586.rpm form
    http://fr.rpmfind.net/linux/rpm2html...libc6.2-2.so.3
  • I would suggest search for libstc++ rpm and get the latest package as of until there is no debian package. Keep the rpm file in a folder in home directory.
  • As you can see its rpm package to convert it to deb use alien as below:
  • sudo alien ./name-of-rpm (in my case sudo alien ./libstdc++2.10-2.96-0.83mdk.i586.rpm)
  • You will have deb package just install it by double clicking.
  • I'm not sure whether we can use compact version of libstdc++.
OK so now you have realvnc installed and running on your system.
Just type vncviewer --fullcolor (I like fullcolor - looks better)
And then put the host name OR ip address and you are connected.

This solution was posted at: http://ubuntuforums.org/showthread.php?t=930168 (last checked March 11th, 2009)

Saturday, March 7, 2009

Making SWAP file while running UBUNTU

OS: UBUNTU 8.10 (Intrepid Ibex)
Kernel: 2.6.27-3-rt
Date: March 7th, 2009

Hi guys ever happened to you : You have a preinstalled Windows with Media center by Laptop company - so basically they have one partition for Media center. Well its a trivial thing but when I got my DELL Inspiron I didn't wanna lose the media center even though I'm never actually gonna use it (It was that thing you feel about something new :P, pretty dumb huh?). And yeah I wanted UBUNTU on primamary partition so I can have seperate boot loaders - couldn't actually got it working though (otherwise you wouldn't be seeing post about Windows after UBUNTU hehe).
Anyway jist of the story somehow I couldn't manage to create SWAP partition at the time of installation and after you have data its too painful to resize/delete-create partition.
Well having 4 gigs of RAM didn't bother me until one day I actually started doing productive work - synthesizing verilog designs the software needs way too much RAM - if you don't know.
So now I needed a SWAP but :( we don't have one to start and I'm too lazy or maybe don't wanna lose data so not resizing/deleting the drive.
Here is the way how you can create SWAP on the fly - when UBUNTU is running:
Open the terminal and issue follwing set of commands:
(PLEASE READ TO THE END BEFORE ISSUING ANY COMMAND)
sudo su OR you may also want to use sudo for each of the command if required - your choice
dd if=/dev/zero of=/swapfile bs=1024k count=2048
mkswap /swapfile
swapon /swapfile

You will have to issue swapon everytime you boot the computer
However if you want it to be done automatically each time you reboot/power ON you can put following lines in fstab:
sudo vi /etc/fstab (vi, nano, gedit, kate whatever you like)
Add following line
/swapfile none swap sw 0 0
(Again /swapfile - path to your swapfile for me /home/protik/mySwap)

P.S. If dd if fails on your computer please issue
LANG=en dd if=/dev/zero of=/swapfile bs=1024k count=2048 (There is some known problems with dd - it gives segmentation fault, as it can work only with english language (my guess :P) - for me it worked out of the box)

This will create swapfile of name /swapfile with size 2GB and will switch it on
  • /swapfile -> path to swapfile you want, It can be /path to your file name/your swap file name in my case it was /home/protik/mySwap
  • bs=1024k -> base used for further calculation (I'm not sure if we can change this - put a comment if any of you know)
  • count=2048 -> size of swap = 2048 * 1024k = 2GB you can change 2048 to whatever value you like (256, 1024, 512 etc.)

With command
free (Or any partition manager, GUI based)
you can see amout of SWAP you have

  • And ya I find it pretty convenient as I can delete the swap file any time I want and free the space if required to :)

This solution was posted at:
http://ubuntuforums.org/showthread.php?t=265051&page=2 (last checked March 7th, 2009)

Wednesday, March 4, 2009

Firefox font separated more than enough

OS: Ubuntu 8.04 (Hardy Heron)
Kernel: 2.6.24
Date: March 4th, 2009

Hi everyone, today I'll try to be real short. Anyway here is the situation, One day I was working with my laptop, and my Firefox font went all weird - it was separated beyond readable format however I couldn't figure out what and where went wrong. I didn't actually give much attention to previous update/ software install.

If you are facing the same situation here is what you should try:
  • Open Synaptic Package Manager and search for pango-graphite
  • if it is installed just remove it (Mark for removal and then apply).

OR

  • sudo apt-get remove pango-graphite

and your problem will be solved

I can't actually remember the source for this solution :( Sorry about that, if anyone come across it somewhere on net put a comment. Thank you.

Monday, March 2, 2009

Installing Windows after UBUNTU

OS: Ubuntu 8.04 (Hardy Heron)
Kernel: 2.6.24
Date: March 2nd, 2009
Hi everyone I have dual boot system. I've kept Windows (I don't know why). Anyway the point is most of the time it happens that my Windows get some problem and needed to be reinstalled (as usual). So every time I do that I lose my grub on primary drive, Reinstalling properly working Ubuntu for such a small reason is too much pain.
Hence I used to prefer installing only GRUB after installing Windows. Here are few steps those will help you recover your lost GRUB:
I suppose you have live CD along with you (if no order one - its free or just download - its completely Legal).
To recover your GRUB:
  • Boot with Live CD (I've tested with UBUNTU 8.04 and 8.10)
  • Open Terminal (Applications -> Accessories -> Terminal)
  • Open grub prompt with:
sudo grub
  • You will see a grub prompt as below, we are suppose to use it to find and recover grub
grub>
  • Type following commands to find your grub: (Here TAB doesn't work)
grub>find /boot/grub/stage1 (If this one doesn't work for you then use the other one - gives ERROR)
grub>find /grub/stage1
You will get (hdX, Y) as output (in my case (hd3, 0))
  • Set the root device
grub>root (hdX, Y) (substitute X, Y with ones you got in above step)
  • Install grub
grub>setup (hd0)
  • Exit grub prompt
grub>quit

Now reboot and you will have working grub (with all the OSes detected automatically)
This always works for me so i haven't ever tried following steps but for some reason you don't get Windows option in your grub menu. Here are the steps (explained at source page of this post):
  • Log in to your Ubuntu and then open terminal and enter:
sudo gedit /boot/grub/menu.lst (use gedit/vi/kate whatever you like)
  • If there is no Windows paragraph as shown below put one as it is
(IMP: Put your Windows paragraph before or after AUTOMAGIC KERNEL LIST in the menu.lst )
title Windows XP/Vista # You can use any title you wish, this will appear on your grub boot menu
rootnoverify (hd0,0) #(hd0,0) will be most common, you may need to adjust accordingly
makeactive
chainloader +1

P.S. sentences followed by # are comments

Thats all and you have everything working smoothly :)
This solution was posted at:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows (last checked March2nd, 2009)