Wednesday, December 26, 2012

how to disable annoying Super Key in Ubuntu Linux with Unity Window Manager

First I should say that Super brings up the big overlay grid, that is called the Dash. Tappipng Alt brings up the HUD, a smaller text field in the top left. It's a 'type-a-little' interface to all the commands in system and application menus. We can get a link for more info, if needed.
So you can shut off the Super key, with the low-level tool Compiz Config Settings Manager. The package name is compizconfig-settings-manager, if it's not installed yet.
Open the Dash, and type 'ccsm'. You should see an icon you can run. When the app opens, you may get a warning that it's a tool that can mess up your system. This is true; it doesn't have any constraints on choosing settings that may break your desktop in different ways. But this change alone will be ok.
In CCSM, find and choose 'Ubuntu Unity Plugin'. The first tab, Behavior, should have an item 'Key to show the launcher'. Click on the button that shows Super, and you can disable it, or choose a different key if you want to try that.
Notes:
- this is how it looks for me under 12.10. It's about the same, as I recall, under 12.04.
- It should probably say 'Key to show the dash'. Maybe I'll find or file a bug about that.
- unchecking 'Enable Ubuntu Unity Plugin', under Unity, is the kind of thing that would send your window controls, and lots of the UI, into never-never land.


Reference


Wednesday, December 19, 2012

harddisk ของ Western Digital มีปัญหากับ RAID-1

หากท่านนำ harddisk ของ Western Digital มาใส่เป็น member ของ RAID-1 ท่านจะพบปัญหาการ rebuild ไม่จบ โดย status ของ raid เมื่อดูด้วย mdadm จะเป็น clean, degraded และ spare rebuilding

สาเหตุเกิดจาก module NCQ ใน harddisk ท่านต้อง disable ที่ sysctl.conf เพิ่มบรรทัด (สมมติ harddisk ลูกนั้นคือ /dev/sdb):

block/sdb/device/queue_depth=1


References

swap file

You can use file as swap space.

dd if=/dev/zero of=/var/swap bs=1M count=10240
mkswap swap
swapon /var/swap
chmod 0600 swap


Add this into /etc/fstab

/var/swap       swap    swap    defaults        0 0

Wednesday, November 21, 2012

How to change network interface descriptor (eth0, eth1, ...) in Linux

Easy easy. Just edit the file:


/etc/udev/rules.d/xxx-persistent-net.rules

ความย่อยยับของแนวทางการตั้งรหัสผ่านแบบยากๆ

บ้าไปแล้ว ช่วงนี้พบการเปลี่ยนแปลงของเว็บไซต์ใหญ่ๆเช่น GoDaddy และ PayPal ในช่องกรอกรหัสผ่าน (password) ขณะนี้ไม่สามารถ copy จากไฟล์รหัสผ่านที่ผมจดไว้แล้วมา paste ไปในช่องนี้ได้ ซึ่งมีทางเลือกให้ผม 2 ทาง ได้แก่
  1. นั่งพิมพ์รหัสผ่านทีละตัว เพื่อ log in
  2. เคาะ space หนึ่งทีก่อนเพื่อหลอก JavaScript ว่าเราพิมพ์เองแล้ว จากนั้น paste รหัสผ่านลงไป แล้วกลับมาที่ character แรกเพื่อลบ space อันเดียวนั้นออก เพื่อ log in
คือ... มันบ้าไปแล้วหรอครับ บังคับให้มานั่งพิมพ์รหัสผ่านเองด้วยมือหรอ แฝงความนัยว่า อยากสนับสนุนให้ user ตั้งรหัสผ่านง่ายๆ ที่สามารถจำได้ด้วยมันสมองอันน้อยนิดของมนุษย์หรอครับ
บอกกัน สนับสนุนกันตลอดให้ตั้งรหัสผ่านยากๆไม่ใช่หรอ? แล้ว feature ใหม่นี้คืออะไร???

จะตั้งรหัสผ่านยากๆ ผมก็ทำอยู่ รหัสผ่านส่วนใหญ่ผมก็ประมาณนี้:

jkskk##%%Xax134_SkxmknKSKq233jkhMnjklszP

แล้วผมก็จดใส่ไฟล์ที่อยู่ใน partition ที่เข้ารหัสของผมด้วย dm-crypt หรือ ecryptfs ซึ่งมีความปลอดภัยสูงในระบบปฎิบัติการ Linux เวลาใช้งานผมก็ copy and paste สิครับ

พระเจ้าช่วย... ไม่เข้าใจเลยจริงๆ ทำอะไรของมันกันเนี่ย

หลัง upgrade openssl แล้วไม่สามารถ ssh เข้า server ได้

ใน Debian บาง version หากท่านทำการ upgrade openssl แล้ว ไม่สามารถ ssh เข้าเครื่องได้ ไม่ต้องตกใจ ให้ลอง upgrade openssh-server ดูด้วยครับ

สอง package นี้น่าแปลกที่ไม่มี dependency ต่อกันเวลาใช้ apt-get แต่กลับมีการ reference ถึงกันในบาง configuration file

Monday, November 19, 2012

how to view who create which files in samba

Just add these lines below in your smb.conf file:

vfs objects = full_audit
full_audit:prefix = %u|%I|%m|%S
full_audit:success = mkdir rename unlink rmdir pwrite
full_audit:failure = none
full_audit:facility = LOCAL7
full_audit:priority = NOTICE

Sunday, November 18, 2012

Thai Font in Firefox - Ubuntu 12.04.1


เปิดเว็บที่มีเนื้อหาเป็นภาษาไทยด้วย Firefox บน Ubuntu 12.04.1 มาก็ดูได้ดี แต่ในบางจุด เช่น หาก เนื้อหาภาษาไทยนั้นไซร้ไปอยู่ใน textarea เพราะอะไรสักอย่าง Firefox ไปเลือกใช้ monospace font กับมัน ทำให้ตัว ไม้หันอากาศ หรือ ตัว อุ อู จะเลื่อนๆเหลื่อมๆออกไป วิธีแก้ให้ตั้งค่า Font เป็น Norasi สำหรับ Thai ดังภาพครับผม

Thursday, November 15, 2012

ลาก่อน GoDaddy Cloud T_T

เศร้าจุงเบย เมื่อได้ทราบข่าวจาก GoDaddy ว่า GoDaddy Instant Data Center (a.k.a. GoDaddy Cloud) จะปิดให้บริการในเดือนเมษายน ปีหน้า (พ.ศ. 2556) ชาวไทยคงเตรียมย้าย website กันแทบไม่ทัน

GoDaddy ให้เหตุผลว่า:


 ”We are focused on SMBs and SMBs don’t use this product the way we are offering it now. So, in the weeks ahead, it won’t be a stand-alone product in and of itself. However, we plan to continue developing cloud technology into our other hosted products.
“We will continue to support existing Cloud Server customers in a variety of ways.”

แปลได้ว่า

เรามุ่งให้บริการลูกค้าประเภทธุรกิจขนาดเล็กถึงขนาดกลาง ซึ่งพวกเขาไม่นิยมใช้ cloud เราจึงขอเลิกให้บริการ cloud แก่ลุกค้าของเรา แต่อย่างไรก็ดี เราก็จะยังคงพัฒนา cloud technology ของเราต่อไป สำหรับใช้ในการให้บริการแก่ท่านในรูปแบบของ shared hosting

เศร้าจังบุย หนีไป amazon ec2 กะ rackspace ดีกั่ว หุหุหุ

ป.ล. อยากช่วยบริจาคให้ผู้ป่วยเป็นโรคมะเร็งกับ GoDaddy รีบไปจดทะเบียนโดเมนเนม .com กันถ้วนหน้าราคาถูก แถมเงินส่วนหนึ่งจะถูกนำไปบริจาคด้วย

Tell Your story. Share Your Strength. $5.99 .COM from GoDaddy.com

GoDaddy!

เชื่อแน่ว่าคงไม่มีใครไม่รู้จัก GoDaddy! ผู้ให้บริการ Web Hosting และ Domain Name Registrar อันดับ 1 ของโลก แม้จะมีผู้คนด่าทอ ต่อว่ามากมาย แต่จากประสบการณ์ของผมที่ใช้บริการ Web Hosting และ Domain Name Registrar มามากมายหลากหลายเจ้า กลับพบว่า สุดท้ายแล้ว ระบบของ GoDaddy ก็มีความเป็นมืออาชีพมากที่สุด

GoDaddy - World's #1 Domain Registrar

หากคุณต้องจัดการ website จำนวนมาก และต้องดูแล domain names จำนวนมาก แล้วต้องมาทนใช้ control panel ห่วยๆจากผู้ให้บริการ ไม่ว่าจะเป็น hostgator, dotster หรือ ผู้ให้บริการไทยๆเจ้าอื่นๆ แล้วคุณจะพบกับอาการจิตตก งงไปหมด นั่นก็ไม่ได้ นี่ก็ไม่ได้ เลิกใช้แล้วก็ยังค้างอยู่ จะ transfer domain ก็ต้องส่งเมล์ไปบอก domain name manager ก็ไม่มี นั่นก็ขาด นี่ก็หาย

ระบบ control panel สำหรับทั้ง Web Hosting และ Domain  Name Manager ของ GoDaddy เยี่ยมยอดสุดแล้วครับ