Fixed Problem occured in my Ubuntu 10.04

Hello Friends,

Yesterday due to power cut, my computer powered off suddenly. Absence of UPS & Improper Shutdown makes my system to problem. When i tried to boot in Ubuntu 10.04 it has provided some errors like:  😯

failed: Invalid argument
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target file system doesn’t have /sbin/init
No init found. Try passing init= bootargBusybox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu7) built-in shell (ash)
Enter ‘help’ for a list of built-in commands
(initramfs) _

Here the cursors blinked for user input, i couldn’t use any commands there. Obviously some inbuilt commands are worked but it is not useful to recover that problem.

💡 I thought that we can clear the problem by checking the file system. On that time I had only Ubuntu 10.10, so boot that as live cd. I did the fsck command it also threw some errors

e2fsck 1.41.12 (17-May-2010)
fsck.ext4: Device or resource busy while trying to open /dev/sde1
Filesystem mounted or opened exclusively by another program?

I was totally helpless at that position, later i  googled for 1 hour. At the time of morning 2’0 clock, i got the solution that Ubuntu 10.10 is having a Bug on fsck command. So, it wont works in some cases after seeing that i was reluctance. x-(

Then i copied Ubuntu 9.10 in CD and booted as Live CD. Fixed my problem with fsck command.

The Command which i used is…

$ sudo fdisk -l

(For Selecting the Filesystem, partition will be in this format Ex: /dev/sda)

$ sudo fsck -f /dev/sda

(filesystem check on filesystem partition no. -f is used for force checking)

Now, it will prompt for <y>Yes? to fix problem give yes to all continuously until the command stop prompting input from user.

$ sudo fsck  -f -y /dev/sda

(-y is used for automating yes, it assigns yes to all…Silent Mode)

Now my system is working perfect 🙂

Thank You. 🙂

With Regards,
V. Balakrishnan.

 

Advertisements

Added Tamil Keyboard Layout in Ktouch

Hi Friends,

Recently I heard about ktouch Typing Tutor also installed it. Shrini Anna tolde me to explore Ktouch, I saw the absence of Keyboard Layout for Tamil in Ktouch. So I decided to create a layout for Tamil and add in to Ktouch. I successfully did the job. Ktouch is a KDE-Edu package, it is also a cross platform.

Ubuntu users Kindly go for:

$ sudo apt-get install ktouch

You can download the tamil layouts which is created by myself from this link… http://ubuntuone.com/p/zJN/ 

Screen shots of  Tamil Keyboard Layout

In this Layout, English Characters are also visible for user Convinience (File name for this layout : ta-eng.keyboard.xml)
tamil english layout

In this layout only tamil letters are visible to the users (File name for this layout: tamil.keyboard.xml)

tamil layout

With the help of Ktouch we can practice and improve our typing skill.

Before we going to learn tamil typing, We have to first add keyboard layout in our ubuntu machine. If you need help on adding the Keyboard Layout in Ubuntu kindly go here…

Instructions to Getting Started in Ktouch:

Hope that you have already downloaded that tamil keyboard layouts for Ktouch from this link http://ubuntuone.com/p/zJN/

After Extracting tar.gz file you have Two Directories, One directory consists of Typing Exercises and Another one is Tamil Layouts. I would like to Thank Shakthi Kannan because i got the typing exercises from his site which is http://www.shakthimaan.com/ta/downloads/computer/typing-1.0.tar.bz2

Now, Copy   ta_eng.keyboard.xml, tamil.Keyboard.xml files and Paste into /usr/share/kde4/apps/ktouch you will get these directories after installing Ktouch. Make sure that you having sudo permission to copy in that folder.

To Open KTouch : Applications – > Education – > KTouch

To select the tamil layout : Settings – > Keyboard Layouts – > Tamil Eng(ta (Tamil))

To Start the practice : File – > Open Plain Text File… – > lesson-1.txt (You can get this file from the tar.gz file)

Why still waiting? Start to learn Tamil Typing…. 🙂

Thank You.

With Regards,
V. Balakrishnan.

Adding Tamil Keyboard Layout in Ubuntu

Hi Friends.

We can type Tamil as well as English in our Ubuntu by simply adding a Keyboard layout. To Add the Keyboard Layout follow as steps:

Here i Showed for Ubuntu 10.04

Step : 1 Choose System -> Preferences -> Keyboard. Keyboard Preferences Window will be opened.

step1

Step : 2 In Second tab ( Layouts Tab). Click “Add…” Button.

step2

Step : 3 Choose a Layout Window will be opened. We can select our Tamil language in two ways. First Way is choosing By Country (First Tab) as India in the Drop Down Box. Another way is choosing By Language(Second Tab) as Tamil in the Drop Down Box. Then For Vairants: Go for India Tamil Unicode

step3

Step : 4 Click “Add “ to Enable the Tamil Keyboard Layout.

Step : 5 In the Notification area an Intimation mark USA will be created as shown in the picture.

step5

Step : 6 We can toggle the Keyboard Layout by clicking over on the USA

Additional Information:

To Change the English and Tamil Keyboard layout using Short cut key. In the Layouts Tab Click “Options…” a Keyboard Layout Options Window will be opened in that Go for Ninth Option expand that option and check for your convenient Shortcut key. After then you toggle from one layout to another layout with the help of short cut key.

தமிழை டைப் செய்து பழக வாழ்த்துக்கள்.

தமிழ் வாழ்க! தமிழ் வளர்க!!

நன்றிகளுடன்,
பாலா 🙂

PYGTK Simple Tasks

Hi to all,

A long ago Raji akka teached pygtk to us, also i learned pygtk with eager at the time. But after that i didn’t worked it out regularly, fortunately i had to do some simple task in pygtk, I started it from scratch finally i did one Hello World program and Simple currency converter. May be these programs are simple, but it shows i too know pygtk 😉

1. Hello World program

#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk

class HelloWorld:
    def hello(self, widget, data=None):
        print "Hello World"
    def delete_event(self, widget, event, data=None):
        print "delete event occurred"
        return False
    def destroy(self, widget, data=None):
        print "Completely quit"
        gtk.main_quit()
    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.connect("delete_event", self.delete_event)
        self.window.connect("destroy", self.destroy)
        self.window.set_border_width(50)
        self.hobox = gtk.HBox(False, 0)
        self.window.add(self.hobox)
        self.b = gtk.Button("Hello World")
        self.b.connect("clicked", self.hello)
        self.hobox.pack_start(self.b, True, False, 0)
        self.b.show()
        
        self.a=gtk.Button("    Exit   ")
        self.a.connect("clicked", self.destroy)
        self.hobox.pack_start(self.a, True, False, 0)
        self.a.show()
        
        self.hobox.show()
        self.window.show()
    def main(self):
        gtk.main()
if __name__ == "__main__":
    hello = HelloWorld()
    hello.main()

Here is the screen shot:

 

To get the output…………?

* Copy and paste the code in text editor.

* save the filename with .py extenstion

* run the file with the following command in terminal python filename.py

* You will get a window like above 🙂

2. Simple Currency Converter:

import pygtk
pygtk.require('2.0')
import gtk
class Conversion:
    def convert(self,widget):
        self.t1=self.text1.get_text()
        self.val=int(self.t1)
        self.vali=self.val*44.75
        self.text2.set_text(str(self.vali))
        self.vale=self.val*0.68
        self.text3.set_text(str(self.vale))
    def delete_event(self, widget, event, data=None):
        print "delete event occurred"
        return False
    def destroy(self, widget, data=None):
        print "Completely quit"
        gtk.main_quit()
    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.connect("delete_event", self.delete_event)
        self.window.connect("destroy", self.destroy)
        self.window.set_border_width(60)
        table=gtk.Table(4, 2, True)
        self.window.add(table)
        self.label1=gtk.Label("Enter USD Amount: ")
        table.attach(self.label1, 0, 1, 0, 1)
        self.label1.show()
        self.text1=gtk.Entry(0)
        table.attach(self.text1, 1,2,0,1)
        self.text1.show()
        self.label2=gtk.Label("Indian Value Is (INR): ")
        table.attach(self.label2, 0,1,1,2)
        self.label2.show()
        self.text2=gtk.Entry(0)
        table.attach(self.text2, 1,2,1,2)
        self.text2.show()
        self.label3=gtk.Label("Euro Value Is (EUR): ")
        table.attach(self.label3, 0,1,2,3)
        self.label3.show()
        self.text3=gtk.Entry(0)
        table.attach(self.text3, 1,2,2,3)
        self.text3.show()
        self.but1=gtk.Button("Convert")
        self.but1.connect("clicked",self.convert)
        table.attach(self.but1,0,1,3,4)
        self.but1.show()
        self.but2=gtk.Button("Quit")
        self.but2.connect("clicked",self.destroy)
        table.attach(self.but2,1,2,3,4)
        self.but2.show()
        table.show()
        self.window.show()
    def main(self):
        gtk.main()
        
if __name__ == "__main__":
    conversion = Conversion()
    conversion.main()

Screen shot :

To get the output…………?

As mentioned above do it here also.

* Copy and paste the code in text editor.

* save the filename with .py extenstion

* run the file with the following command in terminal python filename.py

* You will get a window like above 🙂

It will help to beginner to learn pygtk.

Thank You

With Regards,
V. Balakrishnan.