หน้าเว็บ

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

วันอังคารที่ 26 กันยายน พ.ศ. 2560

วิธีใช้งาน Serial Port บน Linux

จากการที่ได้ทดลองใช้งาน config อุปกรณ์หลายๆ อย่างทางด้าน network วิธีแก้ปัญหาด้านการ config คือการใช้งาน console port แทนการใช้งาน config ด้วย ip ซึ่งจะเด้งหลุดออกมาบ่อย เนื่องจากการ config ip สำหรับการใช้งาน serial port ผ่าน computer desktop สามารถเข้าไปดูได้ที่ Device Manger ว่า serial port อยู่ port ที่เท่าไหร่ ซึ่งจะเอามาใช้งานที่ตัวโปรแกรม putty ได้เลย


เช่นตัวอย่าง มีทั้ง Com1 Com2 ที่มี port ติดมาให้กับเครื่อง desktop และมี USB Serial Port ที่เสียบเพิ่มเป็น Com4 เพิ่มขึ้นมาด้วย ส่วนใหญ่ใช้งานกับเครื่องที่ไม่มี serial port มาให้ รวมถึง notebook ด้วย

หากต้องการใช้งาน serial port บน linux ต้องใช้งานในสถานะของ root เท่านั้น (ผ่าน command line) ไม่อย่างนั้นต้องไปกำหนด chmod port นั้นๆ ให้สามารถใช้งานด้วยผู้อื่นได้ เช่นผ่านโปรแกรม putty ต้องกำหนดให้เป็น 666 จากเดิม 600







วันเสาร์ที่ 14 กันยายน พ.ศ. 2556

การเปลี่ยนภาษาด้วย "~" grave accent สำหรับ Linux ตระกูล Debian

การเปลี่ยนภาษาด้วย "~" grave accent สำหรับ Linux ตระกูล Debian (Mint,Ubuntu,Tle ...)
0. download  http://noc.rmutl.ac.th/main/wp-content/plugins/download-monitor/download.php?id=29  (25 ต.ค.2559 ยังโหลดได้อยู่) แล้วแตกไฟล์
0.1 ลิงค์สำรองบน Google Drive ลิงค์สำรองใน google drive หากข้อ 0 ไม่สามารถโหลดได้แล้ว 
1. เปิด Terminal ขึ้นมา แล้วเปลี่ยนสิทธิเป็น Root 
2. เข้าไปยังโฟลเดอร์ grave-key  ที่แตกไว้ตามข้อ 0.
3. เป็นสิทธิของไฟล์ script.sh ให้สามารถทำงานได้ โดยใช้คำสั่ง chmod 755 script.sh
4. สั่งให้ไฟล์ Script ทำงาน โดยใช้คำสั่ง ./script.sh
5. เข้าไปแก้ไขค่าของคีย์บอร์ด โดยไปที่ menu –> Control Center –> Keyboard –> Layouts –> Layouts Options
6. เข้าไปเช็คบ็อคในส่วนของ Grave switches layout 

- ที่ได้ทดสอบ ใช้ได้ตั้งแต่ ubuntu 8.04 - 13.04 linuxmit 7 - 15 ปัจจุบันกันเลยทีเดียว สงสัยต้องแกะไฟล์มาอ่านบ้างซะแล้ว
- ฝากไฟล์เอาไว้อีกที่ใน google drive ด้วย เผื่อลิงค์เดิมหาย

วันจันทร์ที่ 9 กันยายน พ.ศ. 2556

กลับมาทดสอบระบบ os linux mint 15

หลังจากที่ได้เงียบหายไปกับการเขียนบล็อค ตอนนี้ก็กลับมาพัฒนาต่อด้วยบทความที่ว่า ทำไมจึงกลับมาใช้งาน Linux Mint 15 แทนที่จะใช้งาน Ubuntu 12.04 LTS ซึ่งเป็น base หลักของ Linux Mint เหตุผลให้ได้สั้นๆ เพราะว่า ubuntu 12.04 lts ณ ตอนนี้ที่ทำ ยังไม่รองรับกับ cpu core i7 gen3 รุ่นนี้ เนื่องจากมีกราฟฟิคการ์ดสองตัว ซึ่ง intel ได้ยัดเอากราฟฟิคการ์ดของตัวเองใส่เข้าไป เมื่อเริ่มระบบคอมพิวเตอร์ ระบบจะอ่านเอากราฟฟิคการ์ดตัวนี้มาทำงานก่อน และเมื่อมีการใช้งาน openGL หรือระบบกราฟฟิค จึงจะเปิดใช้งาน hypergraphic อีกตัวขึ้นมา ก็แปลกดี เลยต้องกลับมาใช้งาน Linux Mint 15 เนื่องจากรองรับ และมี driver ควบคุมมาให้พร้อมสรรพ เรียบร้อยแล้ว (จริงๆ 14 ก็ทำงานได้ เขียนไว้แล้วก่อนหน้านี้ แต่ต้องติดตั้งเอาเอง) เดี๋ยวลงโปรแกรมแล้ว มาลองดูกันว่า มันพัฒนาอะไรเพิ่มเติมขึ้นไปอีกบ้างครับ

วันเสาร์ที่ 22 มิถุนายน พ.ศ. 2556

Intel® Ivybridge Mobile & NVIDIA GEFORCE GT 630M * 2GB

หลังจากที่ได้พยายามติดตั้ง Linux Mint 14 ปัญหาที่เจอในการใช้งานมีอยู่เรื่องเดียว (ณ ตอนนี้) ก็คือเรื่องของการ์ดจอรุ่นใหม่ที่มีอยู่ใน Notebook ซึ่งเครื่องที่ได้ทดลองติดตั้งและใช้งานเป็นเครื่อง ASUS A45V Series Core i7 Ram 4Gb และการ์ดจอเจ้าปัญหา ซึ่งหลังจากที่เช็คแล้ว หากันปางตายเลยได้รู้ว่า ไอ้ cpu รุ่นใหม่ๆ มันรวม Graphic Chip ลงไปในตัวของมันเองเลย ซึ่งไอ้เครื่องนี้ ที่ชิพเซ็ต มันมี intel อยู่แล้ว แต่สงสัยกลัวขายไม่ออกละม้าง เลยยัด Nvidia ลงไปอีกตัวนึง การทำงานหลักๆ จะเรียกใช้งาน intel เป็นหลัก ถ้ามีการใช้งานโปรแกรมไหนต้องการใช้งานกราฟฟิกหนักๆ จะเรียกใช้งาน Nvidia มาทำงานแทน อย่างว่าแหละ microsoft คนใช้เยอะ ก็เลยทำ Driver มารองรับอยู่อย่างเดียว กว่าจะค้นหามาได้ เอาซะย่ำแย่ ซึ่งวิธีการครั้งที่แล้ว ไม่ได้เรื่องเบย กว่าจะสรรหา driver มารอบรับได้ แทบแย่ ซึ่งขั้นตอนก็ ทำตามนี้ไปเลย

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic

จากนั้นให้รีบูตเครื่องครับ แล้วลองเทสดู สามารถใช้งานได้อย่างดี อะ แปลกดีว่ากันไป
หลักจากที่ได้ทดสอบแล้ว บน Linux Mint 14 สามารถใช้งานได้ และมี details บอกครบ แต่ Ubuntu 12.04 LTS ลงได้ แต่ในหน้าต่าง details ไม่บอกรายละเอียดอะไร

วันพฤหัสบดีที่ 20 มิถุนายน พ.ศ. 2556

How to Enable and Configure Apache2 Userdir Module in Ubuntu Server 12.04+/Linux Mint 14+

Apache2 userdir module is used to create a webroot in the user’s home directory. By using userdir module each user that is in the system will have the Apache2 root directory with the folder name public_html  in the home directory, If you using any web browser to access the webroot folder in the user directory you should use the “~” afterwards username. So, the url address to be http://[hostname]/~username/

By default Userdir Module is available when apache2 package installed on ubuntu server but not yet active. We just need to enable userdir module to be used. Follow the guide how to enable Apache2 Userdir Module in ubuntu server.

โดยปกติ apache2 จะไม่เปิดการให้บริการกับ user เพื่อทำเวปไซค์ได้ ต้องตั้งค่าต่างๆ ด้วยมือครับ คำสั่งย่อๆ สั้นๆ ใช้งานได้ตั้งแต่ ubuntu 12.04 ขึ้นไป หรือ Linux Mint 14 ขึ้นไปครับ

Enable Apache2 Userdir Module in Ubuntu Server 12.04


Make sure the Apache webserver is installed correctly. I’ve already wrote about How to Install LAMP server you can found it here.

Use command a2enmod to enable Apache2 userdir module. these command will be create symlink /etc/apache2/mods-available/userdir.load and /etc/apache2/mods-available/userdir.conf in to directory /etc/apache2/mods-enable/

sudo a2enmod userdir

Restart apache2 daemon with following command

sudo service apache2 restart

Ceate folder “public_html” in the home directory, then set permission public_html folder to 0755

mkdir ~/public_html && chmod 0755 ~/public_html

Apache2 Userdir Module Support PHP Script ทำให้ user สามารถใช้งาน php ได้ด้วย เพราะปกติจะใช้งานได้แค่ไฟล์ htm,html เท่านั้นครับ


After userdir module enabled, users can put HTML files into the folder /home/username/public_html. But only static HTML files only, PHP scripts can not be used. Although Apache2 have been bundled with PHP module.

PHP files from user’s public_html directory is disabled by default for security reasons. so that all PHP files that is inside the public_html folder will be recognized as mime-type Application/octet-stream and will be downloaded when accessed via web browser. If you want to enable PHP processing when using userdir this is what you need to do. First you edit following Apache configuration file in this way:

sudo nano /etc/apache2/mods-available/php5.conf

Now you need to comment out a line php_admin_value engine Off

Before:

 <IfModule mod_userdir.c> 
<Directory /home/*/public_html>
 php_admin_value engine Off
 </Directory>
 </IfModule> …

After:

 <IfModule mod_userdir.c> 
<Directory /home/*/public_html>
 # php_admin_value engine Off
 </Directory>
 </IfModule> …

Save and exit, then reload apache2 configuration with following commad:

sudo /etc/init.d/apache2 reload

To testing PHP script work or not in the public_html directory, you can create some php script. In this case we are using phpinfo, in terminal type following command

echo '<?php phpinfo(); ?>' > ~/public_html/info.php
อ่านมาตั้งนาน งงกันไม๊ครับ เป็นวิธีการทำให้ directories ของ user สามารถใช้งานเป็นเวปไซค์ของตัวเองได้ โดยจะมี ~user เป็น path ตาม url ครับ เช่น http://127.0.0.1/~ton/info.php ครับ ก็จะเห็นหน้าต่างแสดงรายละเอียดการตั้งค่าต่างๆของ server php5 และอื่นๆ ครับ

วันพุธที่ 19 มิถุนายน พ.ศ. 2556

Install Latest Nvidia Drivers 13.04/12.10/12.04/11.10/Linux Mint 14213/12

Nvidia is well-known company all over the world regarding gaming cards. Sometimes nvidia cards have trouble in linux. So x-swat team is managing and make available Nvidia drivers for Ubuntu users. Whenever Nvidia release new drivers x-swat team also update their drivers on their ppa and doing great job for linux users.

List of Supported GPUs by these drivers:
  • GeForce GT 415M, GeForce GT 425M, GeForce GT 420M, GeForce GT 435M, GeForce GT 630M, GeForce GT 610, GeForce GT 630, GeForce GT 640, GeForce GT 645, GeForce GT 415, GeForce GT 620, GeForce 605, GeForce 610M, GeForce GT 620M, GeForce GT 635M, GeForce GT 640M, GeForce GT 640M LE, GeForce GT 650M
  • GeForce GTX 680, GeForce GTX 460M, GeForce GTX 670, GeForce GTX 660M, GeForce GTX 670M, GeForce GTX 675M, GeForce 8800 GTX, GeForce GTX 555, GeForce GTX 560 SE, GeForce GTX 460 v2, GeForce GTX 680M, GeForce GTX 660 Ti
  • Quadro 2000, Quadro 600, Quadro K1000M, Quadro K2000M, Quadro K5000, Quadro K5000M, Quadro K4000M, Quadro K3000M, Quadro FX 4600, Quadro FX 5600, Tesla K10
  • NVS 510, NVS 5400M, NVS 310
  •  GeForce 8800 GTS, GeForce 8800 Ultra
  • GeForce 6, 7, 8, 9, 200, 300, 400 & 500 series cards
  • and more .........
Before Install latest drivers make a backup of your working drivers.

To Install/Update Nvidia card drivers open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:
  • sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
  • sudo apt-get update
  • sudo apt-get install nvidia-current
When installation complete restart your PC. Now to check the installation was successful PressWindow/Super key and type: nvidia x server settings and open it.
That's it, Enjoy