-
package-manager source lists corrupted
Posted on September 14th, 2012 No commentsอาการ: จะปรากฎเครื่องหมาย ห้ามเข้า (-) สีแดงบน Tray
แก้ไขโดย: ลบ Folder “lists” แล้วสร้าง folder ใหม่ว่าง ๆ ไว้
root@APMooseX220:/var/lib/apt# rm -rf lists
root@APMooseX220:/var/lib/apt# mkdir listsจากนั้นก็ update ครับ
root@APMooseX220:/var/lib/apt# apt-get update -
ปัญหา ไม่สามารถแสดงผลจอภายนอกแต่เพียงจอเดียวพร้อมกับปิดจอของ notebook
Posted on January 6th, 2012 No commentsอาการ notebook ทำได้เพียง clone/extend จอภาพภาพนอก (monitor , VGA projector) และจอ notebook ได้เท่านั้น ไม่สามารถสั่งปิดจอ notebook และเปิดเฉพาะจอภายนอก
การแก้ปัญหา
* เข้าไปที่ /home/anan/.config แล้วทำการลบ file ที่มีชื่อว่า monitors.xml ทิ้ง
* reboot เครื่องใหม่ จากนั้นก็ทำการ ตั้งค่าจอปกติจาก System setting –> Display แล้วเลือกการตั้งค่าที่ต้องการ
* ระบบจะทำการสร้าง file ที่มีชื่อว่า monitors.xml ให้ใหม่ (แต่จะมีเฉพาะข้อมูลของจอที่ใช้อยู่เท่านั้น ถ้าไปทำการใช้งานจอภาพนอกอันอื่น monitors.xml ก็จะถูก update)
ตัวอย่าง file ที่ชื่อ monitors.xml
<monitors version="1"> <configuration> <clone>no</clone> <output name="LVDS1"> <vendor>LCD</vendor> <product>0x58eb</product> <serial>0x01010101</serial> </output> <output name="VGA1"> <vendor>SAM</vendor> <product>0x049a</product> <serial>0x434d3232</serial> <width>1920</width> <height>1080</height> <rate>60</rate> <x>0</x> <y>0</y> <rotation>normal</rotation> <reflect_x>no</reflect_x> <reflect_y>no</reflect_y> <primary>yes</primary> </output> <output name="DVI1"> </output> <output name="TV1"> </output> </configuration> </monitors>
-
การสร้าง password สำหรับ protect การเข้าถึง directory หรือหน้า Web
Posted on April 28th, 2011 No commentsสามารถทำได้โดยการใช้ .htaccess
เช่นต้องการสร้างให้ user ชื่อ myGuest สามารถ เข้าใช้งาน directory ชื่อ /public-html/pweb
โดยใช้ password ว่า “helloworld”วิธีการดังนี้
1. สร้าง password file (ใช้ชื่ออะไรก็ได้เช่นในตัวอย่างนี้ต้องการใช้ชื่อว่า PasswdFIle แต่อาจสร้างเป็น hidden file ก็ได้เช่นตั้งชื่อว่า .htpasswd)
Anan@Moose$ htpasswd -c PasswdFile myGuest
New password: <— ใส่ password ที่ต้องการ ในที่นี้คือ helloworld
Re-type new password: <— ใส่ helloworld อีกครั้ง
Adding password for user myGuestถ้าทดลองดู file ที่มีชื่อว่า PasswdFile จะพบ
Anan@Moose$ cat PasswdFile
myGuest:.AaK93J3nybioP <— ตัวอย่างข้อมูลใน password file ที่ถูกเข้ารหัสตาม password ที่ตั้งไว้
2. สร้าง .htaccess file
Anan@Moose$ cd public-html/pweb <— ย้ายไป directory ที่ต้องการ protect
Anan@Moose:~/public-html/pweb$ vi .htaccessAuthType Basic
AuthName “restricted area” <—- ระวังอักษรตัว quote เป็นฟันหนูคู่ ” ” (ถ้าผิดระบบอาจฟ้อง Internal Server Error)
AuthUserFile /home/Anan/PasswdFile
require valid-user
ServerSignature Off2. ทดสอบดู โดยการพยายามเข้าที่หน้านั้น จะพบว่าให้ใส่ username และ password
ก็ให้ใส่ myGuest และ helloworld ก็จะมองเห็น file ใน directory ที่ต้องการ protect
แต่ถ้าใส่ผิด จะถาม username และ password โดยไม่ยอมให้เข้าครับ -
Convert WAV to MP3 (Ubuntu 10.10)
Posted on November 5th, 2010 No commentsสามารถทำได้ง่ายมากใน 2 ขั้นตอนครับ
1. ติดตั้ง MP3 Codex โดย ติดตั้ง Ubuntu Restricted Extras package
$ sudo apt-get install ubuntu-restricted-extras
2. หลังจากนั้นติดตั้ง program แปลงไฟล์
$ sudo apt-get install soundconverter
ตอนใช้งานก็เลือกที่ Edit–>Preferences แล้วเลือก Output format เป็น MP3 ก็เรียบร้อยครับ
reference: http://www.jonathanmoeller.com/screed/?p=2328