แสดงบทความที่มีป้ายกำกับ ubuntu แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ ubuntu แสดงบทความทั้งหมด

วันจันทร์ที่ 12 กรกฎาคม พ.ศ. 2553

การเซ็ต trackpoint ของ thinkpad ใน Ubuntu

โดยปกติแล้วใน windows จะมี software ชื่อ UltraNav สำหรับควบคุมการทำงานของ trackpoint ทำให้ผู้ใช้ thinkpad บน windows สามารถควบคุม trackpoint ได้ แต่ใน ubuntu ต้องทำการแก้ไขไฟล์บางไฟล์เล็กน้อย เพื่อให้สามารถใช้ความสามารถของ trackpoint อย่างเต็มที่ได้ มีขั้นตอนดังนี้

1. สร้างไฟล์ /usr/lib/X11/xorg.conf.d/20-thinkpad.conf โดยใช้คำสั่ง
sudo gedit /usr/lib/X11/xorg.conf.d/20-thinkpad.conf

2. เพิ่มข้อความดังนี้ลงไปในไฟล์
Section "InputClass"
    Identifier "Trackpoint Wheel Emulation"
    MatchProduct "TrackPoint"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "2"
    Option "Emulate3Buttons" "false"
    Option "XAxisMapping" "6 7"
    Option "YAxisMapping" "4 5"
EndSection

3. save ไฟล์ และทำการ restart โดยใช้คำสั่ง
sudo /etc/init.d/gdm restart

4. จะสามารถใช้ trackpoint ร่วมกับปุ่มกลางของ touchpad ได้

reference:
http://psung.blogspot.com
http://thaipats.buddythai.com

วันพุธที่ 7 กรกฎาคม พ.ศ. 2553

การเปลี่ยนค่า screen resolution ของ ubuntu

ในการ install ubuntu บางครั้ง resolution ใน monitor ได้ค่าไม่ตรงกับค่าที่เคยเซ็ตใน windows ทำให้จอไม่ชัดหรือเบลอ สามารถแก้ไขได้ตามวิธีการดังนี้

1. เปิด terminal พิมพ์คำสั่ง

xrandr

2. จะได้ข้อความดังนี้
Screen 0: minimum 320 x 200, current 2464 x 900, maximum 8192 x 8192
VGA1 connected 1440x900+1024+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1360x768       59.8  *
   1024x768       60.0  
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9     59.9  
LVDS1 connected 1024x768+0+132 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   85.0     75.0     70.1     60.0*    50.0  
   832x624        74.6  
   800x600        85.1     72.2     75.0     60.3     56.2  
   640x480        85.0     72.8     75.0     60.0     59.9  
   720x400        85.0  
   640x400        85.1  
   640x350        85.1  
TV1 disconnected (normal left inverted right x axis y axis)

* หมายเหตุ VGA1 คือ Acer monitor 17" ที่ต่อเพิ่ม ส่วน LVDS1 คือ monitor ของ Thinkpad R61

3. สิ่งที่ต้องการคือ ต้องการเพิ่มความละเอียด 1440x900 ในมอนิเตอร์ VGA1 ให้ทำการเช็ค modeline โดยใช้คำสั่ง

cvt 1440 900

*หมายเหตุ 1440 900 คือความละเอียด 1440x900 พิกเซล

4. จะแสดงผลดังนี้

# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

โดยเราจะใช้โค้ดที่ต่อจาก modeline คือ
"1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
ในการเซ็ตค่าที่ไฟล์ /etc/gdm/Init/Default

5. เปิดไฟล์ /etc/gdm/Init/Default โดยใช้คำสั่ง

sudo gedit /etc/gdm/Init/Default

6. ค้นหาบรรทัดดังนี้
PATH=/usr/bin:$PATH
OLD_IFS=$IFS

7. เพิ่มโค้ดต่อท้ายดังนี้
xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
xrandr --addmode VGA1 1440x900_60.00
xrandr --output VGA1 --mode 1440x900_60.00
โดยค่าที่ใส่ในบรรทัด newmode คือค่าที่ได้จากการเช็ค modeline

8. restart ubuntu และเช็คค่าที่ System > Preference > Monitor จะพบ resolution ใหม่ที่เพิ่มเข้าไปแล้ว

Reference: http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html