Category Archives: Tips

Ubuntu on VirtualBox screen resolution problem

ตอนที่เราติดตั้ง Ubuntu ลงบน VirtualBox on Windows มักจะพบกับปัญหาเรื่องขนาดของหน้าจะที่เล็กเกินไป ที่ผมเจอ ขนาดหน้าจะตอน login จะเป็น

ติดตั้งโปรแกรมโดยใช้คำสั่งทั้ง 3 ข้างล่าง

$sudo apt-get install virtualbox-guest-utils 

$sudo apt-get install virtualbox-guest-x11

$sudo apt-get install virtualbox-guest-dkms

หลังจากติดตั้งโปรแกรมเรียบร้อยแล้วก็ reboot

ทดลอง login อีกครั้งหนึ่ง

เท่านี้ก็เรียบร้อยแล้วเราสามารถปรับ ตั้งค่า screen resolution ของ Ubuntu ใน VirtualBox ได้แล้วครับ

Credit: http://askubuntu.com/questions/73589/higher-screen-resolution-for-virtualbox

วิธีแก้เมื่อ vgaswitcheroo ใช้งานไม่ได้บน Ubuntu 14.04

ตอนที่ใช้งาน Ubuntu 13.10 เมื่อต้องการ ปิดระบบ Hybrid Graphic card ก็สามารถใช้คำสั่งในการจัดการ vgaswitcheroo 

# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

$ sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash radeon.runpm=0″
sudo update-grub

GRUB_CMDLINE_LINUX_DEFAULT=
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.runpm=0"
sudo update-grub
echo OFF > /sys/kernel/debug/vgaswitheroo/switch
 แต่พอ อัพเกรดเวอร์ชั่นมาเป็น 14.04 คำสั่งข้างบนใช้ไม่ได้ซะงั้นเลยต้องหาวิธีปิด ATI บนเครื่อง Vostro 3450 เพราะถ้าเป็นใช้การ์ดจอทั้งสองอันพร้อมกัน พัดลมจะทำงานหนัก และมีเสียงดัง

สุดท้ายก็เจออออ

วิธีการก็ไม่มีอะไรมาก เข้าไปแก้ไขไฟล์ /etc/default/grub 

 ค้นหาคำนี้ในไฟล์ GRUB_CMDLINE_LINUX_DEFAULT
โดยปกติแล้วจะมีค่ากำหนดให้เป็น “quiet splash” แอดข้อความนี้ต่อท่ายลงไป radeon.runpm=0

บันทึกไฟล์(ถ้าใช้ vi/vim ให้พิมพ์ :wq) หลังจากบันทึกเรียบร้อย รันคำสั่งด้านล่างเพื่ออัพเดท grub
ลองรีสตาร์ทเครื่อง

ลองดูนะครับ…

more information from AskUbuntu.com

” saw in 13.10. The effect is exactly the same as if discrete graphics is on, laptop is loud and terribly overheats. Typing sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch gives no effect, output of cat /sys/kernel/debug/vgaswitcheroo/switch doesn’t change.”

from my experience, DynOff works better than manual Off. It still says Off (DynOff) and I guess that it means the card is not powered and that this is automatic.
However, if you still want to roll things back to the manual settings, you have to modify grub. Use sudoto do the following:
open in any editor the file /etc/default/grub and find the line
there should be values like “quiet splash” in this line; just add radeon.runpm=0 so it looks something like this:
save the file and run
then reboot. after rebooting, the behavior of cat /sys/kernel/debug/vgaswitcheroo/switchshould be like in older ubuntu version. then you can run
to see if it works – as you used to do before. if it works, add this line to /etc/rc.local just above exit 0.
i tried it on my machine and it basically works… but i think that DynOff is doing exactly the same. my computer is not overheating with both configurations.


iPhone มี Find my iPhone, Android ก็มีนะจ๊ะ ใช้ยังไงไปดูกัน

Find my iPhone ของทางฝั่ง Apple เป็นฟังก์ชั่นที่ใช้เมื่อมือถือของเราเกิดหายไป โดยมีความสามารถหลายด้าน ลายละเอียดสามารถอ่านได้จากเว็บทั่วไปนะครับ อันนี้เป็นอีกลิงค์หนึ่งที่มีการอธิบายเอาไว้ คลิ๊กอ่าน หรือ ที่นี่
เข้าเรื่องกันเลย … แล้วถ้าเราใช้มือถือ Android ล่ะ จะมีวิธีป้องกันปัญหาแบบนี้หรือไม่ 

ตอบ… มีครับฟังก์ชั่นบน Android เราจะเรียกว่า Android Device Manager 

วิธีการใช้งานก็ไม่ยากครับ เราสามารถเรียกใช้ฟังก์ชั่นนี้ได้จาก https://www.google.co.th/android/devicemanager หรือจะเป็นทาง http://play.google.com จากนั้นเลือกการตั้งค่า จะมีเมนู Android Device Manager ให้เลือก

เมื่อเข้าไปยังหน้าจอระบบจะให้เราทำการเข้าสู่ระบบด้วย Google Account ก่อน
จากนั่นจะแสดงอุปกรณ์ที่เราได้ผูกกับ Google account เอาไว้พร้อมแสดงสถานะว่าสามารถติดต่อกับเครื่องของเราได้หรือไม่

ตัวเลือกในการใช้ Android Device Manager จะมีอยู่ 3 ตัวคือ

  1. ให้โทรศัพท์ส่งเสียงหรือให้รู้ตำแหน่ง
  2. ทำการล๊อคโทรศัพท์ด้วยการกำหนดรหัสใหม่ พร้อมสามารถแสดงข้อความการติดต่อกลับ สำหรับผู้พบเจอ
  3. ลบข้อมูลในเครื่อง

ในตัวอย่างจะขอแสดงการล๊อคด้วยการตั้งรหัสผ่านใหม่นะครับ

วิธีการตั้งค่าให้ Console2 ใช้งานกับ Windows Powershell

โดยค่าเริ่มต้นแล้วโปรแกรม Console2  จะถูกตั้งค่าให้เรียกใช้ Command Prompt เป็น Shell ในการรันคำสั่ง

วิธีการเปลี่ยน Shell ให้ไปเป็น Power Shell ใน Windows 7

1.คลิ๊กขวาบนหน้าจอโปรแกรม เลือก Edit > Settings…

 2. ในส่วนการตั้งค่า Console ให้ดูที่ช่อง Shell:
        คัดลอกที่อยู่(path) ของโปรแกรม Power Shell ใน Windows ลงไปใส่ในช่อง

%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe

 

Go To End of File in VI Editor

If you want to go to the end of file. You can press ESC button and “G” (Capital G) for go to end of file in VI or VIM editor.

To move to end of file just type G (press ESC and type capital G):

ESC + G

You can jump back to beginning of file by typing any one of the following command

ESC + gg

or

ESC + 1G

You can jump to line number 700 (press ESC type 700G)

ESC + 700G

credit :: www.cyberciti.biz

 

วิธีการตั้งค่า IMAP ของ Evolution Mail

วิธีการตั้งค่า IMAP ของ Evolution Mail
โดยปกติแล้วถ้าเราตั้งค่า Email ด้วย Gmail, Yahoo จะค้นหา Server ให้โดยอัตโนมัติและมีให้เลือกทั้งแบบ POP3 และ IMAP
แต่ถ้าเราใช้อีเมล @hotmail.com โปรแกรม evolution จะไม่สามารถค้นหา Sever ให้อัตโนมัติได้
วันนี้จะขอเขียนวิธีการตั้งค่า Server แบบ imap ของ outlook.com
เริ่มต้นจากการเข้าไปตั้งค่าต่างๆ Email

  • เลือก Edit > Preferences > เลือก Mail Accounts
  • จากนั้นกดปุ่ม Add

add_account_screen

  • กดปุ่ม Continue
  • กรอกข้อมูลเกี่ยวกับข้อมูลบัญชี Email

account_detail

  • Receiving Email ทางด้านฝั่งทางรับอีเมล
    • Server address: “imap-mail.outlook.com”
    • Server port: “993”
    • Encryption type: “SSL”

imap_detail

  • ตั้งค่า Server ฝั่งด้านส่ง Email
    • Server address: “smtp-mail.outlook.com”
    • Server port: “587”
    • Encryption type: “TLS” (“SSL” can be used if TLS is not an option)

smtp_detail

Credit :: http://betanews.com/2013/09/16/how-to-set-up-outlook-com-with-imap-in-os-x-mail/

How to config email server of outlook.com as IMAP on Evolution mail

วิธีการตั้งค่า IMAP ของ Evolution Mail

โดยปกติแล้วถ้าเราตั้งค่า Email ด้วย Gmail, Yahoo จะค้นหา Server ให้โดยอัตโนมัติและมีให้เลือกทั้งแบบ POP3 และ IMAP

แต่ถ้าเราใช้อีเมล @hotmail.com โปรแกรม evolution จะไม่สามารถค้นหา Sever ให้อัตโนมัติได้

วันนี้จะขอเขียนวิธีการตั้งค่า Server แบบ imap ของ outlook.com

เริ่มต้นจากการเข้าไปตั้งค่าต่างๆ Email

  • เลือก Edit > Preferences > เลือก Mail Accounts
  • จากนั้นกดปุ่ม Add

add_account_screen

How to Copy, cut and paste in Vim editor

วิธีการ Cut and Paste

  1. เลือก cursor ไปตำแหน่งแรกที่ต้องการจะ cut ข้อความ
  2. กด v เพื่อเลือกข้อความ (หรือกด V ตัวใหญ่เพื่อทำการเลือกทั้งบรรทัด)
  3. เลื่อน cursor ไปยังตำแหน่งสุดท้ายที่ต้องการ cut 
  4. กดปุ่ม d
  5. จากนั้นเลือกตำแหน่งของ cursor ไปยังตำแหน่งที่ต้องการจะวางข้อความที่ cut ไว้
  6. กด P ตัวใหญ่เพื่อวางข้อความหลัง cursor , กด p ตัวเล็กเพื่อวางข้อความหน้า cursor

วิธีการ Copy & Paste
    จำทำลักษณะคล้ายกับการ Cut & Paste แต่ในขั้นตอนที่ 4 เปลี่ยนจากการกด d มาเป็น y แทน

ปล. (d:delete or y:yank).

How to change default desktop location on Windows 7

To change your default desktop location and do the following:

  1. Open the Registry editor (Regedit.exe) Start > run > regedit [Enter]
  2. Browse to the location:
    HKEY_CURRENT_USER> Software > Microsoft > Windows
    > CurrentVersion > Explorer > User Shell Folders.
  3. In the right window pane select the required value (i.e. Desktop).
  4. Insert the new location for the folder to be stored.
  5. Close the registry editor and log off.