Skip to main content

Posts

Arduino on Karmic Koala

To use arduino on karmic koala, first we need to install required package e.g. gcc-avr and jre[here i use jdk instead] pnix@x300:~$ sudo aptitude install gcc-avr sun-java6-jdk Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done The following NEW packages will be installed: binutils-avr{a} gcc-avr gsfonts-x11{a} java-common{a} odbcinst1debian1{a} sun-java6-bin{a} sun-java6-jdk sun-java6-jre{a} unixodbc{a} 0 packages upgraded, 9 newly installed, 0 to remove and 0 not upgraded. ... Initializing package states... Done Writing extended state information... Done pnix@x300:~$ then get latest version of arduino ide, extract and run. pnix@x300:~/Downloads$ wget http://arduino.googlecode.com/files/arduino-0017.tgz --2009-12-22 23:05:34-- http://arduino.googlecode.com/files/arduino-0017.tgz Resolving arduino.googlecode.com... 209.85.231.82 Connecting to arduino.googlecod...

Fixing libstdc++5 Problem in Ubuntu 9.10

Trying to run X-lite on Karmic Koala[ubuntu 9.10] give me 'error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory' as you see below. pnix@trinity:~/Downloads$ wget http://counterpath.s3.amazonaws.com/downloads/X-Lite_Install.tar.gz --2009-12-11 02:08:02-- http://counterpath.s3.amazonaws.com/downloads/X-Lite_Install.tar.gz Resolving counterpath.s3.amazonaws.com... 72.21.202.96 Connecting to counterpath.s3.amazonaws.com|72.21.202.96|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2094582 (2.0M) [application/x-gzip] Saving to: `X-Lite_Install.tar.gz' 100%[======================================>] 2,094,582 90.1K/s in 25s 2009-12-11 02:08:32 (83.2 KB/s) - `X-Lite_Install.tar.gz' saved [2094582/2094582] pnix@trinity:~/Downloads$ tar xzf X-Lite_Install.tar.gz pnix@trinity:~/Downloads$ ls X-Lite_Install.tar.gz xten-xlite pnix@trinity:~/Downloads$ cd xten-xlite/ pnix@trinity:~/Download...

monitor your filesystem events with inotify-tools

I looking for the way to mirror files on my server to others when something're updated and found that inotify is a good idea in this case. Thanks for inotify-tools project, c library and set of command line programs for linux provide interface to inotify, that let me avoid from c code. On ibex, i get it by.. pnix@pnix-a7n:~$ sudo aptitude install inotify-tools [sudo] password for pnix: Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done The following NEW packages will be installed: inotify-tools libinotifytools0{a} 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 39.0kB of archives. After unpacking 201kB will be used. Do you want to continue? [Y/n/?] y ... Writing extended state information... Done pnix@pnix-a7n:~$ Below is example shell script i use to moniter and update file to remote host . #!/bin/bash while inotifywait -r...

Many sound problems on Intrepid ibex

I upgrade two ibex last night and found few sound problems below First, on video file(mpg,avi ..), when right click and choose >open with >mplayer. will bring up error " [AO_ALSA] Unable to find simple control 'PCM',0 ". I'm not sure what it is, maybe the config just is not right but I fix this by right click on movie window-> preference then on audio tab, select 'Enable Software Mixer'. [or you can do this by change 'softvol = "no"' to 'softvol = "yes"' in $HOME/.mplayer/gui.conf] Another sound issue is flash player on web[like youtube] not play sound. /var/log/message said pnix@pnix-a7n:_NHDT392$ tail -f /var/log/messages ... Nov 2 00:33:14 pnix-a7n -- MARK -- Nov 2 00:40:51 pnix-a7n pulseaudio[23941]: sink-input.c: Failed to create sink input: too many inputs per sink. Nov 2 00:40:51 pnix-a7n last message repeated 31 times Nov 2 00:40:51 pnix-a7n pulseaudio[23941]: protocol-native.c: Warning! Too many con...

Fixing shutdown problem in hardy

For a long time my ubuntu box can't shutdown properly(not sure when this start to happen may be since upgrade to gusty). Shutdown progress bar will stop running, harddrive already stop spinning and hang. I guess it because my kernel option "acpi=off nolapic irqpoll" in /boot/grub/menu.lst without these option shutdown script work perfect. So, why i need that?? I just found the way to fix this from ubuntuforums. This is not new, many guy has this problem and it fixed. To solve this problem [for me] 1.add "apm=power_off" to kernel option. 2.add "apm power_off=1" to /etc/modules Reboot and try shutdown again this time it work perfect.

Bootchart on Ubuntu hardy

Today I'm searching for a way to make my box boot up faster and found this tool. Bootchart can use for analyze and visualization boot process. To install bootchart. pnix@pnix-a7n:~$ sudo aptitude install bootchart 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: librsvg2-bin The following NEW packages will be installed: bootchart librsvg2-bin 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 121kB of archives. After unpacking 324kB will be used. Do you want to continue? [Y/n/?] y Writing extended state information... Done Get:1 http://mirror1.ku.ac.th hardy/main librsvg2-bin 2.22.2-2 [21.3kB] Get:2 http://mirror1.ku.ac.th hardy/main bootchart 0.9-0ubuntu7 [99.8kB] Fetched 121kB in 1s (90.6kB/s) ... Building tag database... Done...

Setup MySQL with Ofbiz

Download ofbiz weekily build and extract it somewhere you want. From your ofbiz directory, edit file entityengine.xml in framework/entity/config add new datasources below localmysql datasource part <datasource name="custommysql" helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" field-type-name="mysql" check-on-start="true" add-missing-on-start="true" check-pks-on-start="false" use-foreign-keys="true" join-style="ansi-no-parenthesis" alias-view-columns="false" drop-fk-use-foreign-key-keyword="true" table-type="InnoDB" character-set="latin1" collate="latin1_general_cs"> <read-data reader-name="seed"/> <read-data reader-name="seed-initial"/> ...