Skip to main content

Posts

Showing posts from May, 2007

Backspace and Delete keys problem in vim

When I press arrow,backspace,del buttons in text editor, I expect something like "backspace" deletes the character to the left[of the cursor], "delete" deletes the character to the right and "arrow" should move cursor to correct direction in document. Since I move to Feisty Fawn. I just notice that Backspace and Delete Keys are not act as it should be in VIM editor e.g. , In insert mode, the arrow buttons will insert the letters A, B, C, D each followed by a CR. If I press backspace, the cursor moves back, but the letter doesn't go away. Also delete button will deletes all letters that on the right of cursor and change case of previous letter. Below is a pic when I type up, down, right, left, some text, backspace and del [Some web said] "backspace key" will sent ASCII character 8[decimal] and "delete key" sent 127[decimal] [try man ascii for a list of the ASCII characterset]. The backspace key also has the representation ^H [Ctrl-H]

Firewall with iptables

This post is how to set iptables rule as a linux firewall to avoid brute force attack. Few days ago on my old fedora core4 server, When I monitored in /var/log/messages to verify does my cronjob still running? I found something like.. May 23 15:04:18 fedev sshd(pam_unix)[6037]: check pass; user unknown May 23 15:04:18 fedev sshd(pam_unix)[6037]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=adsl-70-248-31-102.dsl.snantx.swbell.net May 23 15:04:23 fedev sshd(pam_unix)[6040]: check pass; user unknown May 23 15:04:23 fedev sshd(pam_unix)[6040]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=adsl-70-248-31-102.dsl.snantx.swbell.net May 23 15:04:29 fedev sshd(pam_unix)[6043]: check pass; user unknown May 23 15:04:29 fedev sshd(pam_unix)[6043]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=adsl-70-248-31-102.dsl.snantx.swbell.net and in /var/log/secure May 23 15:04:15 fedev sshd[6035]: Failed password for invalid user develop fro

chm file in ubuntu

To open chm file in ubuntu, you need need to install gnochm[for ubuntu] or kchmviewer[for kubuntu]. Packages are already in repos. pnix@pnix-a7n:~$ sudo aptitude install gnochm Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Building tag database... Done The following NEW packages will be automatically installed: libchm1 python-chm The following NEW packages will be installed: gnochm libchm1 python-chm 0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 210kB of archives. After unpacking 1077kB will be used. Do you want to continue? [Y/n/?] y Writing extended state information... Done Get:1 http://th.archive.ubuntu.com feisty/universe libchm1 2:0.39-2 [28.0kB] Get:2 http://th.archive.ubuntu.com feisty/universe python-chm 0.8.4-0.1 [34.5kB] Get:3 http://th.archive.ubuntu.com feisty/universe gnochm 0.9.9-0ubuntu1 [147kB] Fet

No miracle at Athen.

"We can be proud of ourselves. We've done so well getting to the final and I know we'll play in another one of these finals," said Gerrard.(from BBC Sport ) Last night I watched this match until 4AM(Bangkok time) and felt that it's not liverpool's day. Red had more chances in first half but couldn't turn it to score furthermore Milan's goal from Inzaghi's deflection on injury time(a bit of luck IMHO) change rest of the match. Second half was now easily for MILAN hold the ball, wait for second goal and it's come. Liverpool's consolation goal from kuyt bring me some hope but no miracle at athen. Anyway Final Score UEFA Champions league 2007 AC MILAN 1 - 0 LIVERPOOL

IE6 on Ubuntu[Feisty Fawn]

Another thing on XP that I still need is IE. coz my internet banking use VBScripts that not allow on firefox. So .. if !(already_have_wine_on_Feisty()) read_this_first() ; else{ //install cabextract, download IEs 4 Linux and install pnix@pnix-a7n:~$ sudo apt-get install cabextract pnix@pnix-a7n:~$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz pnix@pnix-a7n:~$ tar zxf ies4linux-latest.tar.gz pnix@pnix-a7n:~$ cd ies4linux-* pnix@pnix-a7n:~$ ./ies4linux } ref: ies4linux

How I deal with linux agp interrupt problem on A7N8X-E

My box use asus motherboard[a7n8x-e] with asus agp card[n6200d]. Yes, it work great on windows but A7N8X-e acpi bios or acpi module on linux bring me a lot of problem. I can't remember how many attempts I try to get nvidia linux driver work with a7n8x-e and n6200td card. Every time I try will end with (EE) NVIDIA(0): The NVIDIA kernel module does not appear to be receiving (EE) NVIDIA(0): interrupts generated by the NVIDIA graphics device. (EE) NVIDIA(0): Please see the FREQUENTLY ASKED QUESTIONS section in the (EE) NVIDIA(0): README for additional information. (EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device! (EE) NVIDIA(0): *** Aborting *** (II) UnloadModule: "nvidia" (EE) Screen(s) found, but none have a usable configuration. Xwindow go to black screen. This error, from faq and in my understand, is dealing with agp interrupts and the answer(w/o any bios update from asus) should be something between acpi=off noapic pci=biosirq pci=noacpi irqpoll After so

Adding new partition to Ubuntu(UUID in fstab)

Last night,on my dual boot machine, I formated old ntfs partition to fat32 partition(in XP). After reboot to Feisty, it can't mount that partition anymore. I edited /etc/fstab by changed ntfs to vfat not work. I notice that fstab file in Feisty, the field /dev/abcd have changed to UUID=xxxx. I try google it and found some info. UUID(Unique unit ID) came since edgy I guess(I never try edgy at all). Some reason to use UUID are a)Disk labels aren't guaranteed to be unique. b)The kernel's device paths aren't constant enough -- move your SCSI interface card to a different slot and system doesn't boot any more. c)Device names aren't constant either -- they depend on module load order. To find out the UUID, use the following command $ /sbin/blkid or $ sudo vol_id -u device

Football Manager on Ubuntu

Yesterday I posted like no way to play FM2007 on linux. That's not true and it's my fault. Today I just found that many guys can play FM2007 on their linux box with wine. Here is how i install FM on Feisty. Software require jre [windows version to install under wine] FM2007 CD file I've been downloaded FM2007 from bittorrent last year as bin/cue file. So first, I convert it to iso then mount to dir pnix@pnix-a7n:/media/hda5/downloads$ sudo aptitude install bchunk Password: Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Building tag database... Done The following NEW packages will be installed: bchunk 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 13.5kB of archives. After unpacking 69.6kB will be used. Writing extended state information... Done Get:1 http://th.archive.ubuntu.com feisty/universe bchunk 1.2.0-

Windows app on Ubuntu[Feisty Fawn]

Although I rarely run Windows these days [still use for FM2007], others Windows programs I prefer to run with Wine on my Ubuntu.I'm not try VMWare yet because I worry about system resource. Installing Wine Add extra repos. deb http://wine.budgetdedicated.com/apt feisty main Add the repository key, get package cache update and install Wine. pnix@pnix-a7n:~$ wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add - OK pnix@pnix-a7n:~$ sudo aptitude update Get:1 http://th.archive.ubuntu.com feisty Release.gpg [191B] . . Fetched 50.1kB in 11s (4212B/s) Reading package lists... Done pnix@pnix-a7n:~$ sudo aptitude install wine alltray Reading package lists... Done . . Setting up alltray (0.69-1) ... Setting up wine (0.9.36~winehq0~ubuntu~7.04-1) ... pnix@pnix-a7n:~$ Note: alltray is for dock app icon on system tray. Install Windows apps get e

Ubuntu Mobile and Embedded Edition

"At the heart of the Ubuntu project lies a belief that open source software and technology can play a key role in enabling individuals to achieve their potential. A central goal has been the creation of a world-class, free and open source operating system that we have worked to make accessible across notebooks, desktops, thin clients and servers. Three years on, it is clear that new types of device - small, handheld, graphical tablets which are Internet-enabled are going to change the way we communicate and collaborate. These devices place new demands on open source software and require innovative graphical interfaces, improved power management and better responsiveness. Intel, specifically, have announced a new low-power processor and chipset architecture which will be designed to allow full internet use on these mobile Internet devices. To fulfil the aims of our mission and in response to the technical challenges that these devices pose, we are announcing the Ubuntu Mobile and

How to make Firefox2 to open link in new tab

After upgrade to Feisty Fawn, one thing that's annoyed me is opening a link in new tab need to right click. Here is how to "force link that open new window to open in new tab". Open your firefox to about:config then set browser.link.open_external -> 3 browser.link.open_newwindow -> 3 browser.link.open_newwindow.restriction -> 2 that's it.

Sil3112 v4.2.83 SATA bios for A7N8X-E

== this post is specific for my case[Asus A7N8X-E Deluxe with Seagate SATA2] == What's happens before? After try many options in bios, grub. I found the way to install winxp on SATA2 and A7N8X-E. To enable booting winxp from bios, I need to flash neoplus mod bios, link below. Asus A7N8X-E Deluxe 1013 BIOS with added v4.2.83 Sil3112 (SATA) BIOS by NeoPolus (based on Trats BIOS) This bios come with new SATA bios(v4.2.83) make xp installation go smooth but afterthat I can't restore grub . Very strange, even I try to reinstall ubuntu. Live cd's not recognize prepartition on the drive. Actually I have sda1 is winxp(just install it),sda5 is ext3(/),sda6 is swap and sda7 is data(ntfs).All partition can be seen in winxp but for live cd the drive appear as a 80GB drive no partition on it. UPDATE[10/05/2007]: Last night I use Computer management in xp to see partition table on SATA drive and found that there is something wrong i.e. look like it has 25GB excess free space go between

Apache Harmony - Open Source Java SE

Apache Harmony, previously made available as "snapshot r533500", announce the first stable build "5.0 M1". Apache Harmony is the Java SE project of the Apache Software Foundation. The aim of the project is to produce a large and healthy community of those interested in runtime platforms tasked with creation of: * A compatible, independent implementation of the Java SE 5 JDK under the Apache License v2 * A community-developed modular runtime (VM and class library) architecture. support platforms download

Dual boot,A7N8X-E,SATA,WINXP and me

Last week, I’ve got serious problem with my system at home. It has 2 drives, ide and sata. The ide one(4 years old), used as system drive,'s partition table was crash. The last environments before it crashed are Ide drive's 4 partitions. hda1 is winxp(ntfs,loss partition table),hda5 is data(ntfs,loss partition table),hda6 is ubuntu /(fine) and hda7 is swap(fine). Sata drive's 3 ntfs partitions (sda1,5,6) all fine and its store movies and programs I've downloaded from bittorrent. Motherboard is ASUS A7N8X-E Deluxe with Sillicon SATA chip(Sillicon 3112a I guess) Ubuntu on hda6 still can boot. I have some data on hda5 need to restore(with 'EasyRecovery', it works great, restores everything as the same folder structure.). My plan is reinstall both XP and ubuntu on SATA drive, use last partition on SATA to store importance data. For old 60 GB IDE, I will use as download drive store data downloaded from bittorrent network. I have followed other instructions found o

Fowler missed Penalty Shootout in Champions League Semi-Finals

Match Stat Match fact Liverpool reach UEFA Champions League final second time in three seasons. Liverpool win 1:0(Agg. 1:1), scored by Daniel Agger in the 22nd minute. Liverpool almost get second goal by Kuyt header(denied by bar). Dirk Kuyt should end the game in extra time first half(denied by line man). Pepe reina is incredible in the two saves in penaty shootout. Robbie Fowler miss his penalty shootout(denied by Robben and Geremi)..ha ha.

Collector class in java

Arrays, in java language, has fix size, member must be same type. We must known size of it before create array. This post is note about some collector classes in package java.util Vector will use to collect 'instance of class', can vary size, member doesn't need to be same type. Vector use much memory, not suitable to store or transfer over network. So use Vector to store data, after finish change Vector to Enumeration by Enumeration e = v.elements(); Stack is order oriented data structure i.e. 'pop' and 'push' data from one side of stack. It based on the principle of Last In First Out. Member in stack must be instance of class like vector, data in primitive type need to change to be instance of 'type wrapper class' before pop into it. example import java.util.*; class StackTest1 { public static void main(String[] args) { String t[] = {"Hello", "how", "do", "you", "do?"}; Stack s