Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

Sunday, September 06, 2009

#twittbkk3

วันนี้ได้ไปร่วมงาน twittbkk3 มา อันเป็นงานที่รวมตัวคนใช้ Twitter ในประเทศไทย เพิ่งเคยได้ไปร่วมงานนี้ เนื่องจากตอนที่จัดงานนี้สองครั้งแรก เราดันไม่อยู่ในประเทศไทย...

ทราบรูปแบบงานสองครั้งแรกจาก @phisite ว่า มันเคยมีคนร่วมงานประมาณ 20-30 คน มากินข้าวพูดคุย ทำความรู้จักกัน แต่ปีนี้ twitter ดังเปรียงปร้างเนื่องด้วยตกเป็นเครื่องมือทางการเมืองของ ท่านผู้นั้น อีกทั้งมันเริ่มฮิตราวกับ virus infection จึงเกิดปรากฏการณ์การมารวมตัวกัน ณ ที่จัดงานเกือบ 300 คน!! (อะไรกันเนี่ย!!)

การจัดงานปีนี้ประกอบด้วย sponsors มากมาย (ดูรายนาม Sponsors ที่ twitthai) รวมทั้งเจ้าใหญ่ๆ อย่าง Dell ที่นำ Dell Mini 9 + 3G และ Latitude มาให้ผู้ร่วมงานได้ประมูลกัน โดยรายได้มอบให้ มูลนิธิเพื่อนช้าง (ขอบคุณ @DellThailand และ Coke ซึ่งบริการเครื่องดื่มฟรีตลอดงานและมีไอเทมร่วมประมูล (รายได้ให้มูลนิธิฯ เช่นกัน) งานนี้คนเหนื่อยสุดคงเป็น @molek ที่แม่งทำทุกอย่างจนงานนี้เสร็จจนได้

วันนี้ออกมาจากศิริราข เนื่องจากแม่ยายไปผ่าเข่าสองข้าง เลยต้องเฝ้ากับ @primmy เมื่อคืนก่อน ออกมาถึงมาตามทางปกติ ผ่านเข้าเอกมัย มาถึงหน้าร้าน เลี้ยวเข้าไป ปรากฏว่า ไม่มีที่จอด = =' เลยขับรถกลับไปจอดที่ Carrefour อ่อนนุช แล้วขึ้นรถไฟฟ้ามา ลงเอกมัยแล้ว เดินเข้าไป ... (#เข้าขั้นบ้าแล้วนะ) จนถึงเอกมัย 28...

มาถึง... @sugree ก็ลงเวทีไปแหล่ว เซ็นชื่อ รับเสื้อเสร็จเดินเข้าไป รับ Coke 1 ขวด เจอ @molek ตบหัว 1 ทีแล้วถามสารทุกข์สุขดิบ @molek แนะนำ @obchoey ตัวจริงเสียงจริง, @sexdrum และคนอื่นๆ ซึ่งจำไม่ค่อยได้แล้ว คนมันเยอะ ต่อมา หันหน้ามาเจอ @escribitionist ถ่ายรูปแล้วทวีตหนึ่งที คุยๆ กันเรื่อง twitter machine ราคามหาโหดกันนิดหน่อยแล้วก็ยืนหันไปหันมาเดินไปเดินมาแล้วก็ออกมาด้านหลัง พบ @sugree, @markpeak, @phisite, @lewcpe ยืนคุยกันแป๊ปๆ ก็ทวีต แป๊ปๆ ก็ทวีต เป็นเหมือนกันทุกคน จนกระทั่ง ได้เวลา @celerachan มา ปรากฎว่า เกือบทุกคนหันไปถ่ายรูป แล้วก็ ทวีต (จะอะไรกันนักกันหนาวะ) - -' แล้วก็เจอ @thanr กับ @poakpong ซึ่งถือกล้องถ้ำมอง คอยถ่ายรูปสาวๆ ตลอดเวลา

หลังจากนั้นเป็นรายการบนเวทีที่เหลือคือ @rawitat ขึ้นมาพูดเรื่อง #usermindset ซึ่งเรียกทั้งเสียงฮาและความสะใจจาก developers ทั้งหลาย ตอนนั้น เดินเข้าไปไม่ค่อยได้คนเยอะ เลยได้แต่ยืนฟังรอบนอก... ถ้าใครอัด vdo ไว้ช่วย post ด้วย

รายการสุดท้ายเป็นการแสดงดนตรีของวง iHear~ มีคุณ @iMenn ร้องนำตาม vdo นี้



แล้วตามด้วยความบ้าบอคอแตกอีกพอสมควร ให้ได้กรี๊ดกัน ช่วงนี้เกาะที่นั่งแถวๆ @celerachan กับ @mitnoi (ที่มาปล่อยของ) กับ @bank_xavi ก่อนแยกย้ายกันไปต่อ ตอนหกโมง

สรุปงานนี้ สนุกดี คนเยอะ, sponsor เยอะ, pretty เยอะ, ฮา และดูเป็นงาน organised มากกว่าเป็นงานทำความรู้จักกัน มีการ present บนเวที ราวกับเป็น barcamp อีกงาน ผู้ร่วมงานเท่าที่เห็นก็ดูมีความสุขดี และคงอยากกลับมาร่วมงานอีก (twitter มันเสพติด :P)

สัจธรรมที่ได้จากงานนี้ (tweet ไปแล้ว)
  • ทุกคนที่มางานนี้ก้มหน้าก้มตาทวีตมาก มากจนสังเกตได้ คนพูดบนเวทีก็พูดไป คนดูก็ดูกับทวีตสลับกัน สมกับเป็น twittbkk
  • การมี conversation สั้นมาก คุยกับ @sugree ไม่เกินสองสามนาทีแล้วต่างคนก็ต่างทวีต แล้วก็เงยหน้าขึ้นมาคุยกัน แล้วก็ลงไปทวีต เป็นแบบนี้สลับกันไป เริ่มคิดแล้วว่า มันเกินไปหรือเปล่า แต่ก็หยุดไม่ได้... - -'
  • งานนี้ Mac โคตรเยอะ จนสงสัยว่า Apple แม่งน่าจะจ่ายค่า sponsor ด้วย :P
  • งานนี้เป็นงานที่รวม smartphone เยอะมาก มีทุกรุ่น ไม่มีโทรศัพท์ที่ทวีตไม่ได้ คาดว่า คราวหน้าลองไปหา htc/Samsung/LG/Wellcome/Nokia/G-net/น้องปอย มาเป็น sponsors บ้างดีมั้ย?
  • ผู้คนอยากถ่ายรูปกับ @sugree มากราวกับ @sugree เป็นหมีแพนด้า?
รูป? ก็เป็นรูปที่ทวีตไปหมดแล้ว ลองตามไปดูได้ที่ twitgoo (ขี้เกียจแปะ)

Tuesday, June 16, 2009

iWork'09

I just want to catch the stream of using licensed software (see Plynoi), in this case, iWork ’09.

I’d bought this with my Macbook in Australia (just A$89 from A$129, so cheap!) but never opened it until I came home. This software package comprises of word processor (Pages), spreadsheet (Numbers) and presentation (Keynote) components. It works well with Thai language, except the annoying backspace which deletes both normal, upper as well as lower level characters at the same time and occurs with every single program that use Apple input method (Firefox is not the case).

Saturday, August 23, 2008

Mix blogging

ดอง blog มาเป็นเวลานานมาก เดี๋ยวขอทดไว้ก่อนว่าช่วงที่ผ่านมาทำไรไว้มั่ง ถ้ามีอารมณ์อยากเขียนก็จะเขียน

เรื่องแรกเกี่ยวกับงานที่ทำที่ Monash เรื่องเกิดจากการที่ต้องไปทำงานเกี่ยวกับ student administration ไม่ได้หรูอะไรมาก จริงๆ คือไปตามเก็บรวบรวมรายงานแล้วก็ส่งให้ผู้สอนเอาไปตรวจให้คะแนนต่อไป แล้วก็รับกลับมาเพื่อส่งคืนให้นักเรียนต่อไป เรื่องคือ ดันไปทำรายงานหายระหว่างการขนส่ง (ไม่รู้ตรงส่วนไหน) เนื่องจากไม่ได้มีขั้นตอนการตรวจสอบที่เป็นขั้นตอน แถมเอกสารกองท่วมโต๊ะอยู่ ดีที่ไม่เกิดเรื่องอะไรขึ้นมามาก (แค่ให้นักเรียนส่งรายงานมาใหม่ และไม่มีการปรับโทษคะแนน) เลยต้องพัฒนะระบบการตรวจสอบไว้ก่อนที่มันจะเกิดเรื่องอีก พูดเหมือนหรู จริงๆ คือสร้าง worksheet ไว้บน Excel แค่นั้นแหละ เพื่อเอาไว้ตรวจว่ารับรายงาน ส่งรายงาน ปรับเรื่องสาย หรือมีรายการยืดการส่งรายงาน

ทีนี้เราเห็นว่ามี barcode scanner อยู่ตัวนึงวางอยู่จนฝุ่นจับ แล้วรายงานนักเรียนที่ส่งก็จะต้องมีใบปะหน้าซึ่งมี barcode แทนหมายเลขประจำตัวของนักศึกษาอยู่ด้วย ก็คิดว่ามันควรจะมีโปรแกรมอะไรซักอย่างเพื่อใช้งานตรงนี้ (ไม่งั้นมันจะมี barcode ทำปร๊ะอะไร) ก็เลยไปถามผู้เกี่ยวข้อง ปรากฏว่า มันไม่ได้มีโปรแกรมอะไรเลย!!! เอาไว้ลง ID ของนักเรียนใน Excel (มันมี barcode ไว้ทำปร๊ะจริงๆ ด้วย - -') เอาหละ ด้วยเหตุนี้ เริ่มเห็นว่ามันเป็นอุปกรณ์ที่ไร้ประโยชน์ เริ่มเห็นว่ามันเป็นโอกาสในการพัฒนาอะไรซักอย่างขึ้นมาเพื่อให้สามารถทำงานได้สะดวกขึ้นกว่าการนั่งกด Find แล้วใส่อะไรลงไปใน cell เพื่อเช็ครายงาน นั่นคือ เอา barcode scanner ตัวนี้มาใช้ให้มีประโยชน์มากขึ้น เพื่อการตรวจสอบรายงาน

โดยหลักๆ แล้ว อุปกรณ์ตัวนี้เมื่ออ่าน barcode มันจะเป็นการส่งสัญญาณแป้นพิมพ์เป็นตัวเลขที่อ่านได้จาก barcode แล้วตามด้วยการกด Enter (หรือ carriage return) ตัวอย่างเช่น ถ้าใช้ scanner อ่าน barcode ในโปรแกรม notepad มันก็จะพิมพ์เลขของบาร์โค้ดออกมาแล้วขึ้นบรรทัดใหม่ เราก็ใช้ตรงจุดนี้มาผนวกกับ Excel ด้วย VBA ซะ (ลงทุนซื้อ Excel VBA programming for Dummies มาอ่านเลยนะ) จากที่ไม่เคยรู้อะไรเกี่ยวกับ vba เลย แต่ก็เขียนได้ด้วยความร่วมมือของหนังสือกับ Google ตอนแรกกะให้มันหาแถวของนักเรียนเพื่อใส่ "tick" เข้าไปเฉยๆ พร้อมตัวเลือกอีกสองสามอย่าง ไปๆ มาๆ feature มันเยอะขึ้นเรื่อยๆ แล้วก็ต้องตามเก็บ error handling มากขึ้นเรื่อยๆ เขียนแล้วเริ่มสับสนด้วยเหตุที่เป็นการเขียนโปรแกรมแบบไม่มีการวางแผนล่วงหน้า (เด็กๆ ไม่ควรเอาอย่างนะ) เลยเอาแค่ feature พื้นๆ พอ แล้วเอาที่ต้องการเพิ่มไปใส่ไว้ในอีกโปรแกรมแทน (simply the best) ไว้ว่างๆ จะเอา source code มาลง


เรื่องต่อมาคือ เมื่อเร็วๆ นี้ bid ได้จอ 24" ของ LG (L246WH-BN 1920x1200)จาก ebay มาใช้งานกับ Wii laptop ตัวเดิม บน Windows ไม่มีปัญหา ทำ Extended desktop ได้ สะดวกเวลาทำ spreadsheet ยาวๆ ทีนี้มาบน Debian ... มีปัญหา มันถือสา.. เอ้อ ไม่ใช่ละ มีปัญหาเรื่องทำ extended desktop ไม่ได้ มันแสดงผลออกมาที่ความละเอียด 1920x1200 ทั้งสองจอแบบ clone (คือมันล้นจอ laptop แบบทะลักเลย) ดูท่าทางปัญหาอยู่ที่ไดรเวอร์ของอินเทล i810 ที่ไม่สามารถรับความละเอียดของ virtual space มากๆ ได้ (รู้สึกว่าเต็มที่คือ 2048x2048 เอ๊ะหรือมันเป็นที่ chipset 82852/82855 วะ) ลองตั้งแล้ว startx ก็มืดทุกที ท่าทางจอมันจะใหญ่ไป เอาวะ ถ้างั้นก็ใช้จอ 24" อันเดียวก็ได้แล้วก็ปิดจอ laptop ซะด้วยคำสั่ง

xrandr --output LVDS --off


จบ

เรื่องถัดมา วันก่อนสั่งซื้อ CycloDS Evolution การ์ดยอดฮิตที่ให้คุณสามารถ run โปรแกรม homebrew และ rom เกม (backup หรือ เถื่อน :P) บน Nintendo DS ได้ จากเว็บเดิมที่เคยสั่ง Wii Freeloader ปรากฏว่า พอสั่งเสร็จ วันรุ่งขึ้นท่านลดราคาลงมา A$5 ซะงั้น ... แสรดดด เจ็บใจ แต่ซื้อมา run homebrew เท่านั้น (ใครจะเชื่อ) จริงๆ ลองโหลดเกมมาเล่นสองเกม คือ FF IV DS (ที่ออสมันยังไม่ออกนี่หว่า) กับ Lifesigns: Surgical Unit

FF นั้นจบไปแค่ title เดี๋ยวรอสอยของแท้ต้นเดือนหน้า แต่ Lifesigns เล่นจบบทแรกไปแล้วไม่สนุกอย่างที่คิด (ถ้ามันเป้น manga คงตามอ่าน) ไม่ซื้อละ เดี๋ยวลบทิ้ง

โปรแกรม Homebrew ที่น่าสนใจสำหรับ DS ก็ได้แก่ DSOrganize (โปรแกรม organiser/file manager), DSPaint (วาดรูปแบบสีน้ำ หรือสีน้ำมัน สามารถ playback สิ่งที่คุณวาดได้ ดูสนุกดี), moonshell media player (มันแถมมากับการ์ดทุกตัวมั้ง คงไม่ต้องบอก), Tuna-ViDS (โปรแกรมเล่นไฟล์ avi ที่ encoded ด้วย Xvid บน DS) คิดว่ามีประโยชน์กว่า moonshell ที่ไม่ต้องทำไฟล์ให้เป็น DPG แต่สุดท้ายต้อง encode ใหม่อยู่ดีเพราะไฟล์ที่มีอยู่ resolution มันเกิน พอเปิดแล้ว IO error, SvSIP (โปรแกรม VoIP บน DS) เจ๋งมาก ถ้ามี Wi-fi กับ VoIP account ของอะไรซักอันอยู่ (ดูหัวข้อถัดไป) แต่แนะนำให้ซื้อ headset เพิ่ม เพราะเสียงจาก mic ที่ตัว DS มันไม่ดีเอามากๆ ส่วนนี้ขอไม่ลงลิงก์เพราะขี้เกียจเกิน ถ้าอยากรู้ว่าหาจากไหนถาม Google เอาละกัน


อีกเรื่องคือตอนนี้ boss ไปพบ VoIP สุดถูกเข้าจาก Voipdiscount โดยช่วงนี้ถ้า register แล้วยอมจ่าย €10 (ประมาณ A$18) จะสามารถโทรฟรีกลับเมืองไทย (และอีกหลายประเทศ เช่น USA, Australia) ได้ 120 วัน หลังจากนั้นคิดอัตรา ~3 cent euro ต่อนาทีสำหรับประเทศไทยรวมทั้งโทรศัพท์บ้านและมือถือ เลยถือโอกาสทดลองใช้บน Debian ด้วย ตอน register กับเจ้านี้ต้องดาวน์โหลดโปรแกรม (Windows เท่านั้น) มาก่อนถึงจะลงทะเบียนได้ แต่หลังจากนั้นก็แค่ใส่ค่า SIP parameters ต่างๆ ที่มีให้บนเว็บลงไปในโปรแกรม client เช่น Ekiga หรือ SvSIP บน NDSL ก็สามารถโทรเข้าโทรศัพท์บ้านได้ทันที เจ๋ง ตอนใช้ SvSIP ก็กดเลขโทรศัพท์ลงไปได้เลย (เป็น international format เช่น โทรเข้าโทรศัพท์บ้านที่กรุงเทพก็ 6621234567) แต่พอใช้ Ekiga นี่งงอยู่พักนึง สุดท้ายก็ถึงได้รู้ว่า ต้องใส่ @sip.voipdiscount.com ลงไปด้วย โทรบน Debian เสียงก็ยังชัดแจ๋ว

จบดีกว่า ว่าจะสั้นๆ ไหงยาวเป็นโยชน์

Saturday, June 28, 2008

Some tips about hard disk

Just faced a 24-mount forced check by fsck today (on Debian using ext3). So I'd like to increase mount times to 2 folds before beginning the forced check. After googling around a bit, I found it here.

$sudo tune2fs -c 60 /dev/hda6


This means the maximum mount time increases to 60 times before starting the forced mount check. Anyway, it is not a good idea to disable the forced check.

Next is to find the UUID (Universally Unique Identifier) of the hard disk. It is useful to identify your hard disk regardless of order of installation. For example, if the first hard disk is sda and the second hard disk is sdb and they both have different file system. When you swab the cable (and port) this nomenclature will change and what in /etc/fstab will not work. But if the UUID is used, both hard disks are still be mounted correctly. Alright, this is how to get your UUID:


Use ls


$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2008-06-28 21:05 B628CC5228CC1373 -> ../../hda1
lrwxrwxrwx 1 root root 10 2008-06-28 21:05 bb34fd58-ca7a-499e-a74c-fe8ba771a148 -> ../../hda6
lrwxrwxrwx 1 root root 10 2008-06-28 21:05 c1fdb5ad-05d6-47f5-b6eb-852bb834df55 -> ../../hda7


or this command


$ blkid /dev/hda6
/dev/hda6: UUID="bb34fd58-ca7a-499e-a74c-fe8ba771a148" TYPE="ext3"


That's all for today...

Sunday, June 08, 2008

Life with Debian - memo

วันก่อนหาเรื่องยุ่งโดยการพยายามอัปเกรด Kubuntu Gutsy ให้เป็น Hardy โดยเริ่มจากการใช้ upgrade wizard ให้อัปเกรดผ่านเครือข่าย (เพราะโควต้าของเดือนเหลืออีกเยอะ) หลังจากทำเสร็จบูตใหม่มีปัญหาเม้าส์ใช้ไม่ได้ซะงั้น (แต่ trackpad ใช้ได้) เลื่อนตัวชี้เม้าส์ไม่ไปเอาเลย ตอนนั้นยังมึนๆ ไม่มีความคิดในการค้นหาข้อมูลอะไรเท่าไหร่ และไม่รู้ด้วยว่าเกิดจากอะไร (ตอนนี้พอคาดได้ว่าอาจเกิดจากการหันไปใช้ x.org 7.3 และเกิดความไม่เข้ากันบางประการกับ evdev เพราะตอนเปลี่ยนมาเป็น Debian ก็คล้ายๆ กัน) แต่รู้สึกว่า ถ้าใช้พวก *buntu ควรจะ out of the box เลยตัดสินใจลองลงใหม่แบบ clean install (ก็ไม่สะอาดมาก ยังเก็บพวกแฟ้มตั้งค่าทั้งหลายเอาไว้ใน /home partition) ลงเสร็จก็อัปเกรดแพ็คเกจต่างๆ ตามที่มันเตือนให้อัปเกรด เสร็จแล้วลองใช้ไป เจอปัญหาเดิม - -' แถมด้วยทีนี้ล็อกเอาท์ไม่ได้ พอล็อกเอาท์แล้วหน้าจอมืดไปเลย แต่ถ้า shutdown ไปเลยหรือ reboot ได้ตามปกติ ตอนนั้นคิดได้ว่า...

  1. ไม่น่าเลยกู ใช้ Gutsy ได้ดีๆ ไม่เอา
  2. LTS=ต้องรอไปใช้ปีหน้ารึเปล่าฟะ ชักเหมือน M$ ที่ถ้าจะเปลี่ยนจริงๆ กรุณารอ SP[123...]
  3. มีตัวอย่างเยอะแยะ เช่น Plynoi เป็นต้นทำไมไม่เชื่อมัน (เค้าว่ากาลามสูตรไง :P)
  4. ...

เป็นต้น

ทีนี้ชั่งใจอยู่นานว่าจะเอาไงกะมันดี ทั้งมีคนยุให้ลง gentoo ซะเลย แต่ก็อย่างที่บอกผมรู้สึกว่า gentoo นี่มันเสียเวลาทำมาหากิน เลยตัดสินใจลง Debian ดีกว่า หลังจากคราวที่แล้วลงไปแล้วไม่สัมฤทธิ์ผล หันกลับไปหา Gutsy ใหม่ เอาเหอะ ลงก็ลง ไหนๆ ก็รู้สึกว่า Hardy มันไม่ค่อยสมบูรณ์ คราวนี้ทำใจกล้าลง debian unstable ซะเลย ใหม่ดี เหอๆ

เริ่มจาก ดาวน์โหลด testing snapshot CD + KDE ของวันที่ 02062008 มาซะเผาลงแผ่นแล้วก็บูต จัดการ format partition ที่เป็น system เดิมแล้วให้ mount /home ที่เก่า (แนะนำให้แบ่ง /home เป็นอีก partition นึง ถ้าไม่มีอะไรผิดพลาด การตั้งค่าต่างๆ เกือบทุกอย่างและข้อมูลในนั้นยังอยู่ครบ) ลงแผ่นนึงแล้วให้มันดาวน์โหลดที่เหลือจากอินเทอร์เน็ต คืนนั้นใช้เวลาไปกว่าสามชั่วโมง เพราะว่าช่วงนี้ noise ในสายโทรศัพท์มันเยอะเป็นบ้า ความเร็วตกเหลือไม่ถึงเม็ก T_T (วันก่อนทำความสะอาดไปได้มา 6 เม็กกว่าๆ อีกไม่กี่ชั่วโมงกลับไปเท่าเดิม T_T)

เอ้า ลงเสร็จบูตใหม่ ไหง kdm ไม่ขึ้น ขึ้นแต่ login prompt...

แสรดดด ...

เอ หรือว่ามันจะมีการบูตด้วย runlevel ที่ไม่มี graphic mode ลอง startx ซิ

ได้ผล ... ขึ้น TWM ไม่ใช่ KDE ... แสรดดด

ลองเล่นๆ ดู โคตร primitive แต่ยังดีที่ยังมีอย่างอื่นมาพอสมควร -> iceweasel เป็นต้น เลยยังพอ surf อินเทอร์เน็ตได้ ระหว่างนั้นลอง apt-get นู่นนี่อีกหลายอย่าง ปรากฏว่ามีมั่งไม่มีมั่ง กำลังสงสัยว่าเป็นที่แหล่งสำเนา (mirror) หรือเปล่า (ใช้ของ aarnet.edu.au) เลยเปลี่ยนแหล่ง repo เป็น ftp.au.debian.org แล้วก็เปลี่ยน dist จาก lenny เป็น unstable ทั้ง main, contrib, non-free ซะ ก่อนที่จะ
#apt-get update
#apt-get dist-upgrade


เอาล่ะ ทีนี้นั่งหา window manager ที่มัน primitive น้อยลงหน่อย เผอิญหันไปเห็น Window Maker เลยเอานี่แหละ เรียบ ง่าย สวย เร็ว เล่นไปเล่นมาซักพัก ก็จัดการ add printer ก่อนผ่าน CUPS (localhost:631) เรียบร้อย ก็ยังเหลืออะไรที่ต้องทำเพิ่มให้มันใช้ได้เหมือนตอนใช้ kubuntu อีกพอสมควร

ก่อนอื่นคือติดตั้ง KDE :P

ลงเสร็จ amarok มันเล่น mp3 ได้เลยแฮะ ไม่รู้มันเอา codec มาจากไหน ยังงงๆ อยู่

ต่อไปคือ ผมติดการใช้ sudo ซะแล้ว แต่ตอนนี้ต้อง su แทน ก็เลยลง sudo แต่ก็ยังใช้ไม่ได้เพราะว่า ยังไม่ได้ใส่ชื่อตัวเองลงไปใน sudoers จริงๆ ก็ไม่ได้รังเกียจ su หรอก แต่ว่าบางที apt-get อะไรทิ้งไว้ก่อนเข้านอน พอเสร็จมันก็เป็น root อยู่อย่างนั้นมันเสียวๆ ไงไม่รู้ สรุปก็เพิ่มชื่อตัวเองเข้า sudoers chmod +w ให้เขียนได้ก่อนแล้วเพิ่ม

user_name ALL=(ALL) ALL


เพื่อให้ใช้คำสั่งได้ทุกเครื่องทุกคำสั่ง จากนั้นบันทึกแล้วเปลี่ยน permission กลับเป็น 440 เหมือนเดิม

ต่อไปทีนี้เป็นเรื่องการเข้าถึงไดรว์ฟ ntfs ปรากฎว่า ไม่สามารถเมานท์ได้ในฐานะ user ปกติ โดยใช้ ntfs-3g ก็ตามหากันต่อไปว่าทำอย่างไรดี หาไปหามาก็เจอที่เว็บของเค้าเองแหละ ก่อนอื่นลง FUSE ซะก่อน (libfuse2, fuse-utils) แล้ว add ตัวเองเข้ากลุ่ม fuse, disk จากนั้นเปลี่ยน permission โปรแกรม ntfs-3g โดยการ setuid root ให้ซะ แบบนี้

sudo chmod 4755 /usr/bin/ntfs-3g


ซึ่งจะทำให้ permission มันกลายเป็น

$ ls -l /usr/bin/ntfs-3g
-r-Sr-sr-t 1 root root 35460 2008-05-29 05:22 /usr/bin/ntfs-3g


แล้วอย่าลืมเติม entry เข้าไปใน /etc/fstab ด้วย แบบนี้

/dev/hda1     ntfs-3g     user,noauto,rw,umask=0,nls=utf8    0     0


ทีนี้เราก็สามารถเมานท์ ntfs ได้ในฐานะ user ทั่วไปแล้ว แถมเขียนได้ด้วย เฮ่อ~~

ยังไม่จบแค่นี้ ยังต้องหาทางทำให้เม้าส์ VX Rev. มันใช้ได้ครบทุกปุ่มก่อน ลอง evdev ตอนนี้ยังไม่ work ตรง side scroll มันไม่เจอว่าเป็นปุ่ม ตรง Zoom อีก ถ้าทำได้แล้วก็จะมาบันทึกเพิ่มต่อไป


Sunday, March 30, 2008

KDE4.0 Tip

KDE4 has been released for a while (currently 4.0.2). As you can see, although many things in KDE4 look cool, it still needs a really, really hard effort to polish things up to be used in the real world. I have struggled in using KDE4 as my main desktop environment. One trouble arises from my own hardware, an aged laptop using the old Intel graphic which has not adequate power to handle composting correctly. The other is its own interface. Plasma panel, widgets and many desktop effects are cool but some functionalities are reduced so that it can't get the job done. For example, you can't move widgets in the panel, just add or remove. Furthermore, you can mess up the desktop easily either by the way you config it or their own bugs.

Alright, if you just mess your desktop up, I have a tip for you to reset it to the beginning state.

Firstly, fire up the terminal (Konsole or Yakuake, or your favourite terminal) and type down these commands:

kquitapp plasma
rm ~/.kde4/share/config/plasma-appletsrc
plasma


The 'kquitapp plasma' will terminate the plasma session and your desktop will become dark screen. Make sure that terminal window is still opened.

The 'rm ~/.kde4/share/config/plasma-appletsrc' will remove desktop setting file.

The 'plasma' will restart your plasma session and a new setting file will be created. Then your desktop will return to beginning state.

See you next time...

Wednesday, February 13, 2008

This entry was posted from my Wii

Well, yes, I posted this entry from my Wii using Opera browser and a usb keyboard.

For a new version of Wii, you have to buy the Internet Channel which is the Opera browser, costing 500 Wii points. It is fine in browsing www, posting blog, checking emails. It can't display Thai, though (of course, Thai input is impossible). The screen estate is quite important, because if you use Wii browser on a small screen TV, you can't read anything comfortably. The page have to be magnified using '+' button and contents need to be scrolled up and down, back and forth. Input system is quite awkward, needing to switch to the input screen everytime you need to in put text. Well it's not a good idea to use Wii internet channel for everyday use, replacing your PC (or iPhone :P ) browser. Just occasional browsing when you're stuck with your game on Wii is fine.

Thursday, January 31, 2008

Generate locale in Gutsy

After upgrade my box to Kubuntu Gutsy, I haven't noticed that the th_TH (TIS-620) locale has disappeared. Some old softwares, Lexitron, for example, need this locale to display fonts correctly. So, I have to generate it again.

I think that I used to reconfigure locale via dpkg-reconfigure or some config program that provide the ncurses interface to select and generate locales. However, I have no luck finding this program.

Anyway, after googling around, there is a command that will generate locale as easy as click a button. Okay, I just want to write this entry as my memo, so there's nothing so geeky.

sudo locale-gen th_TH


That's it!

PS. I often forget how to use 'code' tag in my blog, so it is...
<pre class="command">xxx</pre>

Sunday, January 27, 2008

Barcamp Bangkok 2008

มีโอกาสได้เข้าร่วมงาน Barcamp Bangkok (ถ้าไม่รู้ว่า Barcamp คืออะไรก็คลิก) เมื่อวานนี้ (26/01/2008) จัดที่ร้านอาหาร Indus ซึ่งเป็นร้านอาหารอินเดียอยู่ประมาณกลางซอยสุขุมวิท 26 รูปแบบงานจัดขึ้นแบบว่าให้ทุกคนมีส่วนร่วมในการนำเสนอ และก็เข้าร่วม Discuss ด้วยกัน ตัวงานดูเหมือนจะเกี่ยวกับเรื่อง IT และผู้ร่วมงานก็ดูเหมือนเป็น Geeks แต่จริงๆ แล้วก็เปิดให้นำเสนอเรื่องอะไรก็ได้ที่อยากพูด หรืออยาก Discuss กัน

นอกจากคนไทยที่อยู่ในวงการ IT มากมายแล้ว ก็ยังมีชาวต่างชาติมาร่วมอีกพอสมควร (เห็นคุ้นๆ หน้าอยู่คนนึงที่มาจาก canonical มั้งที่เหลือไม่รู้จัก :P)

Topics ต่างๆ ที่คนเข้าร่วมเอามานำเสนอกันก็น่าสนใจกันทั้งนั้น เช่น Unix Command line productivity, Ubuntu 8.04, Computer in Biology (ถูกหรือเปล่าเนี่ย), Python Djungo, RoR, Boss เองก็เสนอเรื่องเกี่ยวกับการใช้งานอินเทอร์เน็ต และชีวิต online ที่ออสเตรเลีย จนคนแถวนั้นน้ำลายหกไปกับความเร็วของเน็ต และการไม่มี Censor กับ Adult content (แหะๆ) ส่วนผมก็ว่ากันถึงเรื่อง Localisation เพราะอยากให้คนเข้ามาร่วมงานกันมากๆ ขึ้นหน่อย แต่เรื่องที่น่าสนใจมากที่สุด สงสัยจะเป็นเรื่อง AV Development Life Cycle ผลงานนำเสนอร่วมของ จ่า, Sugree และ Hunt ที่พูดถึงวงจรชีวิตของวงการหนัง AV (ติด rate R) จนคนฟังล้นห้อง และทั้งสามคนพูดได้อย่างกับประกอบธุรกิจประเภทนี้มาก่อน (เหอๆ) โดยเฉพาะ Sugree นอกจากนี้ยังมีเจ้าของเว็บ Akibakko มาพูดเรื่องเกี่ยวกับ Doujin ให้ฟังอีกด้วย

อาหารกลางวันก็เป็นอาหารอินเดีย อร่อย หอมเครื่องเทศ แต่ละอย่างชื่ออะไรมั่งก็จำไม่ได้ รู้จักแต่ไก่ทันดูริ (Chicken Tandoori) ที่เคยกินบ่อยๆ ตอนอยู่ออสเตรเลีย เสียอย่างเดียว กินเสร็จนานแล้ว แต่ยังเรอเป็นกลิ่นเครื่องเทศอยู่เลย :P (กินก่อน present ตอนบ่าย ไม่รู้มีใครเหม็นหรือเปล่า)

หลังจบการนำเสนอตอนประมาณ 6 โมงเย็น ก็ไปต่อกันที่ร้านสวนอาหารป่าเลิศรส ที่เขียนเอาไว้ในแผนที่แค่ร้าน สวนอาหาร และเบียร์สิงห์ ราคา 80 บาท พร้อมอาหารราคาคนไทย ที่สุขุมวิท 33/1 จากผู้เข้าร่วม Barcamp ทั้งหมดเกือบ 150 คน มีคนไปต่อเกือบ 50 คน ต่อโต๊ะกันเป็น U-shape แล้วก็คุยกันต่อแบบติดลม (แต่ดู discriminate ไปนิดนึง คนไทยนั่งฝั่งนึง คนต่างชาตินั่งอีกฝั่งนึง)

เสร็จแล้วก็กลับกัน งานนี้ฟรีตลอดงานทั้งอาหารกลางวันและเย็น แถมยังได้เสื้อและของที่ระลึกมาอีกหลายอย่าง เช่น แผ่น Ubuntu 7.10, MS Visual Studio 2008 Resource Kit, พวงกุญแจ, สติ๊กเกอร์, etc... ขอขอบพระคุณเหล่าผู้จัดงานและ Sponsors ทั้งหลายมา ณ ที่นี้ด้วยครับ

แถม ผู้จัดบอกว่าคราวหน้าเป็น Barcamp on the Beach ต้องคอยติดตามกันต่อไป

ดูรูป ที่นี่ครับ

Wednesday, November 21, 2007

Life out of the fast lane

Friday, last week, my Netcomm ADSL2+ modem died on duty. After an investigation, the cause of death was the adapter which had been grilled during the hot day (around 32 degree Celsius, I think). There also were some traces of melting on the adapter. Anyway, the modem is still working. I knew because I tried plugging in another adapter from another modem and the green LED light on it appeared but couldn't connect because of its under voltage and current.

This problem should be easily solved by just finding a replacement adapter. However, the one that was used was 15V, 1.33A which is not a very standard output. I tried to find it in almost electronic stores that I recognised but had no luck. Most of them are 12V or 15V, 1.5A and $40+ in price. After consulting my friend, his friend who is an engineer said that the one that should be used must have an exact voltage with equal or greater current. That means you can use an adapter that has 15V and 1.33+A (1.5 or 1.6A is OK). Alright, that makes things much easier and we decided to buy a new adapter, even though it will cost us $40+.

Why do we have to find a replacement quickly? Because we couldn't connect to the internet and that we couldn't find out many many things, for examples, couldn't find how can we get the replacement or couldn't find where to buy or where is the shop and couldn't access to emails. OMG, our everyday lives depend on the internet. So we decided to use the internet from our friend's house :P in Baybrook, when we went to have BBQ pork (Mongolian style) at her house on Sunday. After some researches (by Boss), she found that somebody in Whirlpool.net.au webboard could get a replacement from Netcomm for free. So we decided to call Netcomm to get a replacement (working hours are 9-5).

Monday, I called Netcomm Tech Support in the morning. It took me around 20 minutes waiting time to get to the Tech guy. Although it seemed quite a long time, Netcomm call centre made me feel better than other support lines that I've ever contacted. It informed me which queue I got now and moved up. This made me feel waiting was ending soon and I'd like all call centres or tech support lines to be like this. Okay, after speaking to a Tech guy, he gathered some of my information, modem's model and S/N and my name and address, for instances, and tell me that the adapter will be sent to me within 2 days (free of charge, of course). Wow, the adapter had been sent and I received it yesterday. Back online again!

I was very impressed with Netcomm service. Its tech support line has got customers in mind. They know that customers don't want to wait long and that they need to know when they will be served. Queuing system is a clever move and it relieves customers' frustration. Additionally, I can get a replacement adapter for free from Netcomm even though it is stated in the warranty terms and conditions that power supply is not included in the warranty. This saved us $40 for the adapter.

I would recommend anyone I know who want to buy network stuffs (in Australia) to buy Netcomm as its quality and service are very impressive. Thank you ... Netcomm.

Sunday, November 04, 2007

Wii


จาก entry ที่แล้ว ที่ได้คะแนน IELTS แบบคาดไม่ถึง ซึ่งได้ทำการตกลงกับบอสเอาไว้ก่อนแล้วว่า ถ้าคะแนนดี ไม่ต้องสอบอีกรอบภายในปีนี้ ก็จะมีรางวัลให้กันหน่อย :) ทีแรกคุยกันว่าจะซื้อ Nintendo DS Lite เพราะซักสองเดือนก่อนมีเพื่อนมาพักที่บ้านจากซิดนี่ย์ มันเอา DS ติดมาเล่นด้วยพร้อม FF III (ทำให้ตูสอบ Clinical ไม่ผ่านเลย -- ล้อเล่น) เลยอยากเล่นมั่ง

ทีนี้พอไปถึงร้านเกมจริงๆ ปรากฏว่า ไม่มีโปรโมชั่นดีๆ ซักกะที คือซื้อ DS มันก็ได้แต่เครื่องเปล่า หรือไม่ก็แถมเกมที่ไม่อยากได้ ลังเลอยู่นานสองนาน ทีนี้บอสซึ่งชอบดูโฆษณาตามห้างต่างๆ เหลือบไปโฆษณาของ Kmart ว่าช่วงนี้มีโปรโมชั่นสำหรับ Wii ซึ่งซื้อเครื่องแถมอีก 1 เกม (นอกจาก Wii Sports) ในราคาแค่ AU$388 เท่านั้น แต่ในโฆษณาเขียนให้เข้าใจผิดว่าเครื่องเกมราคาแค่ AU$299 (เมื่อลบค่าเกมที่แถมออก) เลยชวนไปดูกัน...

สำหรับ Wii นั้น ข้าพเจ้าเองอยากได้ตั้งแต่ที่มันออกใหม่ๆ ในออสเตรเลียตั้งแต่ปลายปีที่แล้วแล้ว แต่ติดที่ว่า "จน" ต้องเก็บเงินไว้สอบ T_T จนโดนจ่าบอกจะขายต่อให้อยู่รอมร่อ แต่ไม่เอาดีกว่า ก็อยากได้เครื่องใหม่นี่ :P แถมเพื่อนอีกคน ซึ่งติดใจ Wii จากการไปเล่นที่บ้านเพื่อนของเธอ ก็ตัดสินใจซื้อเป็นของตัวเอง (จาก ebay) ทำให้อยากได้ขึ้นไปอีก (ทีแรกกะว่าจะชวนบอสไปเล่นบ้านเพื่อนก่อน แล้วค่อยตะล่อมขอทีหลัง)

ไปถึงที่ก็เข้าไปถาม... ได้ความว่า ถ้าเอาแต่เครื่อง + Wii Sports (ซึ่งมันมีอยู่ในกล่องนั่นแหละ ไม่รู้จะเอามาโปรโมททำไม) เนี่ย ต้องจ่าย AU$399!!! เฮ้ย!! ไรวะ!? แต่ถ้าเอาตาม Deal (คือแถม Ice Age 2 ด้วย) ก็จ่าย AU$388 ได้มาอีก 1 เกม อืม... ทีนี้คิดหนัก เพราะไม่ใช่คนชอบเล่นเกมแอ็คชั่นแบบนั้น รู้สึกว่าอยากได้เกมอื่นมากกว่า (เช่น Zelda หรือ Cooking Mama สำหรับ Wii) แต่สุดท้ายก็ตกลงใจ "เอา" ดีกว่า เผื่อเอาเกมที่แถมมาไปปล่อยบน ebay :P แล้วไปซื้อเกมที่อยากได้ ก็ตกลงบอกคนขายว่า เอาชุดนี้แหละ (ทำไมต้องจ่ายแพงกว่าด้วยล่ะ? ก็ไม่เอาเกมมันตั้ง 399 นี่หว่า) ว่าแล้วคนขายก็เข้าไปหาของใน stock เสร็จออกมาบอกว่า Ice Age 2 หมด เปลี่ยนเป็น Surf's Up แทนได้มั้ย เหอ!? ก็โอเค มันก็ไม่ได้ต่างอะไรมาก แต่บอสคิดว่านี่เป็นโอกาส เลยถามไปว่า ถ้าของหมดล่ะก็ ขอเลือกเกมเองได้มั้ย ถ้าราคาเกินจะจ่ายส่วนต่างเพิ่มให้ ตอนแรก คนขายเธอตอบตกลง เราก็ไปเลือกเกมกัน ได้ Legend of Zelda มานี่แหละ พอกลับมาที่เคาน์เตอร์ เธอบอกไม่ได้ซะงั้น (จริงๆ คือ ดูเหมือนเธอไม่มีสิทธิ์ตัดสินใจหรอก ตอนแรกเลยนึกว่าได้ื สงสัยถาม supervisor แล้วโดนด่ากลับมา) ก็ได้วะ เอา Surf's Up ก็ได้ กลับมาถึงบ้าน นอนพักซักครู่ แล้วก็เปิดกล่อง... ตอนแรกที่เห็นเครื่อง มันเล็กจังวุ้ย มี port ภายในเครื่องคือ พอร์ต AV, ช่องเสียบ Sensor, ช่อง Power, มี USB x2, ข้างหน้า นอกจากช่องใส่แผ่นแล้วก็ยังมีช่องเสียบ SD card ด้วย, ข้างบนมีช่องเอาไว้เสียบจอยของ GameCube แล้วก็มี Wii Remote ซึ่งเครื่องรุ่นหลังๆ จะแถม สายรัดข้อมือแบบหนาและแข็งแรงขึ้น พร้อมกับ Wii Remote Jacket เป็น silicone สีขาวไว้ใส่ Wii Remote มีหัวบวมๆ เป็น cushion เผื่อเวลาหลุดมือไปโดน TV จะได้ไม่แตกมั้ง ต่อเครื่องกับทีวี (21" เล็กเป็นบ้า T_T) เปิดมา Set up อะไรบางอย่างเช่น Region, Time, Timezone, สร้าง Mii แล้วก็เปิด Wii Sports เล่น

เริ่มจาก Tennis, Baseball, Bowling, Golf ปิดด้วย Boxing โอ้ว สุดยอด สนุกเป็นบ้า (แต่ทำไม Tennis เราห่วยงี้วะ, Baseball ก็ตีไม่ค่อยโดน) เล่นจนปวดไปหมดทั้งตัว ไม่ได้ออกกำลังกายมานาน นอกจากนี้บอสก็ยังสนุกด้วยแล้วก็บอกว่าซื้อ Wii น่าจะคุ้มกว่า DS เยอะ พี่อีกคนที่อยู่ร่วมบ้านเดียวกัน ก็เล่น Tennis เป็นชั่วโมงๆ กะ Turn Pro ภายใน 3 วัน เหอๆ

วันศุกร์ ลุกขึ้นมา setup Wi-Fi เครื่อง Wii ให้ต่อกับ router ภายในบ้าน (ยังใช้ WEP อยู่ :P) ซึ่งจะ้ enable features อื่นๆ ที่ต้องต่อกับอินเทอร์เน็ตด้วย เช่น Weather forecast, News, Shopping Channel เป็นต้น หลังจากนั้นเครื่องก็เตือนให้ Update firmware ก็ update ไป กลายเป็นรุ่น 3.1E ซึ่งปรับปรุงหน้าตาเล็กน้อย เช่นมีการแสดงเวลาที่ Wii Menu และทำให้เราสามารถควบคุม Wii Menu ได้ด้วย USB keyboard (แต่มีเตือนไว้ด้วยว่าถ้าลงในเครื่องที่ทำการดัดแปลง อาจทำให้ Wii กลายเป็นที่ทับกระดาษได้) เสร็จแล้วก็เล่น Wii Sports ต่ออีกหน่อย มีผลทำให้ถ้วยน้ำจิ้ม กับ mug แตกไปรวม 2 items (- -')

เมื่อวาน นัดกันออกไปกินข้าวกับเพื่อน เสร็จแล้วกลับมาที่บ้านพร้อมกับเพื่อน คุณเธอเอา ปลอก Wii Sports มาให้ลอง พร้อมกับเอาเกมอื่นๆ คือ Wii Play กับ Super Paper Mario มาให้ลอง ว่าแล้วก็ยึดไว้เล่นเองซะเลย (เดี๋ยวค่อยคืนนะจ๊ะ)

แผนต่อไปคือหาซื้อ Wii Remote อีกซักอัน (ต้องหาที่ที่ลดราคาซักหน่อยก่อน) เหอๆ

แถมวิดีโอตอนบอสเล่น Wii Tennis




ปล. Happy Birthday นะคร้าบ บอสที่รักและเคารพ รักนะ...

Sunday, October 07, 2007

Apple! What are you thinking?

I have an iPod (5G, the first revision of iPod Video) and it's worked well on my box under both Windows and Linux. However, recently, Apple has introduced a new line of iPod including iPod Classic with a massive storage (160 GB for a portable media player, are you crazy?), new looks and a new slick UI. I have to admit that I don't like the new aluminium appearance, even though the new UI looks great. Yet, I would like to own one of new iPod Classic, attracted by its huge storage, up until half an hour ago, though.

The reason is that Apple tries to keep things monopolised. They've encrypted the firmwares since the 2G nano and now all new iPods' firmwares are encrypted. This makes installation of alternative firmwares, such as Rockbox and iPodLinux, impossible since they need to modify the 'encrypted' firmware in order to install the bootloader. While Apple's firmwares may be good ones, but they may not provide all solutions. For example, they do not support such free file format as ogg which offers smaller file size and better quality, so these alternative (and opensource) firmwares are the answers. Additionally, hacking iPod to make it display Thai character is also affected (and Apple is not interested in making iPod to display Thai). OK, it is fair enough to keep such thing like firmware as a proprietary stuff. But, at least, if somebody want to use your hardware but are sick of your feature-less firmware, please let others do the job.

Furthermore, the new iPod firmwares come with encrypted iTunesDB. This means no applications can read iPod's library but iTunes (but not for long). OK, I somewhat like iTunes, even though it's sometimes cranky and not so smart. However Amarok is my app of choice to manage iPod. Apple slams the door to us, Linux users who are their current and may be future customers. This is an outrage! Fortunately, someone has cracked the hash and already implemented it to libgpod (svn version). If you are using Ubuntu family, you may find the unofficial Ubuntu .deb from this blog. Thanks to the opensource world. Windows users who hate iTunes but own iPods may need to wait, anyway.

Apple's attitude to this is quite extreme and will keep some of their customers away, including geek and many Thai people. I've made up my mind. If my iPod comes to its last day, my new media player will be Creative, iRiver, SanDisk, etc... but, sorry, Apple, not iPod anymore!

Friday, July 13, 2007

Saturday, May 19, 2007

Kubuntu Feisty vs Logitech

หายหน้าหายตาไม่ได้ up blog เป็นเวลานานแสนนาน แถมจั่วหัวเรื่องซะน่ากลัว แต่ไม่ใช่เรื่อง Logitech ไปหาเรื่องฟ้อง Kubuntu แต่อย่างใด เป็นเรื่องที่ผมไปซื้อเมาส์มาใหม่ เป็นเมาส์ Laser รุ่น V450 จาก Logitech ในราคาลดสะบั้นแค่ AU$58 เท่านั้น (แพงฉิบ) ซึ่งเมาส์ตัวนี้ก็ใช้ได้ดีเกือบทุกพื้นผิว ละเอียดดี (ไม่รู้เท่าไหร่ เพราะมันไม่ยอมบอกว่ากี่ dpi แต่รู้สึกว่ามันเคลื่อนที่เรียบขึ้น อาจจะเป็น Placebo Effect) แถมยังใช้ได้ไกลพอตัว (ประมาณเกือบๆ 5 เมตร) และที่สำคัญคือประหยัดถ่าน (มันเคลมว่าใช้ได้นานสุด 1ปี)



ตัวนี้แหละ


การใช้งานทั่วไปบนวินโดวส์ก็ไม่มีปัญหา แต่ต้องลง software ของ Logitech จึงจะทำให้ใช้ได้ครบทุกปุ่ม ซึ่งมันมี 3 ปุ่ม และ sidescroll (ขนาดบนวินโดวส์นะ) ทีนี้มาว่ากันบน Linux มั่ง ซึ่งเครื่องผมลง Kubuntu Feisty เอาไว้ (ก่อนหน้านั้นก็ Edgy แหละ แต่ตัดสินใจลง Feisty ดีกว่าเพื่อความสดของ packages) เมื่อลองเสียบครั้งแรก ก็ใช้ได้ทันที แต่ ปุ่ม sidescroll มันใช้ไม่ได้ สรุปว่า หายไป 2 ปุ่มซะงั้น -_-' แรกๆ ก็ไม่คิดอะไรหรอก ไม่ใช้ก็ได้ แต่ไปๆ มาๆ ก็ซื้อมาตั้งแพง ทำไมใช้ไม่ได้ฟะ แถมเมาส์ก็เคลื่อนที่แบบที่เรียกว่า out of control เอามากๆ คือ ขนาดปิด acceleration ใน KDE ไปแล้ว (ตั้ง factor x1) มันยังปรู๊ดปร๊าด แบบควบคุมลำบาก ยิ่งแย่เข้าไปใหญ่ (คิดว่าน่าจะเป็นผลจากความละเอียดที่มากขึ้นจริงๆ) เลยคิดว่า... สงสัยต้องหาวิธีเอาซะแล้ว

ที่ entry นี้ไม่เขียนเป็นภาษาอังกฤษเพราะว่า เอกสารภาษาอังกฤษมีเยอะแล้ว (เหอๆ) และคนไทยมักไม่ค่อยอยากอ่านภาษาอังกฤษ ดังนั้นก็เขียนเป็นภาษาไทยละกัน (เผื่อจะมีคนมาเม้นต์มากขึ้น เหอๆ)

วิธีการนั้น ผมได้มาจาก Google -> Gentoo Wiki (เข้าใจแล้วว่า ทำไมเค้าถึงบอกว่าเอกสารของ Gentoo ดีที่สุดในโลก) และรายละเอียดปลีกย่อยนิดหน่อยจากหน้า manpage

เอาล่ะ มาเข้าเรื่องกัน

ขั้นแรก: สำรวจไดรเวอร์
การตั้งค่าเมาส์โดยปริยายใน xrog.conf ที่ติดมากับ *buntu นั้น จะใช้ไดรเวอร์ที่เรียกว่า mouse เพราะมันเป็นไดรเวอร์ที่ใช้ได้กับเมาส์ทั่วไปไม่ว่าจะเป็นเมาส์ ps/2, usb หรือ serial (ยังมีใครใช้มั้ยเนี่ย) แต่สำหรับเมาส์ใหม่ๆ ที่ปุ่มมันเยอะๆ และเป็น usb ซึ่งไดรเวอร์และ Protocol ตัวเก่านั้น มันอาจทำให้การ map ปุ่มเมาส์เละไปหมด เค้าก็เลยเปลี่ยนมาใช้ไดรเวอร์ที่ชื่อว่า evdev แทน ซึ่งไดรเวอร์ตัวนี้จะทำการ จับ event ของอุปกรณ์นำเข้าข้อมูลต่างๆ เข้ามาผ่านทำการประมวลผลใน kernel และตามเอกสารของ Gentoo ก็บอกไว้ว่า 9 ใน 10 ครั้งนั้น คุณจะไม่ต้องไปนั่ง map ปุ่มใหม่เอง (เยี่ยม)

สำหรับ evdev นั้น *buntu ได้ build มาเป็น kernel module แล้วพร้อมกับโหลดให้ตอนบูตเรียบร้อย


ขั้นที่ 2: สำรวจอุปกรณ์
รายละเอียดของอุปกรณ์นั้นจะถูกเก็บไว้ในระบบไฟล์ชั่วคราว (/proc) ที่แฟ้ม /proc/bus/input/device ลองดูเนื้อหาภายในนั้นได้จากการใช้คำสั่ง cat หรือ less แบบนี้
cat /proc/bus/input/device
หรือ
less /proc/bus/input/device


แต่แนะนำให้ใช้ less ดีกว่า เพราะเลื่อนขึ้นลงไล่ดูได้ ลองไล่ๆ ไปก็จะเห็นข้อความประมาณนี้


I: Bus=0003 Vendor=046d Product=c518 Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.2-2/input0
S: Sysfs=/class/input/input4
H: Handlers=mouse1 ts1 event4
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c518 Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.2-2/input1
S: Sysfs=/class/input/input5
H: Handlers=kbd event5
B: EV=f
B: KEY=7fff 2c3027 bf004440 0 0 1 f80 8807c000 667bfa d9415fed 8e0000 0 0 0
B: REL=40
B: ABS=1 0


โปรดสังเกตชื่อ Logitech USB Receiver และคุณจะเห็นว่ามันมีอยู่ 2 entries เนื่องจากว่า kernel มองมันเป็น Receiver ของทั้งเมาส์และคีย์บอร์ดไร้สายของ Logitech มันก็เลยขึ้น 2 อัน โดยส่วนสำคัญที่เราสามารถเอาไปใช้ใน xorg.conf ได้มีอยู่หลายส่วน เช่น Name, Phys, bit (B: น่ะ) ให้จดๆ เอาไว้ก่อน แล้วเราไปแก้ /etc/X11/xorg.conf กัน

ขั้นที่ 3: แก้ xorg.conf
คำเตือน: ก่อนกระทำการใดๆ ในขั้นนี้ โปรด backup ไฟล์ xorg.conf เอาไว้ก่อน เพราะเกิดเข้า X ไม่ได้ขึ้นมาจะได้ก็อปกลับไปทับได้

ทีนี้ ตามคู่มือของ Gentoo ที่อ่านมา เค้าบอกว่า ให้แก้ไฟล์ xorg.conf โดยทำการเพิ่มส่วน InputDevice section เพิ่มเข้าไป โดยต้องไปตามดูวิธีการเขียน Config ตามรุ่นและชนิดของเมาส์อีกที (ดูอ้างอิงข้างล่าง) แล้วก็เพิ่มค่าของเมาส์ใหม่เข้าไปในส่วนของ ServerLayout ด้วย

ตามตัวอย่างของ Gentoo Wiki นั้น เค้าบอกให้เพิ่ม InputDevice เข้าไปแบบนี้


Section "InputDevice"
Identifier "V450"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "HWHEELRelativeAxisButtons" "7 6"
EndSection

และ

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "V450" "CorePointer" <- เพิ่มตรงนี้เข้าไป
InputDevice "Synaptics Touchpad"
EndSection


จะเห็นว่า ตัวไดรเวอร์เปลี่ยนไปโดยหันไปใช้ evdev แทน แล้วก็กำหนดอุปกรณ์ด้วยชื่อ ซึ่งก็ควรจะใช้ได้ ถ้าเกิดว่าอุปกรณ์ของผมมันไม่มีชื่อซ้ำกัน แต่จากตัวอย่างข้างบนในขั้นที่ 2 คุณเห็นแล้วว่าชื่อ Logitech USB Receiver มันซ้ำกัน ผลก็คือ เมื่อ restart X ใหม่แล้ว มันมืดไปเลย - -'

ก็เลยเปลี่ยนวิธีเรียกอุปกรณ์ใหม่ เป็นการเรียกใช้จาก event แทน จากตัวอย่างในขั้นที่ 2 จะเห็นว่า ตัว event ที่เป็นเมาส์ของ Logitech นั้น ตรงกับ event4 เราก็เปลี่ยนตรง Option name ให้เป็น Device แบบนี้


Section "InputDevice"
Identifier "V450"
Driver "evdev"
Option "Device" "/dev/input/event4"
Option "HWHEELRelativeAxisButtons" "7 6"
EndSection


หลังจาก restart X แล้วก็ปรากฏว่า สามารถใช้งานเมาส์ได้ และใช้ได้หมดทุกปุ่ม ทั้งปุ่ม ซ้าย ขวา scroll ขึ้น-ลง และ scroll ซ้าย-ขวา ฮ่า... สำเร็จ

แต่...

การใส่ option แบบนี้มีข้อเสียคือ ในการบูตแต่ละครั้งนั้น HAL มันอาจจะเอาเมาส์ของคุณไป register ไว้ที่ event ต่างๆ กันก็ได้ (โดยส่วนใหญ่ก็จะเป็น event เดิมแหละ แต่ตั้งแต่เปลี่ยนมาใช้ Feisty มันเปลี่ยนทุกครั้งที่บูตเลยอ่ะ - -') ซึ่งถ้าเป็นแบบนั้น คุณก็จะไม่สามารถใช้เมาส์ได้ครบปุ่มอยู่ดี ดังนั้นมีวิธีที่ดีกว่าก็คือ การกำหนด Physical address ไปซะเลย โดยทำการเปลี่ยน Device ไปเป็น Phys แบบนี้


Section "InputDevice"
Identifier "V450"
Driver "evdev"
Option "Phys" "usb-0000:00:1d.2-2/input0"
Option "HWHEELRelativeAxisButtons" "7 6"
EndSection


ทีนี้คุณก็จะได้เมาส์พร้อมใช้งาน ทุกครั้งที่บูต (แต่แบบนี้ก็มีข้อเสียอีกแหละ ถ้าคุณเปลี่ยนพอร์ตที่ใช้เสียบตัว Receiver แล้ว address ตรงนี้ก็เปลี่ยนเหมือนกัน แต่ถ้าไม่เปลี่ยนพอร์ตก็ไม่มีปัญหา)

ขั้นสุดท้าย: ทำการปรับแต่งอีกเล็กน้อย
เนื่องจากว่า ผมรู้สึกว่าเมาส์มันกระตุกๆ แปลกๆ ซึ่งอาจเป็นเพราะว่า การ poll ข้อมูลของเมาส์มันต่ำเกินไปสำหรับเมาส์แบบ Laser ซึ่งมีความละเอียดสูง ดังนั้นก็เลยเปลี่ยนความถี่ในการ poll ข้อมูลซะ (ค่าปกติคือ 100 Hz) โดยจากคู่มือของ Gentoo ที่อ่านมา บอกว่า เมาส์ส่วนใหญ่ของ Logitech สามารถรับความถี่ 500Hz ได้สบายๆ โดยใช้ usbhid module และให้ โหลดโมดูลนี้ตอนบูต โดยทำการสร้างไฟล์ usbhid เอาไว้ใน /etc/modprobe.d


sudo vi /etc/modprobe.d/usbhid

options usbhid mousepoll=2


ซึ่งตรงนี้เป็นการเปลี่ยนให้มีการรับข้อมูลจากเมาส์ทุกๆ 2 ms (ก็คือ 500 ครั้ง/วินาที หรือ 500 Hz นั่นเอง)

แล้วก็บอกให้ทำการโหลดโมดูลพร้อม option นี้ทุกครั้งเวลาบูตด้วยการใส่ usbhid ต่อท้ายเข้าไปในไฟล์ /etc/modules

ต่อมาผมรู้สึกว่า เมาส์มันเคลื่อนที่เร็วเกินไป ถึงแม้จะได้ทำการปรับความเร็วของเมาส์ใน KDE ไปแล้วก็ยังเร็วอยู่ดี หลังจากที่หาไปหามาแล้ว ก็พบวิธีที่จะปรับเมาส์ให้มีความเร็วลดลง และเพิ่ม sensitivity (threshold) โดยการใช้คำสั่ง


xset m 1/2 1


ซึ่งแปลว่า ทำการตั้งความเร็วเมาส์ให้เหลือ 0.5 เท่า และให้เคลื่อน cursor เมื่อเคลื่อนเมาส์ไป 1 pixel ซึ่งการตั้งแบบนี้ ทำให้ผมควบคุมเมาส์ได้ดีขึ้นมากๆ แต่ทนี้จะทำไงให้มันเป็นแบบนี้ตั้งแต่บูตเข้ามาดีล่ะ ... อันนี้หาไม่เจอแฮะ ... แต่ก็มีวิธีพอกล้อมแกล้มไปได้ด้วยการสั่งแบบนี้ในตอน login เข้า kde โดยทำการสร้างไฟล์ .desktop สำหรับเรียกโปรแกรม ใส่เข้าไปใน ~/.kde/Autostart โดยตั้งชื่อว่า reduce_mouse_speed.desktop และมีเนื้อหาแบบนี้ครับ


[Desktop Entry]
Name=Reduce Mouse Speed
Exec=xset m 1/2 1
StartupNotify=false
Terminal=false


ที่ไม่ยัดคำสั่งนี้เข้าไปใน .bashrc เพราะว่า มันจะแสดง error ถ้าเกิดไม่ได้ login ด้วย X ครับ ก็เลยยัดเอาไว้ใน Autostart ดีกว่า

หลังจากนี้ทีนี้ก็ได้เมาส์พร้อมใช้งานได้แบบเต็มประสิทธิภาพแล้วครับ

Resources:
Gentoo's HOWTO Advanced Mouse
Gentoo's HOWTO Advanced Mouse / Individual Configurations
Gentoo's HOWTO Setting mouse speed through command line
Gentoo's HOWTO Change mouse Hz

Thursday, April 19, 2007

KDE Thai translation: Progress note

There's not much time to the release date of KDE4, according to the release schedule. However, it seems that Thai translation of KDE4 has faced some issues. First of all, the KDE i18n team has moved the core KDE translations and templates from trunk/l10n to trunk/l10n-kde4. (FYI: trunk is the developing branch of KDE.) The translations that have been left in the trunk/l10n is something newer and may not be included to KDE4 (extragear packages). And that many translators from many languages have moved their own translation to trunk/l10n-kde4 already.

The second issue is that string entries in trunk/l10n-kde4 translation files are not the 'exact' entries in that of trunk/l10n and the format of po files is a little bit different. This means, in the worst case, Thai team may have to start over for KDE4 translation. What!! Oh, not so fast. It's not that bad. After asking many people in the kde-i18n-doc mailing list, they said that the translations in trunk/l10n can be ported to both kde4 and kde3.5.x with less efforts using 'msgmerge' and converting script from svn. I tried it and it worked great. Phew... that was close.

At the moment, I'm backporting the trunk/l10n to stable branch and have fulfilled the requirements to include Thai with KDE 3.5.7 (if it is released). Furthermore, I take this chance to review many translations that I (and K. Donga, ...) did and found that there were so many flaws in the translation -_-'. Some were translated incorrectly, some were right in the word meaning, but in wrong context. Some were translated diffusely and many more.

If somebody says that [interface, documentation, you name it] translation is a piece of cake, you can be sure that he or she's never done this before.




ตอนนี้ก็เหลือเวลาไม่มากแล้วก่อนที่จะมีการปล่อยตัว KDE4 แต่ตอนนี้การแปลไทยของ KDE4 เกิดปัญหานิดหน่อย (รึเปล่า) จากที่เคยตั้งใจว่าไอ้ที่แปล trunk/l10n (คือ developing branch) นี่พวก package หลักๆ ก็ได้ครบแล้วพอที่จะถูก release ไปกับ KDE4 ได้ แต่ปรากฎว่า ทีม i18n ได้ทำการย้ายพวก core translation ไปไว้ใน trunk/l10n-kd4 แทน แล้วอีกหลายภาษาก็ได้ย้ายไปแล้วด้วย แต่ภาษาไทยยัง (แหะๆ) ส่วนของที่เหลืออยู่ใน trunk/l10n ก็จะมีพวก package ใหม่ๆ ที่อาจจะไม่ถูกรวมเข้าไปใน KDE4 ด้วยเนี่ยแหละ

อีกปัญหาคือ ไอ้ของที่ย้ายเข้าไปน่ะ มันไม่ใช่แค่ย้ายเข้าไปเฉยๆ แต่มันมีการเปลี่ยนพวก string entries ด้วยพอสมควร แถมยังมีการเปลี่ยน format อีกนิดหน่อยด้วย ดังนั้นปัญหาคือ, อย่างแย่ที่สุด ก็อาจต้องเริ่มแปลใหม่... หา! พูดเป็นเล่น!

แต่เดี๋ยวก่อน! อะไรๆ มันไม่ได้แย่ขนาดนั้น หลังจากงงๆ อยู่พักใหญ่ ก็ตั้งสติได้แล้วเข้าไปถามชาวบ้านใน kde-i18n-doc mailing list ก็มีคนตอบมาว่า น่าจะ port คำแปลไปให้ 3.5.x ด้วยโดยไม่ต้องเริ่มใหม่ โดยใช้คำสั่ง 'msgmerge' จะว่าไปก็คือเอาของเก่า มารวมกับของใหม่ แล้วก็ตามแก้ที่มันเป็น fuzzy/no translation นิดหน่อย ลองแล้วปรากฎว่าใช้ได้ดี ส่วนถ้าจะ port ไป kde4 ก็ต้องใช้ script สำหรับ convert ที่อยู่ใน svn

สรุปคือ ตอนนี้ก็เลย port คำแปลจาก trunk/l10n ไปให้ 3.5.x อยู่ แล้วตอนนี้ก็จัดการได้ตาม requirement ที่จะถูกรวมเข้าไปในการ release ของ 3.5.7 (ถ้ามันออก) นอกจากนี้ก็ถือโอกาสตรวจสอบไอ้ที่แปลๆ ไป ปรากฎว่าเจอที่แปลพลาดเยอะแยะ ทั้งแปลผิด แปลเยิ่นเย้อ แปลถูกคำแต่ผิดบริบท -_-' (บางทีไม่เข้าใจว่าเมื่อก่อนตูแปลแบบนี้ได้ไงฟะ) ใครบอกว่าเรื่องแปล [interface, doc, หรืออะไรก็แล้วแต่] เป็นเรื่องกล้วยๆ เชื่อได้เลยว่ามันคนนั้นไม่เคยทำหรอกงานแบบเนี้ย

Tuesday, February 20, 2007

Upgrade...

When I went back to Thailand last year, I had a chance to go shopping at Pantip Plaza. The first reason is that I had to find additional memory for Boss' Fujitsu laptop. It first came with only 512MB DDR2 533 and was not enough for her to manage things. To upgrade, we decided to buy 2 of 1GB DDR2 533 SO-DIMMs and everything works just fine.

The second reason is that my NEC laptop (almost 3 yo) component was broken, the Toshiba's DVD-RW drive. It began to get sick 3-4 months ago. First, it couldn't read and burn DVD-R, followed by DVD and CD-R. Of course, I needed a replacement and decided to replace it with DVD+/-RW (DL) drive. It's very hard to find such component (an internal laptop optical drive) in Australia. Fortunately, it's not that hard to find this in Thailand (and cheaper).

After cruised in Pantip for sometimes, I found one shop (on 3rd floor) that sold the drive I wanted in a very reasonable price :). I got a Lite-on Slimtype SOSW-833S DVD+/-RW (the barcode on it says it is a Teac drive, though) at 2,680 THB. Also, I got a 100GB WD 2.5" Harddisk to replace my old harddisk (it's still healthy but too small) at 3,200 THB (around AU$114). WOW, how cheap the hardwares in Thailand, I love it!

After came back, I replaced the old DVD drive with the new one. At first boot, BIOS did not recognise it!!! but it worked properly in Windows XP. It could read and burn all medias I gave to it (except DVD-RAM, Blu-Ray and HD-DVD, of course). Besides, Windows recognised it as a secondary IDE slave!!!. I didn't realise the problem until I decided to replace the harddisk. After finishing harddisk installation, I had to reinstall OSes and my box couldn't boot from CD.... ??? What the heck!!?? BIOS did not know the existing of the DVD drive. I rectified the problem by reinstalled the old DVD drive (lucky enough, it still can read CD) and install Windows XP.

After googling around, I found that the drive came with slave location as default and that prevented auto detection from BIOS, meaning that this drive, as slave, can't be used to boot my laptop. The problem is the drive is jumper free so I couldn't set it to be master to use it to boot the box. Luckily, after some more google, I found that Lite-on corp. released a software that can alter the status of the slimtype jumper-free drive and downloaded it from here. I used it to change the location from slave to master and rebooted. Voila! the drive turned to master and BIOS has recognised it. Finally, I could boot with CD and installed Kubuntu Edgy Eft to the new hard drive.


Phew~~ that was close... -"-


For now, all components and everything run just fine... ^_^

Sunday, February 18, 2007

Med and Tech

An intercontinental consultation (Australia - Thailand) by \me and Mon using MSN (Windows Live Messenger) Video call. So impressive! See here.

PS. At last, first entry about "Med" :)

Monday, February 05, 2007

Sunday, January 07, 2007

Blog tag

Blog tag is a way of blogging used to tell a story of yourself (in 5 topics, I guess). After that, tag your blog with your 5 friend's names to make them do the same thing.

I got a tag from Keng and have no idea whom I will pass to. - -'

Okay, let's rock!

  1. I'm a doctor, a real medical doctor (not a person with a Ph.D. degree). However, I'm interested in computer and IT and become a geek (or not?).

  2. First computing experience occurred when I was in the first year of secondary school. The first computer I played with was an 8-bit Apple ][, coming with a phosphor display, 2 floppy disk drives, Apple DOS and BASIC programming language, in school's computer lab. With this box, I did nothing but played 'Hang man' and wrote BASIC programs to display ASCII art.

  3. I use 'DrRider' as an alias because I'm a doctor (Dr.) and I love Kamen Rider.

  4. I've written many blog entries in English because I'm practising to write English articles as I had to take English tests (IELTS, OET, etc...). However, I can't do it very well. T_T Moreover, this may reduce readers of my blog because they may not want to read it in English.

  5. Do you know that I try to use British (Australian) English rather than American English? Sometimes you may find that my spelling is weird, but that is British one.


Alright, that's it.



ไม่ได้ออนไลน์มา 2-3 วัน เปิดไปดูจ่าเก่งปรากฎว่าส่ง blog tag ลูกโซ่มาให้ซะแล้ว

Blog tag คือวิธีการบล็อกอย่างนึงที่ใช้เล่าเรื่องตัวเอง (คงซัก 5 หัวข้อน่ะ) แล้วก็ tag ชื่อเพื่อนต่อไปอีก 5 คน (ดีที่ไม่มีแ่ช่งด้วยนะ) เขียนเป็นภาษาอังกฤษข้างบนละ เล่าตรงนี้สั้นๆ ละกัน
  1. ผมเป็น doctor ที่แปลว่าหมอจริงๆ นะ ไม่ใช่คนที่จบปริญญาเอก แต่ดันสนใจคอมพิวเตอร์กับ IT จนกลายเป็น geek (หรือเปล่า?)

  2. จับคอมฯ ครั้งแรกตอนอยู่ ม.1 เล่นเครื่อง Apple ][ ที่มากับจอเขียว, ฟลอปปี้ไดรฟ 2 อัน, Apple DOS และภาษาเบสิคที่ติดมากะเครื่อง ที่ห้องคอมของโรงเรียน ตอนนั้นก็ทำอะไรไม่ได้มาก นอกจากเล่นเกม Hang man แล้วก็เขียนภาษาเบสิคเพื่อให้มันแสดง ASCII art

  3. ใช้ชื่อ DrRider เพราะเป็นหมอ แล้วก็ชอบคาเมนไรเดอร์ แค่นั้นแหละ

  4. หลังๆ มาเขียน blog entries เป็นภาษาอังกฤษเพราะว่าอยากหัดเขียนบทความภาษาอังกฤษ ส่วนนึงเพราะจะไปสอบภาษา (IELTS, OET, etc...) แต่ไปๆ มาๆ ก็เขียนไม่ดีซักที เพราะรูปแบบการเขียนมันไม่เหมือนกัน แถมดีไม่ดีคนอ่านบล็อกจะลดลงด้วย เพราะขี้เกียจอ่านภาษาอังกฤษ - -'

  5. รู้หรือไม่ว่า ผมพยายามใช้ภาษาอังกฤษแบบ British English มากกว่าที่จะใช้ American English บางทีเห็นผมสะกดแปลๆ (เช่นใช้ s แทน z หรือเพิ่มตัว u เข้าไปมั่งอะไรแบบนี้) เพราะว่ามันเป็น British English ไง


สุดท้ายนี้ขอส่งต่อไปให้...

คุณ wd, คุณสมเจตน์, Mr. Eak, น้องสุดหล่อ และสุดท้าย eYacht (หวังว่าคงมาอ่าน entry นี้นะครับ :D)

Thursday, November 16, 2006

Vision?

"With open source, there is no intellectual property. Anyone can use it and all your ideas become public domain. If nobody can make money from it, there will be no development and open source software quickly become outdated."

--Dr Sitthichai, Minister of Ministry of ICT--
Bangkok Post


I know that you're a programmer but you know nothing regarding opensource.

Nothing to say... -_-'

Please look here.

Update:

It seems that everything is resolved without a hitch after opensource people went to see the minister. He admitted that he did not know much regarding opensource. And now he knows and is willing to support opensource, including OLPC (Children machine).

You can see some details here