Ads 468x60px

วันศุกร์ที่ 27 พฤษภาคม พ.ศ. 2554

Spatializing your Data with PostGIS, GeoDjango & OpenLayers Average rating

http://www.oscon.com/oscon2009/public/schedule/detail/7844

Spatializing your Data with PostGIS, GeoDjango & OpenLayers

Average rating
****.
(4.00, 5 ratings)
Add your rating
Chander Ganesan (Open Technology Group, Inc)
Databases, Programming, Web Applications
Location: Ballroom A2
Today, spatially enabled applications provide a fast and flexible way to better understand and analyze information. From locating the nearest grocery store to back-tracking sources of environmental pollution, GIS technologies and skills are rapidly moving from the realm of “highly specialized” to “commonplace”.
This tutorial covers some of the most common Open Source GIS technologies available today – PostGIS, a set of spatial extensions to PostgreSQL; OSGeo’s OpenLayers, a client-side JavaScript map “mash-up” application; and GeoDjango, a set of Geospatial extensions to the Django framework. Using these technologies we will explain and implement a web application using municipal street, school, police, and property data from a typical US municipality (Wake County, NC).
Attendees will learn how to import and manage spatial data using GeoDjango, perform basic spatial queries using the GeoDjango database model, and develop and deploy web-based mapping services using OpenLayers.

MapServer, QGIS, OpenLayers

MapServer, QGIS, OpenLayers

Open Layer

http://www.ninsawat.com/?p=39

Open Layer บทที่ 1


หลังจากดูคนอื่นใช้กันมานาน ก็หาโอกาสจะทำ app สักตัวที่ใช้ OpenLayers มานาน มาถึงวันนี้ก็เริ่มกันสะที ดูรวม ๆ OpenLayers เป็น API tool ที่ใช้งานง่าย สำหรับงานง่าย ๆ เช่นเปิดมาหน้าแรก add layer ตามตัวอย่างที่มีเยอะแยะใน web
ขั้นต้นก็ add Openlayers.js
<script src=”OpenLayers.js”></script>

เริ่มต้นหากจะ add layer ก็ทำตามตัวอย่างไป คงไม่อธิบายว่าทำอย่างไรแต่เกร็ดน่าสนใจคงเป็นการ add Base/Overlay
ดูเหมือนว่าจะ detect เอาเอง โดยหากต้องการระบุให้ WMS เป็น overlay ก็ต้องเพิ่มในส่วน
transparent: “true”, format: “image/png”

var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",   <---name                                 "http://wms.jpl.nasa.gov/wms.cgi", <---url                                 {layers: "modis,global_mosaic"}, <---params  {'projection':none});  <---options

ตัวอย่างจริง

layersensor = new OpenLayers.Layer.WMS(   'sensor',"http://mizu.info.gscc.osaka-cu.ac.jp/waterwqiop/owsraster.php",              {layers: 'sensor','gszMapName':'/home/msapp/water/wcs.map','wpsoutputs':'/var/www/html/wpsoutputs/',             'resultpath':sosreference,'coln':coln.substring(4),'modelname':'sensor',transparent: "true", format: "image/png"});

ประกอบด้วย 4 ส่วนหลัก name,url,params และ options โดยที่สองตัวหลังจะต้องอยู่ในเครื่อง {} เพราะมีได้มากกว่าหนึ่ง

เกร็ดเล็กน้อยอีกอันก็คือ

คำสั่งเป็นการเพิ่ม หลาย Layers ในครั้งเดียว

map.addLayers([layer, lakewms]);

และ เพิ่มแค่ 1 layer

map.addLayer(layer);
จากที่พยายามทำ app ขึ้นมา ก็ใช้งานได้ดี มีความสามารถหลากหลาย มากมายแต่ คงต้องบอกว่า ตัวอย่าง (มีแต่แบบง่าย ๆ แสดงไว้) หรือ document ยังขาดแคลน ทำให้ยังไม่สามารถใช้ประโยชน์ได้เต็มที่

OpenLayers ตอนที่ 2

Posted by admin on November 22, 2007 in openlayers
ได้ เริ่มต้นกันไปแล้วในตอนที่ 1 ตามที่ได้กล่าวมาไว้ว่า เริ่มต้นกับ OpenLayers นั้นง่ายมากแต่จะเริ่ม Advance ก็ต้องใช้วิทยายุทธกันหน่อยเพราะ Document นั้นไม่ละเอียดแต่จะบอกเป็น Class กันไป
1. ทำงานกับ UTM Projection
โดยปกติจะมีค่าเป็น LonLat แต่เราสามารถทำการตั้งค่าให้ MapContruction ของเราเป็น UTM ก็ได้

// create a map with default options in an element with the id “map1″
var map = new OpenLayers.Map(”map1″);

// create a map with non-default options in an element with id “map2″
var options = {
maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000),
maxResolution: 156543,
units: ‘meters’,
projection: “EPSG:41001″
};
var map = new OpenLayers.Map(”map2″, options);

หรือเราจะระบุเป็น Layer ไปก็ได้
var basemap = new OpenLayers.Layer.WMS( “Boston”,
“http://boston.freemap.in/cgi-bin/mapserv?”,
{
map: ‘/www/freemap.in/boston/map/gmaps.map’,
layers: ‘border,water,roads,rapid_transit,buildings’,
format: ‘png’,
transparent: ‘off’
},
{
maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656),
maxResolution: 296985/1024,
projection:”EPSG:2805″,
units: “meters”
} );

2.setCenter or zoomToExtent
การจะใช้ Zoomtopoint ก็ไม่ยาก แค่ใช้คำสั่ง
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
แต่มี ระยะ zoom นั้นมีข้อจำกัด ที่ถ้าจำไม่ผิด น่าจะ 14 หรือ 15
หากต้องการให้ละเอียดมากขึ้นอาจจะต้องใช้ คำสั่ง
map.zoomToExtent( new OpenLayers.Bounds(Yvalue-0.005,Xvalue-0.005, Yvalue+0.005, Xvalue+0.005));
3.สร้าง Markers
ต้องดำเนินการขั้นตอนคร่าว ๆ ดังนี้

var url = ‘http://boston.openguides.org/markers/AQUA.png’;
var sz = new OpenLayers.Size(15, 22);
var calculateOffset = function(size) {
return new OpenLayers.Pixel(-(size.w/2), -size.h);
};
var icon = new OpenLayers.Icon(url, sz, null, calculateOffset);
markers = new OpenLayers.Layer.Markers(”markers”);
pointnode = new OpenLayers.LonLat(0,0);
marker = new OpenLayers.Marker(pointnode, icon);
markers.addMarker(marker);

และหากต้องการ removemarker
markers.removeMarker(marker);
4.ดู Bounding Box ปัจจุบัน
ต้องทำการ setBaseLayer สะหน่อย
ตัวอย่างง่าย ๆ
map.setBaseLayer(dem);
var box = map.getExtent();
jQ(’span[name="ulx"]‘).html(box.left);
jQ(’span[name="uly"]‘).html(box.top);
jQ(’span[name="lrx"]‘).html(box.right);
jQ(’span[name="lry"]‘).html(box.bottom);

แต่หากต้องการให้เปลี่ยนตลอด เมื่อ map มีการเปลี่ยนแปลงก็ต้องทำการ add Event ตามข้างล่างเป็นตัวอย่าง Event “moveend” กับ map
map.events.register(”moveend”, map, function() {
showbox();
});

4 Comments on OpenLayers ตอนที่ 2

By mr.sucherdchai on July 9, 2009 at 11:31 am
ถ้าต้องการกำหนด maxExtent: new OpenLayers.Bounds สำหรับเมืองไทยกำหนดอย่างไรคับ
หรือค่าควรเป็นเท่าไร

By mr.sucherdchai on July 9, 2009 at 11:32 am
// maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxExtent: new OpenLayers.Bounds(0,0,1792,1024),

//MinX = 47
//MinY = 28
//MaxX = 53
//MaxY = 31

numZoomLevels: 18,
maxResolution: 156543.0399,
units: ‘m’,
projection: new OpenLayers.Projection(”EPSG:900913″),
displayProjection: new OpenLayers.Projection(”EPSG:4326″)
});

By mr.sucherdchai on July 9, 2009 at 11:33 am
และตรง การรับค่า lat/long ควรเป็นเท่าไร ?
lon = lon * 1024 / 180;
lat = Math.log (Math.tan ((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
lat = lat * 20037508.34 / 180;
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);

By admin on August 10, 2009 at 9:40 am
ขอโทษด้วยนะครับ ผมไม่เห็น comment พอดีมีพวก spam มาเป็นร้อย ๆ เลย
จากที่อ่านคร่าวน่าจะใช้ projection เพื่อใช้กับข้อมูล Google Map หรือเปล่าครับ
ถ้าอย่างนั้นน่าจะลองดูตัวอย่าง Openlayers ใน sundials-spherical-mercator.html ที่ใช้ function transform จาก จาก display projection to map projection ดูนะครับ

วันพฤหัสบดีที่ 26 พฤษภาคม พ.ศ. 2554

สนใจทำเว็บ gis จึงอยากสอบถามเกี่ยวกับการทำเว็บด้าน gis ครับว่าทำยังไง

 http://www.gis2me.com/th/?page_id=1712/qa-%E0%B8%A3%E0%B8%B0%E0%B8%9A%E0%B8%9A%E0%B8%AA%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%99%E0%B9%80%E0%B8%97%E0%B8%A8%E0%B8%A0%E0%B8%B9%E0%B8%A1%E0%B8%B4%E0%B8%A8%E0%B8%B2%E0%B8%AA%E0%B8%95%E0%B8%A3/internet-gis/
 
 
สนใจทำเว็บ gis จึงอยากสอบถามเกี่ยวกับการทำเว็บด้าน gis ครับว่าทำยังไง ตามคำถาม
นี้ครับ 1. โปรแกรม portsgreSQL ใช้ทำอะไร
2. QGIS ใช้ทำอะไร
3. MapServer and Geoserver ใช้ทำอะไรในขั้นตอนไหน
4. โปรแกรม viewer ต้องใช้ตัวไหน และสุดท้าย
5. เครื่องมือหรือโปรแกรมที่ใช้ตกแต่งหน้าเว็บใช้ตัวไหนครับ
ขอบคุณล่วงหน้าสำหรับคำตอบพร้อมคำอธิบายครับ ถ้าเป็นไปได้ขอรายละเอียดเป็นขั้น
เป็นตอนเลยจะเป็นพระคุณอย่างสูงครับผม

ข้อตอบคำถามดีและหัวข้อแล้วกันนะคับ
* portsgreSQL เป็นระบบฐานข้อมูลประเภทหนึ่งซึ่งเป็นแบบรหัสเปิดนะคับ (Open Source) โดยใน postgre sql นั้นมีระบบฐานข้อมูลที่สามารถทำ Spatil Datbase โดยสามารถอ่านจากกระทู้ เก่า นะคับ * Quantum GIS (QGIS) เป็นโปรแกรมที่มีลักษณะหน้าต่างที่ใช้งานง่ายอีกโปรแกรมหนึ่งที่เหมาะสำหรับ ผู้ใช้เริ่มต้น ที่สำคัญเป็นโปรแกรมฟรีด้วย (Open Source Geographic Information System)
http://qgis.org/
สามารถทำงานอยู่บนโปรแกรม Linux, Unix, Mac OSX, และแม้กระทั่ง Windows ที่เราใช้งานอยู่ด้วย
พอทำงานเข้าจริง ตอนที่อยู่พื้นที่ศึกษา อุทัยธานี ในการออกสำรวจภาคสนาม เราใช้ QGIS ติดตั้งบนเครื่อง Notebook โอ้ สุดยอด
รองรับงานของเราได้ทั้งไฟล์เวกเตอร์ (Shapefile) และแรสเตอร์ (ภาพถ่ายจากดาวเทียมที่เรามีอยู่)
QGIS เป็น Opensource ที่อยู่ภายใต้ลิขสิทธิ์ GNU General Public License.
และที่สำคัญสำหรับท่านที่มีเครื่อง GPS เราสามารถนำมาใช้งาน Track ติดตามเส้นทางแบบ RealTime ด้วย QGIS แต่ต้องใช้ Plugin ของโปรแกรมฟรี
* MapServer and Geoserver
Web ก็คือ Mapserver มีความเป็น HTTP protocol
ขณะที่ Geoserver มีความเป็น JSP ซึ่งความแตกต่างนี้ ทำให้ Geoserver มีภาษีดีกว่าในแง่ความเป็น Dynamic บน Web (ปัจจุบัน Mapserver ได้พัฒนาความเร็วให้มากขึ้นจากการสั่งงานผ่านทาง Common CGI ไปสู่ FastCGI รายละเอียดของ FastCGI อ่านได้จาก
http://www.widebase.net/knowle…..rm_group=F )
ผลการทดสอบ ระหว่าง Mapserver กับ Geoserver ดูได้จากรายงาน http://www.slideshare.net/novu…..-geoserver
โดยสามารถเข้าไปดูได้ที่ http://www.i-bitz.co.th/index……-geoserver
* โปรแกรม viewer แนะนำตัว Quantum GIS (QGIS) มีฟังก์เยอะดี หรือจะใช้ MapWindow ได้นะคับ จะมี Active สำหรับการพัฒนาด้วย แต่ถ้าต้องการความสามารถหลากหลายใช้ GRASS GIS นะคับ
* เครื่องมือหรือโปรแกรมที่ใช้ตกแต่งหน้าเว็บ ง่ายสุดเอา Dreamwever จะดีนะคับ แต่ถ้าชอบของ Microsoft ก็ลองไปเล่น Microsoft Web Express ดูนะคับ แต่จะใช้ภาษาของ Microsoft ในการพัฒนา
 

วันพุธที่ 25 พฤษภาคม พ.ศ. 2554

19 things to do after installing Ubuntu Linux

http://eackouye.i.ph/blogs/eackouye/2008/04/18/19-things-to-do-after-installing-ubuntu-linux/


Home » Post Item » 19 things to do after installing Ubuntu Linux

19 things to do after installing Ubuntu Linux

Friday, April 18, 2008 Step 1 : - Enabling Additional Repositories
Now many applications need additional repositories to be installed or some to be enabled in Synaptic package manager so before trying out steps given below ensure that repositories in order.
Launch Synaptic Package Manager (System -> Administration -> Synaptic Package Manager ) , then in Synaptic package manager go to (Settings -> Repositories ) you will find window like this . Ensure that all the check boxes are marked leaving source code(if you want to you can enable this also but you are not going to need this unless you are software developer) the dialog box should look like this .
After completing above step you will find a dialog box like this


Besides these you may also like to add medibuntu repositories if you want to install applications like ——- , to add mediubuntu repositories follow the following steps
echo "deb http://packages.medibuntu.org/ gutsy free non-free" | sudo tee -a /etc/apt/sources.list

and

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update
2. Enabling Cool Graphics Effects
Unlike previous releases of Ubuntu where one had to manually download and install compiz,beryl etc (Compiz Fusion is composite window manager that provides best features of Compiz and Beryl) from Repositories if one wanted to have glitzy visual effects . Ubuntu 7.10 comes with Compiz Fusion pre-installed and on supported hardware offers a wide array of Visual Effect . Now depending on graphic hardware of computer one could chose from three level of Visual Effect (From System -> Preferences -> Appearance )
None : - This mode causes Ubuntu to use Metacity instead of Compiz Fusion , with no visual effect
Basic : - Has only simple visual effects like shadows , fading windows-menus etc
Advanced : - Recommended for PC with descent graphic hardware , enables effects like wobbly windows, transparency , animated workspace switching etc
Visual Effect Dialog Box
Now , the biggest advantage of Compiz Fusion is even on really slow hardware one can have descent set of visual effects even on my slow laptop i could use Extra graphics effects though it was painful while using application like OpenOffice because of my slow hardware.
However , compiz-fusion is capable of much more and you can enable more desktop effects /customize compiz by typing the following command in the terminal window : -
sudo apt-get install compizconfig-settings-manager
After completing above step , you can customize compiz by going to System > Preferences > Advanced Desktop Effects Settings .
3. Installing Audio/Video Codecs
The first thing anyone who wants to use Ubuntu as a replacement to their windows operating system would like to do is install support for all kind of audio/video multimedia codecs . Ubuntu does not come installed with support for major audio/video formats because of licensing issue and other issues . To install support for audio/video codecs type in the following command in the terminal window : -
sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly
And if you want to install mp3 support in nautilus you may like to install mpg123 which is a nice command line based utility for playing mp3 files and it works well even on modest hardware .
sudo apt-get install mpg123
This would enable most of the popularly used codecs in the Totem Movie player which uses the GStreamer framework to play audio/video files.
If you want to use a different media player and framework you might try installing MPlayer or VLC (depending on which you prefer ) instructions on installing them are listed below .
Installing VLC Player : -
LC Player is another of popular video player available under Linux . It is released under GNU General Public license and is available for different platform including Windows,Linux,BeOS,Mac OS X etc. VLC player is based upon free open source libraries like libdvdcss,FFMpeg for decoding various video formats.One Important feature of VLC Player is it’s ability to play files over NetWork Protocols. The Frontend of VLC player is created using wxWidgets toolkit and it’s appearance can be changed by using different skins. One Popular feature of VLC Player is it’s ability to play files that are incomplete/broken or partially downloaded , making it useful for previewing file while downloading on file-sharing networks.
To install VLC Player type the following command in the terminal window : -


sudo apt-get install vlc
After completing above step launch vlc player from (Applications -> Sound and Video -> VLC media player )
4. Installing Linux DC++ Client
DC++ is a popuar tool used for p2p file sharing and is especially popular in college campuses , to install dc++ for linux follow the following instructions .
Type the following command in the terminal window: -
sudo apt-get install linuxdcpp
And after completing above step launch dcpp from (Applications -> Internet -> DC++

Linux Client of popular DC++ Application


aMule
aMule is alternative to popular eMule program on windows platform , amule supports/works with eDonkey2000 Network or Kadnetwork and allows P2P sharing of files . aMule is available on number of platforms , Current supported systems include Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Windows and Solaris.
To install aMule type the following command in the terminal window : -
sudo aptitude install amule
After completing above step launch aMule from (Application -> Internet -> aMule)
5. Installing Adobe Acrobat Reader
* Requires Mediubuntu repositories
Type in the following command in the terminal window :


sudo aptitude install acroread acroread-plugins acroread-escript

and , plugin for firefox



sudo aptitude install mozilla-acroread


6. Installing Macromedia Flash support and Sun Java JRE
Both Macromedia Flash and JRE are an important part of internet experience almost all the websites use either of the two technology to add extra functionality to the web page . By default Ubuntu does not come preinstalled with support for these two , however they can be installed quite easily by typing in the following command in the terminal window .
To install flash type in the following command in the terminal window this command is going to download a script that would further download the files needed for installing flash-support and install it .

sudo apt-get install flashplugin-nonfree. Script downloading further files needed for installing flash support

and to install Sun Java JRE type in the following command in the terminal window .


sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts
7. ScribusScribus is one of the most impressive Desktop Publishing application that is free and cross platform . Scribus is available on Windows , Mac OS X , Linux , OS/2 etc . It is highly suited for preparing file for professional quality image setting equipment .It has high end page layout features of the kind found in Adobe PageMaker, QuarkXPress and Adobe InDesign.
It can also create animated and interactive PDF presentations and forms. Example uses include writing small newspapers, brochures, newsletters, posters and books.
Anyways , to install scribus type the following command in the terminal (Application ->Accessories -> Terminal )
sudo aptitude install scribus
and after completing above step launch scribus by typing "scribus" in terminal window.
8. Downloader For X
Downloader for X is a nice download manager that allows downloading files from Internet , pausing them and downloading them later . It also supports splitting file into number of segments so that files could be downloaded quickly . However one thing that i didn’t like about is it’s interface is somewhat difficult as compared to some of the download manager available on Windows.
Anyways to install " Downloader for X " type the following command in the terminal window.
¨sudo aptitude install d4x "
After installation is over launch ¨Downloader for X¨ by typing ¨d4x¨ in the terminal window , or by going to (Applications-> Internet -> Downloader for X )

9. Google Desktop
Google Desktop allows one to full text search of a user’s e-mail, computer files, music, photos, chat, and Web pages viewed,OpenOffice documents , PDF files and more .
Now similar tools already existed on Linux like beagle (supported by novell ) , meta tracker etc . However Google Desktop search is not based on any of these tools and uses its proprietary algorithms to search for files on the computer ,also being 1.0 release and more stable then these products it could be preferred over tools like beagle .
To install type the following command in the terminal window : -

wget http://dl.google.com/linux/google-repo-setup.sh
and

sudo bash google-repo-setup.sh
Now after completing above steps to install Google Desktop Search type the following command in the terminal window : -
sudo apt-get update

and

sudo apt-get install google-desktop-linux
After completing above step logout of gnome session and relogin you would find the following dialog window
select the appropriate option : -
Now after choosing appropriate option you would find Google Desktop icon in the bar at the top of the screen , now it would automatically scan and index files on computer and store it in local database which could be searched using web browser .
Google Picasa
Google Picasa is an extremely professional good looking photo management application available on Windows ,Linux and Mac OS (??) . Now Google Picasa has a number of features that many photo management software on Linux dont have further Google Picasa looks very user friendly as compared to similar open source application available on linux . Now Google Picasa for Linux is not a native linux application but runs on Linux thru application layer called wine which allows many windows application to run flawlessly on Linux.
Now to install Google - Picasa type the following command in the terminal window


wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
and


sudo dpkg -i picasa_2.2.2820-5_i386.deb
After completing above step launch Google Picasa from
Some Tips to consider before running picasa (taken from google picasa website )

Tips

  • If you use NFS, when Picasa first starts, tell it to scan just your desktop! Otherwise Picasa gets real slow while it scans all your NFS directories!
  • To get Picasa to see pictures on your hard drive, click "File / Add Folder" (NOT "Import").
  • When adding a folder to Picasa, the default action is to remove the folder from Picasa. You have to actively choose Scan once or Scan always.
  • Picasa is not supported over remote X connections.
10. Google Earth
To install Google Earth type the following command in the Terminal Window (Application->Accessories -> Terminal ),keep in mind that googleearth is downloaded from Medibuntu repositories and not Ubuntu hence be sure you have activated the repositories correctly as described in first step of this article.

¨sudo aptitude install googleearth"

After downloading is over you will get a screen like this press ¨Yes¨ to accept the license agreement and complete software installation.


Now you can launch Google Earth from (Application -> Internet -> Google Earth)




11.
Installing gdeskletsgdesklets gives user a collection of impressive widgets that can be placed on desktop this is similar to feature available on Windows Vista and Mac OS X , it does provide quite a good look to the desktop.
To install gdesklets issue the following command at the command line
sudo apt-get install -y gdesklets
after installation go to (System -> Preferences -> Sessions) There go to Start up program and add gdesklets shell , now every time gnome loads up you should see your gdesklets on the desktop.
12. Installing MPlayer with all codecs and dvd playing support
*This step requires Medibuntu repositories
MPlayer is one of the most popular media player available on linux , it supports playing all the major audio/video file formats . With w32codecs and libdvdcss2 it plays all the major audio/video format,however w32codecs has dll files from windows operating system hence its not available on the ubuntu official repositories and needs to be downloaded from the mediubuntu repositories.
To install MPlayer with all codecs type in the following command in the terminal window : -


sudo apt-get install mplayer
and

sudo apt-get install w32codecs libdvdcss2
After completing above steps you could launch MPlayer by typing in gmplayer in the terminal window or from (Application -> Sound & Video -> MPlayer Movie Player )


Quod Libet : -
Quod Libet is an extremely versatile music player based on GTK+ that is extendible via plugins , has a rich feature set and has really unique feature of building playlist by searching for particular kind of music files based on search terms or regular expression . It has been programmed in Python programming language and hence it’s plugin are also created in Python. A number of plugins are available including ones that help in copying songs to digital audio players , last.fm plugin , advanced editing features and many more .
Quod Libet uses GStreamer framework of GNOME to play audio files and hence integrates quite well the the GNOME desktop environment , also audio format supported would be same as the one supported by GStreamer so you may want to install mp3 support since by default many linux distributions these days dont come with mp3 support installed.
To install Quod Libet type the following command in the Terminal Window : -
sudo apt-get install quodlibet
and after completing above step launch quod-libet from (Application -> Sound & Video -> Quod Libet )
Quod Libet Website : - http://www.sacredchao.net/quodlibet

13. Installing ntfs-3g
ntfs-3g this is necessary if you have a ntfs drive in your computer ( Usually Windows XP installs on NTFS drive) and you want to read and write data to the drive you have to install this .
This can be installed as following type the following at the command prompt
sudo apt-get updatesudo apt-get upgrade

sudo apt-get install ntfs-config
Then type the following command
gksu ntfs-config
This is automatic configuration of ntfs-3g , enable read , write support and it should be configured.
these commands would back up fstab file if configuration goes wrong.

sudo cp /etc/fstab /etc/fstab.bak
gksu gedit /etc/fstab

Now one more thing you want your windows (NTFS) drive to be mounted automatically add the following entries to /etc/fstab

/dev/ /media/ ntfs-3g defaults,locale=en_US.utf8 0 0
Where /dev/partition is the partition which is NTFS drive , in my case /dev/hda1
/media/ this is just the directory you want to use as a mount point where windows drive would be mounted , you can very well use any drive you like.

now Restart ubuntu your windows partition should be working well.
14. Installing flash-plugin
Macromedia Flash player is not installed by default but since we would be surely needing it while browing the net , installing it is necessary
it can be installed by following command
sudo apt-get install -y flashplugin-nonfree
15. Installing Microsoft True Type Fonts
If you are making a jump from windows to ubuntu you would surely miss the true type fonts that Windows uses , since Microsoft has released them free so they can be installed without a hitch in ubuntu (Though not distributed with Ubuntu) .
sudo apt-get install -y msttcorefonts
16. Installing unrar
RAR is one of the very widely used archives on Windows , however unrar tool to decompress RAR is not shipped with distribution and has ti be installed manually.
sudo apt-get -y install unrar 
17. Installing mpg123
mpg123 is a very nice command line based mp3 player that can play mp3 files even on a slow processor based computer , further installing this provides a way of playing mp3 files from within the nautilus file manager . Hence i recommend installing mpg123
sudo apt-get install -y mpg123
18. Installing DVD playback support
Now this is a contentious issue , in some countries playing DVD files through DEcss is illegal so use it at your own will , anyways to enable dvd playback issue the following command at the command line : -
sudo aptitude install libdvdcss2
Note : the above commands would only work if you have added the repositories i had mentioned before the Seveas repositories.
However if you do not have these Repositories installed issue the following command to install the DVD playback support : -
sudo /usr/share/doc/libdvdread3/./install-css.sh
19 . Installing the extra multimedia codecs,players
Now you would surely want to install all the codecs for playing various media files and the players primarily xine,vlc,mplayer issue the following commands to install the multimedia codecs.
sudo apt-get install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs w32codecsvlc mplayer
This command would install most of the codecs for gstreamer multimedia architecture and vlc media player and Mplayer , as well as the dll files codec (w32codecs) for decoding various files whoose open source decoder are not available.




1
main source at: http://www.geocities.com/ubuntu_help/19thingstodo.htm

ทดลองทำ ubuntu 10.10 live cd แบบของตัวเอง ด้วย remastersys

        Ubuntu 10.10 ออกมาแล้วก็เลยทดลอง ทำ live cd เป็นแบบของตัวเองซ๊ะเลยด้วยโปรแกรม remastersys  ต้องติดตั้งตัวโปรแกรมนี้ก่อนนะโดยเพิ่ม repository ใน synaptic package manager ซ๊ะก่อนคัดลอกตัวนี้ deb http://www.geekconnection.org/remastersys/repository remastersys/ สำหรับการใช้งานอ่านได้ใน  ทำดิสโทรใช้เองด้วย Remastersys ตอนที่ 1 ของ ubuntuclub  ได้รายละเอียดดีมากครับ แต่ในนั้นเขาใช้แบบ Distiso เก่งแล้วผมใช้แบบ dist  ข้อนี้จะเลือก สร้าง file Ubuntu พร้อมด้วย package ที่เราติดตั้งลงไปในเครื่องด้วย

       เลือก modify เพื่อตั้งชื่อ ไฟล์ iso , username , ชื่อ ของไฟล์ ถ้าไม่แก้ไข ค่าเริ่มต้นจะชื่อ custom disk และ ชื่อผู้ใช้ตอนเข้าระบบ จะใช้ username = custom รหัสผ่าน ว่างไว้ครับ 
รายละเอียดอื่นๆไปอ่านได้ทาง ลิงค์ข้างต้นครับ รู้สึกจะมีไฟล์ pdf ให้ดาวน์โหลดมาอ่านด้วย
       พื้นที่ ใน hdd จะต้องมีสัก 5 GB นะครับ ของผม 3 GB ก็ยังพอสร้างได้แต่ต้องรีบ ย้ายไฟล์ iso ที่ได้ไปไว้ที่อื่นก่อนนะครับก่อนที่จะลบ ไฟล์ชั่วคราวไม่งั้นไฟล์ที่สร้างไว้หายไปด้วย  เสร็จแล้วก็กด Clean เพื่อ ลบไฟล์ชั่วคราวครับปล่อยไว้ พื้นที่เต็มไม่รู้ด้วย ( ก่อน clean ก็อย่าลืมย้ายไฟล์ iso ที่สร้างไว้ ไปไว้ที่อื่นก่อนนะครับ จะอยู่ใน file system/ home /remastersys /remastersys  file.iso ครับ 
      ที่ทดลองทำ ถ้าใน เครื่องของเราได้ติดตั้งโปรแกรมมาก มันก็จะได้ไฟล์ iso ขนาดใหญ่ตามไปด้วยนะครับ ที่ผมทำได้ไฟล์ขนาด 1GB ซึ่งได้ ลบโปรแกรมบางตัวที่ไม่ชอบใช้และเพิ่มโปรแกรมที่ชอบใช้ประจำ ไปแทน และติดตั้งเมนูเป็นภาษาไทยเรียบร้อย สำหรับ ไว้ติดตั้งได้ครับ ทดลอง ใช้งาน จาก virtual box กำหนดแรมขนาด 512 MB ก็ใช้ได้ดี และเขียนลงแผ่น dvd ทดลองใช้งานก็ใช้ได้ดีพอควรครับ ทดลองใน usb drive ก็ได้ครับ 
โปรแกรมที่ มีคร่าวๆ 
ในส่วนเกี่ยวกับภาพ
       เพิ่ม gimp แต่ดันลืม ทำให้เป็นห้าต่างเดียว 
       เพิ่ม โปรแกรมดูภาพ gthumb เพราะใช้ง่าย และ ครอบ ตัด ปรับแต่งภาพได้ง่ายๆ ( ใช้ดูไฟล์ วิดิโอได้ด้วย )
       มี showell สำหรับจัดการภาพ ( ลืม f- spot ไปครับ )
ในส่วน เกี่ยวกับ เสียงและวิดิโอ 
       มีโปรแกรม desktop record ที่ใช้ประจำ
       ใช้ mobile media converter ในการแปลงไฟล์ วิดิโอ หรือเสียง 
        ใช้ vlc แทนโปรแกรมฟังเพลง totem ( ผมลืมติดตั้ง xine gxine แฮะ)
ในส่วน อินเตอร์เนต 
        ใช้ pidgin แทนแล้วเอาของเก่าออก เพราะมันไม่มีแจ้งเมล์( ลืมทำให้มันchat facebook ได้)
        เพิ่ม aMSN เพื่อความคุ้นเคยกับ MSN ตัวจริง 
        มี skype 
        ใช้ Hotot แทน gwibber เพราะมันเข้าท่ากว่า(และรำคาญมันชอบให้ใส่รหัสผ่าน)
 ส่วนอื่นๆ มี screenlet เพิ่มความเท่ห์ ( มีนาฬิกา บนจอฯลฯ) 
      มี Qemu เพื่อทดลอง ไฟล์ ISO  (ลืม virtualbox ose แฮะ )
      มี wine , q4wne สำหรับเล่นไฟล์ exe ของ windows
      มี  beatbit เพื่อลบไฟล์ขยะเหมือน c cleaner  
      ใส่ ตัว xkb-data-grave.deb ที่สำหรับให้เลือก grave ในการสลับภาษามาด้วย ( ที่จริงใส่ธงชาติแล้วแต่มันไม่ยอมมา ) 
      ติดตั้งตัว deb installer มาด้วยแล้ว เพราะใน ubuntu 10.10 ถ้าคลิก ไฟล์ deb มันจะไปเรียก software center แทน บางครั้งก็ เอ๋อเร๋อ )
      มี Grub customize สำหรับ ลบ แถวที่เวลา บูตเลือก ที่เราเห็นมีหลายๆแถวนั่นแหละ  มีธีม win 7 มาให้เลือกด้วย แต่ไม่มี icon นะมันไม่ยอมมาด้วย
ส่วนอื่นๆก็จะคงเดิม ที่มีมาให้ ในแผ่นครับ ฟังเพลงผ่านเนตได้เลย ดูyoutube ได้เลย แต่บางครั้ง firefox ก็มี ปิดเองบางเหมือนกัน แก้ไขได้โดยการ อัฟเดต แพคเกต ทั้งหมดใหม่ ไปที่โปรแกรมจัดการปรับปรุง( update manager )
       ลักษณะก็จะเหมือนๆกับ ubuntu 9.12 pe ที่ทาง ubuntuclub ทำละครับ ท่านใดอยากทดลองเรียนเชิญได้ครับ ส่งเมล์ตาม mail ข้างบน แจ้งที่อยู่ มาจะส่งแผ่น ไปให้ครับ ubuntu 10.10 th  ทำเองก็ได้ครับ ง่ายดีทดลองจาก ubuntu รุ่นก่อนๆ ก่อนก็ได้แล้วจะสนุกครับ
      ครั้งแรกจะทดลองใช้จาก UCK - Ubuntu Customization Kit  แต่ทดลองแล้วไม่ผ่านซักทีครับ ก็เลยใช้ remastersys แทนก็ไม่ผิดหวังครับ  
     

2 ความคิดเห็น

  1. NullZer0 Says:
  2. น่าสนใจดีครับ ไว้จะมาติดตามบ่อยๆครับ :D
  3. prakob Says:
  4. ขอบคุณที่ติดตามครับ
    เพิ่มเติมครับ ถ้าเอา icon ต่างๆที่เราได้ ปรับแต่งไว้ นอกจากที่เขามีมาให้แล้ว ทำต่อตรงนี้นิดนึงครับ
    ก่อนที่จะสร้าง
    กด Alt+F2 พิมพ์ gksudo nautilus เพื่อเข้าใช้งานในสิทธิ์ของ root ใส่ รหัสผ่านให้เรียบร้อย
    จ จะขึ้นหน้าต่าง root หน้าที่มีแต่ ไอค่อน desktop แล้วไปที่ มุมมอง หรือ view หรือกด Ctrl+H เพื่อ แสดงแฟ้มที่ซ่อน จะเห็นว่ามีโฟลเดอร์ขึ้นมามากมายเราก็จัดการเลือกทั้งหมด แล้วคัดลอกไว้ครับ

    จากนั้นไปที่ file system หรือระบบแฟ้ม etc / sokel
    ต่อ ไป คลิกขวาที่ว่างแล้ว วาง paste ลงไป ถ้าถามว่าจะเขียนทับหรือไม่ก็ข้ามไปครับ อย่าง .profile , .bashrc , .pulse-cookie ไม่ต้องเขียนทับครับ
    อ้อ อย่างไรก็ตามลบไฟล์ขยะ และ เอกสารที่เพิ่งใช้งานก่อนก็ดีนะไม่งั้นมันมาด้วยครั

How to dual-boot Windows 7 and Ubuntu 11.04

http://www.linuxbsdos.com/2011/05/22/how-to-dual-boot-windows-7-and-ubuntu-11-04/


Previous« 1 2 »Next
For those Windows users who have discovered what Linux has to offer, but for one reason or another are not ready to completely abandon Windows, dual-booting between the two operating systems is one method of keeping a foot in both worlds. And to help those users, this article presents a step-by-step guide on how to configure dual-booting between Windows 7 and Ubuntu 11.04 on a computer with one hard drive. The same steps may be used to dual-boot both between both systems on a computer with two hard drives.
In attempting to dual-boot between Windows 7 and Ubuntu 11.04, you will either install Windows anew, then install Ubuntu 11.04 alongside it, or install Ubuntu 11.04 alongside an existing installation of Windows. This tutorial uses as example, a case of installing Ubuntu 11.04 on an existing installation of Windows 7.
As shown in the image below, the existing installation of Windows 7 used for this tutorial has three primary partitions. And because of the limitations of the MBR partitioning scheme, only one primary partition is available for installing Ubuntu 11.04. By using an extended partition, we can configure as many partitions as we need for Ubuntu.
dualBoot3

To begin, boot the computer using a Ubuntu 11.04 CD or DVD. At the disk partitioning step, the installer will present several options. Because the installer will not automatically partition and configure the free space, using the installer’s advanced partitioning tool is the only method of creating the necessary partitions. To launch the advanced tool, select the “Something else” option, the click Forward.
dualBoot4

This is Ubuntu’s advanced partitioning tool and the detected partitions. The first three partitions are obviously the ntfs partitions that we saw in the first image. Because there are three existing primary partition, the last partition will have to be an extended partition, under which logical partitions for installation of Ubuntu will be configured.
By default, Ubuntu’s installer configures two partitions – the first for /, the root directory, and the second for Swap. When creating partitions for installing any desktop Linux distribution, my recommendation is to create the following four partitions:
  • /boot, the boot partition. This is where programs critical for booting the system will reside.
  • /, the root directory. The bulk of the programs used for running the system will be installed here.
  • Swap, unformatted disk space for use as virtual memory.
  • /home, the partition where your home directory will be located. In the course of using the system, files and folders you create will reside in various folders here.
So, to start setting up these partitions, select the free space and click on Add. Note that this step will have to be repeated for all the partitions.
dualBoot5

The first partition will be for /boot. When setting up an LVM-based system using an Alternate Installer ISO image, the default disk space allocated to /boot is 258 MB. However, only about 22 MB of that is used, so anything thing between that size range will do. For this tutorial, the default will be used. The mount point will, of course, be /boot. The default file system is ext2. OK.
dualBoot6

The second partition will be for Swap. It is possible to install Ubuntu without Swap. However, if you attempt to do that, the installer will try to discourage you with the following warning:
swapwarn

For the record, I have been able to install Ubuntu 11.04 successfully without Swap. The sky has not fallen yet, but I have not tried to put the system in Suspend or Hibernate mode. In any case, save yourself a load of trouble and configure Swap. The suggested size for Swap is 2000 MB. Select “swap area” from the “Use as” dropdown menu. OK.
dualBoot7

The third partition will be for /, the root directory. The default journaling file system on Ubuntu 11.04 is ext4. You may stick with it or choose another journaling file systemhow to install Ubuntu 11.04 on a btrfs file system is a good place to start. available. Btrfs is supported, but this partitioning scheme is not for btrfs. If you are interested,
The installer recommends a minimum of 4.4 GB for Ubuntu 11.04, but on a new installation, less than 3 GB of disk space allocated to / is used. Note that as you install additional applications after installation, disk space used will grow, so be generous here. I think 10 GB should be more than enough. OK.
dualBoot8

The last partition will be for /home. The file system is ext4, and you may allocate all available disk space to it. OK.
dualBoot9


วันอาทิตย์ที่ 22 พฤษภาคม พ.ศ. 2554

มหัศจรรย์แห่งการเจริญสติ ภาค 2

http://www.dharma-gateway.com/ubasok/kumpol-thong-02.htm


มหัศจรรย์แห่งการเจริญสติ ภาค 2
บรรยายโดย อาจารย์กำพล ทองบุญนุ่ม
เนื่องในงานพิธีทำบุญอุทิศส่วนกุศลแด่อาจารย์ ศิษย์เก่า และนักศึกษาแพทย์ที่เสียชีวิต
เมื่อวันอังคารที่ 16 ตุลาคม 2544
ณ ห้องสมาคมศิษย์เก่าแพทย์ขอนแก่น คณะแพทยศาสตร์ มหาวิทยาลัยขอนแก่น
โพสท์ในลานธรรมเสวนา กระทู้ที่ 008263 - โดย คุณ : พรรณี [ 14 มี.ค. 2546 ]
เนื้อความ :
เทปค่อนข้างถอดความยาก เพราะใช้เทปเล็กอัดเสียงจากลำโพง อาจจะมีการถอดความผิดได้บ้าง ที่มี แสดงว่าฟังไม่ชัด ไม่แน่ใจ เลยเว้นไป ตอนท้ายมีการตอบคำถามจากผู้ฟัง ซึ่งได้เลือกมาเป็นบางคำถาม ขอขอบคุณ คุณหมอกำพล 2 กัลยาณมิตร ที่ได้โทรศัพท์มากระตุ้นเตือนให้เผยแพร่ เพราะเคยสัญญาไว้ว่าจะถอดเทปให้ได้อ่าน แต่ถอดใจ เพราะอ่านกระทู้ระยะนี้แล้วเห็นผู้อ่านชอบแสดงความคิดเห็นเรื่อง ต่าง ๆ เลยคิดเอาเองว่า คงไม่มีใครสนใจอ่านที่เป็นการบรรยายแล้ว และที่เลือกลงในลานธรรม เพราะ ตัวหนังสือของลานธรรม ธรรมดา อ่านง่าย มีกระดานทดให้ส่งกระทู้ดูก่อนได้ และกระทู้ตกจากกระดานได้เร็วดี ไม่ต้องค้างไว้หน้าแรกนาน
@ กราบมนัสการหลวงพ่อคำเขียน และพระคุณเจ้าที่เคารพอย่างสูง และสวัสดีญาติธรรม ผู้ที่มีจิตใจฝักใฝ่ธรรมะ ผู้มีเกียรติที่เคารพทุกท่าน
วันนี้ผมรู้สึกยินดีมากที่คนพิการจะได้มีโอกาสมาทำหน้าที่เป็นอุปกรณ์ให้กับพระธรรมอีกครั้งหนึ่ง ก็จะนำเอาสาระแห่งธรรมะมาพูดคุยสู่กันฟัง สาระแห่งธรรมะที่จะมาพูดคุยในวันนี้ ก็เป็นเรื่องสติ เพราะว่าสติถือว่าเป็นธรรมที่มีอุปการะมาก มีอุปการะมากจนถึงที่สุดก็คือ สามารถที่ทำให้ผู้ที่นำเอาไปปฏิบัติ ได้ล่วงพ้นไปเสียจากความทุกข์ได้ คือหมดปัญหาชีวิตเอง แม้แต่องค์สมเด็จพระสัมมาสัมพุทธเจ้า ท่านยังทรงยกย่องธรรมะชื่อว่าสติ โดยยกเป็นคำอุปมา อุปมัย เปรียบเทียบไว้อย่างน่าฟังว่า รอยเท้าของสัตว์บกทั้งหลาย ไม่ว่าชนิดใด ๆ ก็ตาม ย่อมรวมลงในรอยเท้าช้างได้ทั้งหมด รอยเท้าช้างเรียกว่าเป็นยอดของรอยเท้าของสัตว์ทั้งหลายเหล่านั้น โดยความใหญ่ฉันใด กุศลธรรมทั้งหลาย ไม่ว่าจะอย่างใดก็ตาม ย่อมรวมลงในความไม่ประมาท ประชุมลงในความไม่ประมาท อันความไม่ประมาทนั้นเรียกว่าเป็นยอดแห่งกุศลธรรมทั้งหลายเหล่านั้น ก็ฉันนั้น ความไม่ประมาทนี้ ท่านก็เน้นถึงการมีสติในทุกเมื่อ หรือการเป็นอยู่อย่างไม่ขาดสติ ซึ่งผมเองก็ได้รับการอุปการะจากธรรมะว่า สติ มาจนกระทั่งปัจจุบัน เพราะว่าอดีตนี่ มีความทุกข์มาก
ที่มีความทุกข์มาก เพราะว่าไม่เคยคิดมาก่อนว่าจะต้องมาใช้ชีวิตในสภาพเช่นนี้ เมื่อร่างกายมีปัญหา แล้วจิตใจที่ไม่เคยฝึกฝนเรื่องธรรมะ เรื่องการฝึกสติไว้เลย ไม่มีสติคอยคุ้มครองอยู่ จิตก็ย่อมเสียศูนย์ไปเป็นธรรมดา เป็นทุกข์ทั้งในด้านร่างกายและก็จิตใจ 2 อย่างนี้ ทุกข์ทางร่างกายนี่ก็ยังพอทนได้ ยังพอทำใจได้ ยังไม่มากเท่ากับทุกข์ที่เกิดทางด้านจิตใจ ทุกข์ทางจิตนี้ ทนได้ยาก ทำใจยาก เพราะจิตมันมีความทุกข์อัดแน่นไปหมด ไม่รู้จะไปทำใจตรงช่องไหน แต่ว่าทุกข์ทางจิตที่เกิดขึ้น เพราะว่าเกิดจากความคิด พอมันคิดที่มักจะครุ่นคิดวุ่นวายไปในอารมณ์ ต่าง ๆ หมกมุ่น ย้ำคิดวกวนเวียนอยู่แต่ในสิ่งเก่า ๆ เดิม ๆ อดีตบ้าง อนาคตบ้าง จนนอนไม่หลับเพราะว่าถูกความคิดมันกัดเอา อันความคิดที่เกิดขึ้นในลักษณะเช่นนี้ อาการต่าง ๆ เหล่านี้มันเกิดขึ้นเนื่องจากเจ้าตัวอวิชชา อวิชชานี่เป็นภาษาทางธรรมะ ซึ่งแปลว่าความไม่รู้จริง ที่จริงจะว่าไม่รู้ก็ไม่ใช่ รู้ รู้อยู่ แต่มันรู้ผิด จึงเป็นเหตุทำให้เกิดการปรุงแต่ง อัดแน่นอยู่ในจิตใจเรา อาการเช่นนี้ ถ้ามีขึ้น มากขึ้น มีมากขึ้น ทวีความรุนแรงขึ้นนี่ ก็จะมีผลทำให้ เราเป็นโรคจิต โรคประสาท เครียด แล้วก็บางครั้งถึงกับคิดทำลายตัวเอง และก็ทำลายผู้อื่นให้เป็นทุกข์ไปด้วย แล้วก็อาการที่มันปรุงคิดในจิตใจ เราจะต้องมาทำความรู้จักให้ดี แล้วก็ควบคุมให้ได้ ผมเองนับว่ายังโชคดี ที่ได้มีโอกาสมาศึกษาธรรมะ ผมเริ่มต้นศึกษาธรรมะจากการอ่านหนังสือธรรมะ เมื่อก่อนที่มาปฏิบัติก็ยังไม่เคยลงมือปฏิบัติจริงจังได้แต่อ่านหนังสือธรรมะ ก็มีการแก้ปัญหา เวลาชีวิตเรามีความทุกข์นี่ เราหันเหชีวิตมาทางธรรมะ มาสนใจเรื่องธรรมะ อาจจะเริ่มต้นจากการอ่านหนังสือธรรมะก็ยังดี ก็ยังช่วยผ่อน ช่วยคลาย ทุเลาเบาบางทุกข์ให้ลดลงไปได้บ้าง ก็เกิดความเพลิดเพลินในการอ่านหนังสือ เพราะธรรมะมักจะสอนในเรื่องทุกข์ กับความดับ แต่ถ้าการอ่านอย่างเดียวนี้ก็ยังไม่เพียงพอ อ่านอย่างเดียวไม่เพียงพอ ต้องมีการลงมือปฏิบัติด้วย จึงจะดับทุกข์ได้อย่างแท้จริง ถ้าหากว่าการอ่านหนังสือธรรมะ ทำให้คนเราบรรลุธรรมได้ ผมเองก็ต้องบรรลุธรรมดับทุกข์จากตัวเองไปนานแล้ว เพราะผมอ่านหนังสือธรรมะมาตั้ง 16 ปี แต่ว่าความทุกข์ก็ยังกลุ้มรุมจิตใจผมอยู่นั่น นี่เป็นเพราะว่า ยังไม่ได้ลงมือปฏิบัติ ยังไม่ได้จัดการที่เหตุของความทุกข์ จึงดับทุกข์ไม่ได้ตลอด สำหรับผมแล้ว หลวงพ่อคำเขียนท่านเป็นผู้ที่เมตตาแนะนำวิธีการปฏิบัติธรรมให้กับผม ท่านแนะนำทางจดหมาย ผมก็เรียนรู้ด้วยการปฏิบัติพระธรรมทางจดหมายกับหลวงพ่อ แล้วก็ปฏิบัติอยู่ที่บ้าน หลวงพ่อท่านก็แนะนำวิธีการเจริญสติ ที่เรียกว่าสติปัฏฐาน 4 ก็คือการเจริญสติแบบเคลื่อนไหวนี่เอง การเจริญสติแบบเคลื่อนไหวนี่ผมถือว่าเป็นสูตรสำเร็จแล้วอยู่ในตัว เป็นธรรมที่เป็นเครื่องออกจากทุกข์ ผมก็ได้อาศัยกรรมฐานบทนี้ มาปฏิบัติจนเป็นอาชีพของผม จึงสามารถเปลี่ยนชีวิตของผมนี่มาในทางที่ดีได้ เปลี่ยนชีวิตใหม่ แต่อยู่ในร่างเก่า ยิ่งปฏิบัติไป นาน ๆ จึงเกิดความมั่นใจมาก มั่นใจใน มั่นใจในวิธีการปฏิบัติ แล้วก็มั่นใจในครูบาอาจารย์ คิดว่าท่านจะไม่นำทางเราหลงทิศหลงทางแน่นอน
หลักในการปฏิบัติ เจริญสติแบบเคลื่อนไหวสำหรับคนพิการนั้น ก็มีหลักอยู่ว่า ให้เรามี ความเพียร มีสติ ระลึกรู้ที่กายที่กำลังเคลื่อนไหว อยู่ที่ใจที่กำลังคิด มันกำลังนึก ให้ต่อเนื่อง ให้มีปัจจุบันที่กายที่จิตของเรา ทำอย่างนี้ บ่อย ๆ ทำให้เราเกิดปัญญา ซึ่งเป็นปัญญาที่เกิดจากการภาวนา เราเรียกว่าวิปัสสนาก็ได้ วิปัสสนานี้ก็แปลว่าการเห็นแจ้ง การเห็นแจ้งก็คือการเห็นเรื่องเกี่ยวกับตัวเรานั่นเอง ที่จริงแล้วการมาปฏิบัติธรรมะ ก็เพื่อให้เราได้รู้ได้เข้าใจเรื่องตัวของเราเท่านั้นเอง เมื่อเรารู้เราเข้าใจตัวเราแล้ว เราก็ย่อมจะรู้ จะเข้าใจผู้อื่นด้วย คือรู้เรารู้เขา ดูได้ที่ตัวเรา เราจะเห็น เห็นความทุกข์ ที่มันเกิดขึ้นในกายและก็ในจิตของเรา เช่น ทุกข์เวทนาที่เกิดขึ้นทางกายนี่ เมื่อเราเห็นแล้วเราก็ช่วยแก้ไข ช่วยบรรเทาไป แต่ทุกข์บางอย่างที่มันเกิดที่ร่างกายเรานี่ เราไม่สามารถจะช่วยอะไรเขาได้ อย่างเช่น ทุกข์ที่เกิดจากความพิการ ความแก่ หรือความเสื่อมสลายไปของร่างกายเรา อันนี้เราแก้ไขไม่ได้เพราะไม่อยู่ในอำนาจของเรา เราก็ทำหน้าที่รับรู้รับทราบไว้ เฉย ๆ แต่ต้องไม่เข้าไปเป็นทุกข์ทุกเมื่อ อันนี้คือทางด้านร่างกาย ส่วนทางด้านจิตใจนี่ ทุกข์ที่เกิดทางด้านจิตใจ อันนี้สำคัญมากเป็นคู่ปรับที่สำคัญของชีวิตเราทุกคน ทุกข์ที่เกิดทางด้านจิตใจก็คือความคิดนั่นเอง ความคิด ความคิดไม่ใช่จิต แต่ความคิดเป็นเพียงอาการของจิตใจ ความคิดอาศัยจิตใจเกิดขึ้น เป็นนามธรรม ความคิดไม่มีตัวไม่มีตนแต่ว่ามีอิทธิพลสำหรับเรามาก เพราะความคิดนี่แหละคือผู้ที่บงการชีวิตเราอยู่ ทำให้เราได้จับตัวผู้บงการชีวิตเราได้ ก็คือเจ้าความคิดนี่เอง โดยเฉพาะความคิดที่เราไม่ได้ตั้งใจคิด ก็มักจะผุดขึ้นมาเป็นครั้งคราว คิดขึ้นมาแล้ว ทำให้เกิดความพอใจบ้าง ไม่พอใจบ้าง เป็นสุขบ้าง เป็นทุกข์บ้าง เกิดกิเลส เกิดความยึดมั่นถือมั่น เพราะความคิด จะทำให้จิตใจเสียความเป็นปกติไป เป็นทุกข์เพราะความคิด อันนี้แหละคือตัว สมุทัย คือเหตุที่ทำให้เกิดทุกข์ เหตุที่ทำให้เกิดทุกข์มีอะไร ก็ต้องมีหน้าที่ละทันทีเลย เรามาจัดการที่เหตุตรงนี้เลย แต่ว่าความคิดที่มีประโยชน์นี่ก็มีนะ เราใช้ได้ เราหยิบใช้ได้ อย่างเช่นความคิดที่เราตั้งใจคิดขึ้นมา คิดเป็นเรื่อง ๆ เป็นราว ๆ ให้เสร็จลงไป เป็นการจับเอาความคิดมาใช้ มีสภาพที่เป็นนายเหนือความคิด คิดด้วยสติปัญญา ที่รู้เท่าทันในอาการ ต่าง ๆ และถ้าเราคิดอย่างเป็นระเบียบ คิดแล้วใจเราเป็นปกติได้ นั่นคือความยึดมั่นถือมั่นสามารถปล่อยวางได้ คือเมื่อเราจะหยุดคิดก็หยุดได้ ไม่ต้องไปรอเมื่อไรก็เพราะความคิดเห็น คือเราคิดขึ้นมาแล้วนี่ ถ้าเราไปทำ ไปพูดก็มีแต่จะเกื้อกูลกับคนทั่วไป ไม่เป็นไปเพื่อเบียดเบียนตัวเอง และก็ผู้อื่นให้เดือดร้อน อันนี้คือความคิดที่เป็นประโยชน์ และไม่เป็นทุกข์
ทีนี้พอเรามาจัดการกับที่เหตุของความทุกข์แล้ว คือละเจ้าตัวความคิดที่มันปรุงแต่งเป็นใยยุ่งออกไปจากจิตใจเราได้ ทำให้จิตใจเรานี่เป็นอิสระขึ้นมาทันที จิตจะไม่ตกไปเป็นทาสของความคิดไม่ว่าชนิดใดก็ตาม จิตจะเป็นปกติตามธรรมดา สติคือวิชชา ที่จะทำให้ไปล้างตัวอวิชชาให้หมดไปจากจิตจากใจเรา นี่ถ้าใครปฏิบัติอย่างนี้ก็ต้องเห็นอย่างนี้ เพราะว่า ธรรมะแท้นี่ ต้องรู้ ต้องเห็นในสิ่งเดียวกัน ธรรมะแท้นี่ต้องรู้กันได้ แล้วก็เห็นกันได้ สติที่เราพยายามสร้างขึ้นมานี่แหละญาติธรรม จะช่วยคุ้มครองดูแลกายและจิตของเราให้เป็นปกติ ไม่ให้ตกไปสู่ในโลกที่ชั่ว โดยเฉพาะที่จิตใจเรานี่ เป็นสิ่งที่สำคัญมาก สติจะทำหน้าที่เป็นครูสอนจิตเราเป็นอย่างดี ยามใดที่มีความโกรธมากระทบจิตใจเรา สติก็จะทำหน้าที่สอนจิตทันที สอนว่า เจ้าความโกรธนี่ ตามอะไรไม่ได้ เมื่อไรมีความโกรธมากระทบทีไร จิตใจเราก็เหน็ดเหนื่อย กระวนกระวาย ไม่ค่อยปกติ เวลามีความโกรธกระทบทีไร จิตใจเราต้องร้อน ร้อนทุกที แล้วก็ตกนรกทุกทีเหมือนกัน จิตนี่เมื่อถูกสอน บ่อย ๆ บ่อย ๆ เข้า จิตจะเกิดประสบการณ์ มันจะเห็นทุกข์เห็นโทษของความโกรธ มันก็ไม่อยากโกรธแล้ว บางทีก็ตีกับความโกรธเป็นความรักไปเลย เป็นความเมตตาไปเลย
หลวงพ่อคำเขียนท่านก็เคยสอนไว้ว่า คนมีสตินี่ เท่ากับมีพระพุทธเจ้าอยู่ในตัว คนมีสตินี่ เหมือนกับมีพระพุทธเจ้า ทรงช่วยคุ้มครองดูแล จึงเกิดมีพระขึ้นในจิตในใจเรา เราเป็นพระได้ที่ใจเรา เพราะเรามี พระสติ จึงไม่จำเป็นต้องไปคล้องพระเครื่องรุ่นไหนก็ได้ ให้เราคล้องพระสตินี่ คล้องไปที่จิตที่ใจของเรา ผมเชื่อว่าจะศักดิ์สิทธิ์ดีนัก เพราะว่าช่วยได้ทั้งกันทั้งแก้ปัญหา ต่าง ๆ ได้อย่างแท้จริง สติที่อยู่กับปัจจุบันนี่ญาติธรรม มันจริงที่สุดเลย ถ้าชีวิตของเราทุกคนนี่ คิดจริง ๆ เลย ก็คิดปัจจุบันนี้เท่านั้น เราจะหาคุณค่าและก็สาระชีวิตของเรานี่ก็ตรงที่ปัจจุบันนี่ ไม่ใช่อดีต ไม่ใช่อนาคต และเมื่อเราเข้าใจตัวเอง เห็นตัวเองได้ชัดเจนขึ้น สามารถอ่านตัวเราออก บอกตัวเราได้ ใช้ตัวเราเป็น ชีวิตจะไม่หงอยเหงา และก็ไม่ซึมเศร้าด้วย มันจะสดใส แล้วก็ใหม่ทุกวัน ด้วยอำนาจของพระธรรม เพราะว่าธรรมะนี่ ใครทำใครได้ ธรรมะนี่ทำแทนกันไม่ได้
วันนี้ผมจึงอยากจะเชิญชวนญาติธรรม ลองมาสนใจเรื่องการเจริญสตินี่ดูก่อน โดยที่ไม่ต้องไปศึกษาจากตำรับตำราที่ไหน ตำราเราอ่านมามากแล้ว ไม่เห็นมันจะดับทุกข์ให้เราได้จริงจังสักที สู้ว่าเรามากระทำลงไปที่กายเลย เราจะเคลื่อนไหวด้วยวิธีใดให้มีสติตามรู้ ให้ต่อเนื่อง เป็นขณะ ๆ ให้มีปัจจุบันที่กาย ทำได้ทุกคนเลย ง่าย ๆ คนพิการยังทำได้ นี่ถ้าคนพิการบอกว่าง่ายแล้วก็ คนที่มีร่างกายเป็นปกติย่อมไม่เหลือวิสัยจะปฏิบัติได้ ถ้าเรายังมีกายที่เคลื่อนไหวได้ แล้วก็มีสติตามรู้อยู่ละก็ เท่ากับว่าท่านนี่ได้เจริญสติแล้ว ได้ปฏิบัติธรรมในขั้นสูงสุดในทางพระพุทธศาสนาแล้ว เราทำให้มาก ทำบ่อย ๆ ทำจนชนิด นาน ๆ ท่านก็จะไม่มีความทุกข์เหลือ นี่ถ้าจะเปรียบนะ สติที่เราสร้างขึ้นมานี่เปรียบเสมือนเจ้าตัววัคซีนที่มันอยู่ในจิตในใจเรา เอาไว้ต่อสู้กับเจ้าตัวเชื้อโรค คือกิเลสและความทุกข์ ที่จะมาเบียดเบียนเรา พุทธสุภาษิตกล่าวไว้ว่า คนมีสตินี่ ย่อมประสบกับความสุข แต่จะสุขแบบใดหรือขนาดไหนนั้นนี่ อยากจะเชิญท่านลองสัมผัสดูนะ แล้วสิ่งที่ผมได้กล่าวมานี้ ต้องขออภัยญาติธรรมเป็นอย่างมาก ผมไม่มีเจตนาที่จะมาสอนญาติธรรม คนพิการมิบังอาจจะทำเช่นนั้นได้ แต่เพราะว่าได้ปฏิบัติแบบนี้ แล้วก็ใช้กับตัวเองได้ผล จึงได้มาทำหน้าที่เป็นสื่อ เป็นอุปกรณ์ หรือเป็นปากให้พระธรรมก็ได้ เพื่อญาติธรรมจะได้เรียนรู้แล้วก็นำเอาไปปฏิบัติให้เป็นประโยชน์ขึ้นบ้าง เพราะบางทีอาจจะถูกจริตกับใครบางท่านที่นั่งอยู่นะที่นี้ก็ได้ ก็ถือเป็นการมาเล่าสู่กันฟังก็แล้วกัน
ก็เห็นว่าสมควรแก่เวลา ท้ายที่สุดนี้ ขอความเจริญและความผาสุก ความมีปัญญา นำพาตนให้พ้นไปเสียจากความทุกข์ ถึงสุขอันไพบูลย์ กล่าวคือ มรรค ผล นิพพาน จงได้บังเกิดแก่ญาติธรรมทุกท่าน ทุกคนเทอญ (สาธุ)
a8a8a8a8a8a8a8a8a8a
ขอบพระคุณท่านอาจารย์กำพลเป็นอย่างสูง ท่านมาวันนี้มาให้ดู แล้วก็มาอยู่ให้เห็น สังเกตท่านดูว่า ตลอดเวลาที่ท่านพูด ท่านมีอารมณ์โกรธ หรือว่ามีอะไรอยู่หรือเปล่า แสดงถึงความมีสติของท่าน เมื่อปีที่แล้วคุณพ่อมาด้วย แต่ปีนี้ขอแจ้งให้ผู้เข้าร่วมรับฟังทุกท่านทราบว่าคุณพ่อได้ถึงแก่กรรมแล้ว ปีนี้จะมีคุณแม่มาแทน นั่งอยู่ข้างหลังค่ะ ช่วงนี้คงจะเป็นการเปิดโอกาสให้ทุกท่านได้สอบถาม ตั้งคำถาม ถ้าท่านใดมีคำถาม กรุณาถามได้เลยค่ะ ถามอาจารย์กำพลว่า อย่างเมื่อปีที่แล้ว คุณพ่อมาด้วยนะคะ คุณพ่อได้ถึงแก่กรรมไป อาจารย์ทำใจอย่างไร เพราะทุกคนต้องประสบปัญหาแบบนี้ เรียนถามค่ะ ตอบ ทีจริงแล้ว คุณพ่ออยู่กับผม ทุกครั้งที่เห็นคุณพ่อนี่ ผมก็คิดว่าท่านเสียแล้ว นึกในใจว่า มีความคิดว่าเราต้องจากกันอยู่แล้ว ทำใจไว้ก่อนแล้ว ทำใจไว้ล่วงหน้าแล้ว ตอนนี้มีคุณแม่อยู่ก็คิดว่า เหมือนอย่างกับไม่มีก็ได้ ทำใจไว้แล้วว่า ชีวิตนี้ต้องจากกัน เป็นเรื่องธรรมดา การทำใจไว้ก่อนนี่ เท่ากับเป็นการที่มีวัคซีนอยู่ในตัวเหมือนกัน ดูว่าเขาต้องจากไป คนเราอยู่กันชั่วขณะหนึ่ง อยู่กันชั่วปัจจุบัน ถ้าเราไม่เจอกันเราก็ต้องจากกัน การทำใจว่าต้องจากกันอยู่ทุกครั้งทุกบ่อยนี่ มันทำให้เราเริ่มจะปลง รู้จักปล่อยวาง เห็นเป็นเรื่องธรรมดา จึงไม่ได้มีความเสียใจ
ถาม ทุกท่านก็ให้เตรียมสร้างสติไปเรื่อย ๆ นะคะ เพราะว่า สติถ้าไม่สร้างไว้ ถ้านึกจะใช้เรียกมาทันทีมาไม่ได้อย่างที่คุณหมอกำพลได้บอกไว้ สำหรับคำถามของคุณหมอกำพลนะคะ
@ ถาม ถามคุณหมอกำพล ตอนที่เริ่มต้นฝึก ใหม่ ๆ นี่ ท่าฝึกแบบวิธีการเจริญสติ แบบหลวงพ่อเทียน ไม่สง่างามเลยค่ะ ยกมือขวักไขว่ไปมา เวลาฝึกต้องแอบไปทำหรือเปล่าคะ (เทปจบม้วนที่ 1)
@ ตอบ ตอนรู้จักวิธีการเจริญสติแบบหลวงพ่อเทียน แต่เราก็รู้สึกตัวได้อย่างนี้เป็นต้น หลวงพ่อคำเขียนบอกว่า เห็นความคิดได้ ออกจากความคิดได้ แล้วเป็นคนโกรธก็ได้ เป็นผู้เห็นความโกรธได้ มันก็ตรงกับประสบการณ์ที่เราเคยเจอมา เลยมั่นใจว่า สิ่งตรงนี้ถ้าเราทำให้มาก มันย่อมช่วยเราได้อย่าง จริง ๆ แล้วก็เพื่อได้ต่อเนื่องมากขึ้นก็เลยตั้งใจที่จะทำให้มาก ถึงขั้นที่เรียกว่าลาออกจากราชการอีกรอบหนึ่ง เพื่อที่จะไปอยู่วัดและปฏิบัติกันจริงจัง ทีนี้ถามว่าต้องแอบไปทำมั้ยนี่ จริง ๆ แล้วการเคลื่อนไหวทุกสิ่งนี่เราสามารถใช้เป็นการเจริญสติได้ทั้งสิ้นนะครับ ผมนั่งอยู่นี่ ผมนั่งเขี่ยมือผมเล่นนี่ ผมรู้สึกตัวอยู่ก็ได้ ท่านญาติธรรมนั่งอยู่ เอามือเกาขาเล่นอย่างนี้ก็ได้ เอามือขยี้นิ้วนี้ก็ได้ เพื่อเป็นการเคลื่อนไหวแล้วเราก็กำหนดรู้ แม้แต่ลมหายใจ เรานั่งนิ่ง เราก็หายใจเข้ารู้สึก หายใจออกรู้สึก เพราะความรู้สึกตัวไม่มีอะไร มันทำได้ทุกที่ ทุกสถานที่ นั่งรถเมล์อยู่ติดไฟแดง ทุกทีเราคิดโน่นคิดนี่ กายอยู่นี่แต่ว่าใจถึงบ้าน หรือว่านัดกับเพื่อนไว้ไปไม่ทัน กลัวเพื่อนจะด่า คิดไปเรื่อย เรานั่งรู้สึกอยู่กับการเคลื่อนไหว ทำอะไรรู้สึก กำคลาย หรือเขย่าขาเล่นก็ได้ เพราะฉะนั้นจริง ๆ แล้วการเจริญสตินี่ ง่ายอย่างยิ่ง ถ้าเรารู้จักทำ รู้จักทำ แต่ในขั้นตอนของการฝึกที่เป็นเขาเรียกว่าลงสนามซ้อมจริง ๆ แล้วนี่ ก็คือการยกมือเคลื่อนไหวเป็น จังหวะ ๆๆ ซึ่งมีรูปแบบที่หลวงพ่อเทียนบอกไว้ เขาเรียกว่าแบบฝึกหัด มันอาจจะดูไม่ค่อยเรียบร้อย ถ้าใครเห็นครั้งแรกอาจจะไม่ค่อยประทับใจก็ ถ้าเคยนั่งแต่ความสงบ ทำความสงบมา นั่งทำความสงบดูเคร่ง ดูขรึม ดูเขาเรียกอะไร ดูเข้าท่า น่าศรัทธา น่าเลื่อมใส แต่ถ้าเป็นแนวหลวงพ่อเทียน ยกมือไป เอามือมา จังหวะ พลิกมือรู้สึก ยกมือขึ้นรู้สึก เอามือมาวางไว้หน้าสะดือรู้สึก พลิกมือซ้ายขึ้นรู้สึก ยกมือซ้ายขึ้นรู้สึก เอามือซ้ายมาวางทับมือขวารู้สึก เคลื่อนมือขวาขึ้นรู้สึก กางออกรู้สึก เอามือวางไว้หน้าขารู้สึก คว่ำมือลงรู้สึก เลื่อนมือซ้ายขึ้นรู้สึก กางมือออกรู้สึก วางมือซ้ายลงรู้สึก คว่ำมือลงรู้สึก ในแต่ละรอบมันจะจบที่ประมาณ 14 รู้สึก ฉะนั้นทุกรู้สึกมีความรู้สึกเท่า ๆ กัน มีน้ำหนักเท่ากันคือ 1 ความรู้สึก นี่คือรูปแบบของการฝึก นี่คือรูปแบบของการฝึก เพราะฉะนั้นตอนเราฝึก เราก็ไม่ต้องไปทำให้ใครเห็นเพราะว่ามันจะสร้างความขุ่นเคืองตาให้กับคนอื่นได้ เพราะฉะนั้นถ้าเราจะทำเราก็ไปทำอยู่ในห้องเวลาอยู่คนเดียว หรืออะไรอย่างนี้ หรือว่าถ้าเกิดเราอยู่ในคนหมู่มาก อย่างเมื่อวานผมรอรถไฟอยู่ ผมไปนั่งสร้างจังหวะเดี๋ยวชาวบ้านนั่งมอง นั่งเสกอะไรอยู่ ผมก็เดินเล่น เดินไปเดินมา เดินไปเดินมา มองไปเรื่อย ๆ แต่ว่าตาเราไม่ได้ไปจริงหรอก ตาในเราอยู่ที่เท้า เดินไปเดินมา เดินไปเดินมา ใช้เวลาให้เป็นประโยชน์นะครับ เพราะฉะนั้น ถ้าเรามีความมั่นใจในแนวทาง แล้วเราทำเป็นแล้วนี่ อยู่ที่ไหน อยู่อย่างไร ผมถึงบอกว่า มันสามารถที่จะนำไปใช้กับการทำงานได้จริง ๆ ใช้ได้จริง ๆ ถ้าเอาเป็นส่วนหนึ่งของชีวิตไว้ได้นี่ เราก็จะอยู่กับสติ อยู่กับพระสติ อย่างที่อาจารย์กำพลว่า พระองค์นี้ศักดิ์สิทธิ์ ช่วยให้เราไม่โกรธได้ ช่วยให้เราไม่หลงได้ นะครับ ช่วยให้เราทำงานอย่างราบรื่นได้ ด้วยอำนาจของสติ เพราะฉะนั้นไม่ต้องอาย ถ้าจะฝึก บางทีมันอาจจะดูเคอะเขินบ้าง ในช่วงแรก แต่เมื่อทำเป็นแล้วเราไม่ต้องทำอย่างนั้นก็ได้ นั่งพลิกมือเล่น อย่างอาจารย์กำพลเวลาฝึกที่บ้าน อาจารย์กำพลก็พลิกหงายรู้สึก พลิกคว่ำรู้สึก พลิกหงายรู้สึก พลิกคว่ำรู้สึก ทำแค่นี้ ไม่ต้องยกมืออย่างเราก็ได้ แม้แต่การกระดิกหูของอาจารย์ก็เป็นการเจริญสติได้ อย่างที่อาจารย์เคยทำให้ดูนะครับ
@ ถาม ขอเรียนถามอาจารย์กำพลนะคะ อย่างเวลาที่เราฝึก เวลาที่เคลื่อนไหว สร้างจังหวะหรือว่าเดินจงกรมก็ตาม การที่จะเดินช้าหรือเร็วนี่มีผลอย่างไรบ้างคะ
@ ตอบ การเดินจงกรมเดินช้าหรือเดินเร็วนี้ ขึ้นอยู่กับจริตของแต่ละคน การปฏิบัติก็เพื่อ ให้มีสติ ให้มีความรู้สึกตัว ถ้าเราเดินจงกรมช้า แล้วเรารู้สึกตัว อันนั้นคือเรา ถ้าเราเดินจงกรมเร็ว แล้วเรารู้สึกตัวอันนั้นคือเรา ถ้าเดินจงกรมช้า แล้วความคิดดีอันนั้นคือเรา ที่ว่าสติจะได้เจริญกับความคิดเจริญ ต้องขึ้นอยู่กับความถนัดของเรา แล้วการเดินจงกรมช้าหรือเร็วนี่ มีวิธีการแก้อยู่อย่างคือ ถ้าเดินช้าแล้วความคิดมันดี อันนี้ก็ไม่ถูก เราเปลี่ยน เดินให้มันเร็วขึ้น ความคิดจะได้น้อยลง แล้วสติจะดีขึ้น ขึ้นอยู่กับจริตและก็นิสัยของเรา
@ ถาม ถามอาจารย์กำพล ที่บอกว่า เราปฏิบัติธรรมแล้วก็สมควรแก่ธรรม คืออย่างไรคะ
@ ตอบ คือธรรมะนี่ เป็นหลักแห่งการเห็น พระพุทธเจ้าตรัสไว้ ถ้าเราปฏิบัติตรงตามที่พระพุทธเจ้าตรัสไว้นี่ คือการปฏิบัติแบบสมควรแก่ธรรม อย่างเช่น ทำสติปัฏฐาน 4 เราปฏิบัติ มีอยู่ข้อหนึ่งว่ากายานุปัสสนาสติปัฏฐาน ถ้าเราสามารถเจริญสติเห็นกายในกายได้ เห็นกายสักแต่ว่ากายไม่ใช่สัตว์ บุคคล ตัวตน เรา เขา ปล่อยวางกายได้ นั่นแหละการปฏิบัติแบบสมควรแก่ธรรม เราเจริญสติแล้วทำให้จิตเราเกิดปัญญา รู้แจ้ง เห็นจริงตามธรรมชาติต่อสิ่งทั้งหลายทั้งปวง นั่นหละคือธรรมะ ถ้าเราปฏิบัติถึงตรงนั้นแล้วเท่ากับเราปฏิบัติถึง ธรรมที่สมควรแก่ธรรม
@ ถาม ถามต่ออีกนิดค่ะ ที่บอกเห็นกายในกาย เห็นแบบไหนคะ
@ ตอบ คำว่าเห็นกายในกายก็คือ เห็นกายที่มีอยู่ในตัวเรา เห็นกายที่มีอยู่จริงในตัวเรา เห็นสักว่าเป็นกาย ไม่ใช่สัตว์ บุคคล ไม่ใช่ตัวตน ไม่ใช่เรา ไม่ใช่เขา เป็นสักแต่ว่าธรรมชาติอย่างนั้นเอง นั่นหละคือการเห็นกายในกาย คือเห็นแล้วไม่ยึดมั่นถือมั่นว่าเป็นตัวเราของเรา
@ ถาม ขอกลับมาถามคุณหมอกำพลบ้างนะคะ วันนั้นที่โทรศัพท์มา ท่านถามว่าดิฉันสบายดีมั้ย ดิฉันก็บอกดิฉันสบายดี นอนหลับดี ไม่เคยตื่นกลางคืนเลย ไม่ค่อยมีความทุกข์ แล้วท่านก็ ไม่รู้กล้าดียังไงนะคะมาว่าดิฉันว่าดิฉันหลง อยากทราบว่าเพราะอะไร แล้วที่รู้รู้อยู่ตลอดเวลานี่ ชีวิตไม่จืดชืดแย่หรือคะ
@ ตอบ ก็อย่างที่เคยบอกไปว่า ฉันเป็นคนดีก็พอแล้วอย่างนั้น เป็นคนดี อยู่เป็นสุข นอนหลับสบาย นอนหลับไม่ฝัน เทวดาคุ้มครอง พระคุ้มครอง หลับสบายดี นอนกลางคืน 4 ทุ่ม ตื่น 7 โมงเช้านี่ กี่ชั่วโมง อย่างที่ยกตัวอย่าง ที่ผมอ่านเจอในปฏิปทาของหลวงพ่อชา หลวงพ่อชาเดินผ่านไป พบพระภิกษุที่บวชเป็นชาวตะวันตก ท่านถามว่าเป็นอย่างไรบ้าง พระภิกษุตะวันตก นั้นก็ตอบว่า สบายดีครับ แทนที่หลวงพ่อชาจะพูดอะไรอย่างอื่น หลวงพ่อชาบอกว่า ปฏิบัติธรรมสบายดีไม่ดี ปฏิบัติธรรมสบายดีไม่ดี เพราะว่าที่มันสบายดี มันทำตามกิเลส ถ้าเราทวนกิเลสหรือว่าทวนกระแส กิเลสมันต้องเดือดร้อน ทุกข์มันต้องเกิด ถูกมั้ย แต่ว่าทุกวันนี้นี่ เราไหลไปตามกระแส ไหลไปตามความหลง ไหลไปตามความคิด มันสั่งให้เรานอน เราก็นอน มันสั่งให้เรานอน เจ็ดชั่วโมง ไม่ต้องลุกขึ้นมาทำอะไรเลย หลับใหล หลับใหล ไม่ใช่หลับลึกนะ หลับใหล คือ จริง ๆ ผมคิดว่ากับพี่นี่ เป็นบุคคลที่จริง ๆ แล้วถ้าจะเรียกว่ากระตุ้นได้ง่าย เพียงแต่ว่า พี่เขายังไม่ค่อยลงมือทำอย่าง จริงๆ จัง ๆ แต่ว่าสนใจทำ ก็เลย จริง ๆ วัตถุประสงค์อยากกระตุ้นให้พี่เขาตื่น ตื่นจากความหลับ หรือว่าอาจจะเรียกว่าตื่นจากความหลงก็ว่าได้ ให้กลับมาตื่น ตื่นรู้ ตื่นรู้ นี่คือสภาวะที่เรียกว่า พุทธะ เพราะฉะนั้น อย่า อย่าหลับใหล อย่าหลับใหล ให้หลับแล้วก็ลุก ลุกแล้วก็ตื่น ไม่ทราบจะตรงหรือเปล่า
@ ถาม กราบนมัสการหลวงพ่อคำเขียน คือหนูอยากจะทราบว่าเรื่องของโมหะ คือความหลง เราไม่รู้ตัวเองอย่างนี้ค่ะ ว่าอันนี้ หลับแล้ว ยกตัวอย่างที่คุณหมอกำพลพูดเมื่อกี๊นี้ เราไม่ทราบว่าตรงนี้มันไม่ถูกหรือมันเป็นความหลงหรือเปล่า โดยเฉพาะหลงตัวเอง จะแก้อย่างไร มีวิธีการอย่างไรเจ้าคะ
@ ตอบ โมหะคือความหลง ถ้าเปรียบกับนิ้วมือเราสามนิ้ว (นิ้วชี้ นิ้วกลาง นิ้วนาง) โมหะมันจะอยู่ตรงกลาง มันสูงกว่าเขาหรือใหญ่กว่าเขา ถ้ามีโมหะโกรธได้ ถ้ามีโมหะก็โลภได้ เพราะมันมีอำนาจ โมหะมันอยู่ตรงกลาง มันไม่ใช่เข้าแถว โลภะ โทสะ โมหะ ตามที่หลวงพ่อเห็นนะ ไม่ใช่คิดเห็น พบเห็น จริง ๆ มันเหมือนนิ้วมือ โมหะมันสูง มันใหญ่ด้วยนะ โกรธก็ได้ โลภก็ได้ รักได้ ชังได้ มันอยู่ตรงกลาง เพราะฉะนั้นวิธีที่เอาชนะโมหะหลวงพ่อว่า ง่ายนิดเดียว หลวงพ่อก็บอกแล้วว่า ชีวิตเรามี ตัวรู้กับตัวหลงใช่มั้ย ใช่มั้ย ตอบดูซิ มีตัวรู้กับตัวหลง เท่านี้เอง ถ้ารู้สึกตัวมันจะหลง หลงก็แก้ได้ หลวงพ่อเรียกว่านี่คือนักภาวนา นักขยันรู้ มันจะไปไหน ตัวหลงนี่ ถ้าเรารู้ เวลาไปมันก็เกิดไม่ได้เพราะตัวรู้มันเป็นธรรม ธรรมย่อมชนะอธรรมตลอดเวลา อย่าไปกลัวนะโมหะ ถ้ามันเกิดอะไรขึ้น ก่อนที่มันจะสำคัญมั่นหมายไปเอง เข้าข้างตัว คือเรายังไม่ได้หลัก ถ้าเราได้หลักของการทำ ของอาจารย์กำพลอธิบาย กายก็สักว่ากาย เห็นกายสักว่ากาย สักกายทิฏฐิ เห็นกายเป็นกายไม่เห็นเป็นอื่น ความทุกข์ของกายมันก็ย่อมเป็นความทุกข์ของกาย ความร้อน ความหนาวเป็นเรื่องของความร้อนความหนาว ไม่ใช่ตัวเรา เห็นอย่างนี้ เห็นกาย เห็นจริง ๆ เห็นแจ้งจนตอบได้ว่าเห็นกายเป็นกาย ไม่เห็นเป็นกู ถ้าเห็นเป็นกูก็เป็นดุ้นเป็นก้อน การเห็นว่าเป็นกายนี่ มันก็กาย มันก็มีธรรมชาติ ถ้ากายร้อนไม่เป็นมันก็ไม่เป็นกาย หนาวไม่เป็น หิวไม่เป็น ยุงกัดไม่เจ็บมันก็ไม่เป็นกาย ขอบคุณมันที่มันหิว ขอบคุณมันที่มันร้อนมันหนาว ขอบคุณมันที่มันเจ็บด้วย ถ้ายุงกัดไม่เจ็บอะไรจะเกิดขึ้น ไฟไหม้ไม่เจ็บอะไรมันจะเกิดขึ้น ผิดปกติแล้ว ถ้ายุงกัดมันเจ็บ โอ๊ หิวมันหิว โอ๊ ขอบคุณ หิว โอ๊ ดี แสดงว่าร่างกายเรา ปกติที่สุด ถ้าไม่หิว จะอันตราย บางคนไปเป็นทุกข์เพราะความหิว อ้าว เป็นทุกข์ทำไมความหิว มันปกติที่สุดแล้ว ร่างกายเรา มีหลายคนเป็นทุกข์เพราะความหิว มีมั้ย มี หลวงพ่อเคยเป็นมาก่อน เดี๋ยวนี้หลวงพ่อเปลี่ยนโฉมหน้า พอหิวดีใจ ชื่นใจ อายุ 66 ปีแล้วยังหิวข้าว โอ๊ย ชื่นใจ บางคนหิวข้าวใจห่อเหี่ยว โกรธแม่บ้าน โกรธลูก โกรธเต้า ไม่ต้องไปคิดว่ามันเปลี่ยนนะ นี่คือไม่หลง ให้เห็นจริง ๆ เห็นกาย อะไรมันแสดงว่าเป็นกาย ให้แค่ หลวงพ่อบอกเมื่อตะกี้ว่า เห็นอาการ มันร้อนเป็นอาการ มันหนาวเป็นอาการ มันหิวเป็นอาการ อาการของกาย นั่นเห็นกาย จริง ๆ ตัวสติมันจะเห็น มันจะเห็นรูปเห็นนามนะ ที่พูดนี่ ไม่ใช่อารมณ์ของกรรมฐาน ผู้ที่จะได้อารมณ์ พอรู้สึกตัว ไปเห็นการเกิด 1 วัน 2 วัน โอ้ มันเคลื่อนไหวนี่รูป มันคิดมันรู้มันเป็นนาม พอเห็นเป็นรูปเป็นนามเข้าแถว เห็นรูปเห็นนามจะเห็นชัด มันจะเข้าแถวมา การเกิดอารมณ์ของกรรมฐาน เห็นแจ้ง จริง ๆ จนละกายได้ท่านเรียกว่า พระโสดาบัน พระโสดาบันก็คือสักกายทิฏฐิ ทำลายทิฏฐิอันตัวสำคัญมั่นหมายในกาย เป็นร้อนเป็นทุกข์ หนาวเป็นทุกข์ หิวเป็นทุกข์ ทำลายได้ ร้อนไม่เป็นทุกข์ หนาวไม่เป็นทุกข์ หิวไม่เป็นทุกข์ คือสักกายทิฏฐิ วิจิกิจฉาไม่สงสัยเรื่องกาย ต่าง ๆ สีลพตปรามาส ไม่ยึดในสิ่งที่ทำให้เกิดทุกข์ สิ่งไหนที่ทำให้เกิดทุกข์เกิดโกรธ ปล่อย คลายทันที มันก็ไม่เหลือวิสัยที่เราจะทำ เพราะฉะนั้นก็ขอตอบได้เลยว่า ตัวโมหะตัวนี้มันก็มีอยู่แล้ว สร้างตัวรู้ตัวนี้ ไม่ต้องไปคิดหาเหตุหาผลอันใด สร้างตัวรู้ เข้าใจไปคิดเลยทีเดียว ความรู้สึกตัวนี่แหละ มีตัวรู้กับตัวหลง เอาจริง ๆ แล้วไม่มากหรอก ไม่เหลือวิสัยที่เราจะทำได้
@ ถาม ขอเรียนถามหลวงพ่อนะคะ ถ้าเราตามรู้ว่าตอนนี้เรากำลังทุกข์ หรือว่าเรากำลังโกรธ แล้วหลังจากนั้นเราต้องทำอะไรต่อไปหรือว่ารู้ เฉย ๆ
 @ ตอบ ความโกรธ พอมันโกรธลองมองตรงกันข้าม ไม่โกรธ พอรู้สึกตัว สมมติว่ามันโกรธ อารมณ์โกรธนี่ ถ้าเราไม่ให้แนวร่วมกับมัน มันจะอยู่ได้ไม่นาน เรามีวิธีหลายอย่าง เช่น หายใจเข้าลึก ๆ หายใจออก ยาว ๆ แล้ว อย่าพูดในเวลาโกรธ ให้มีสติ มีความรู้สึกตัว อันนี้ก็ ไปเก็บตัวหน่อยความโกรธ มันเข้าถึงตัวเราแล้ว เหมือนคนเป็นโรคต้องไปรักษา นั้นวิธีที่เราฝึกสร้างตัวรู้สึกตัว ยามสงบเราฝึก ยามศึกเรารบได้ เหมือนกับเราป้องกัน แต่ว่าให้มีกำลังใจสักหน่อยพอมันโกรธ อย่าพูดเวลาโกรธ อย่าแสดงออก ให้สงบ ให้มีความรู้สึกตัว …. อย่าไปลำดับ เขาว่าอย่างนั้นเขาว่าอย่างนี้ ทำไมจึงพูดอย่างนั้น ทำไมจึงพูดอย่างนี้ อย่าไปลำดับ สร้างความรู้สึกตัว ให้หายใจเข้าลึก ๆ หายใจออกยาว ๆ สักสิบรอบ ความโกรธมันก็จะสร่างซาลงหรือหายไป แต่คนเราถ้าได้โกรธแล้ว มันรีบนะ ไม่ค่อยเย็นไม่ค่อยช้า รีบไปไหน รีบไปด่ากัน ทำไมจึงรีบไปด่ากัน กลัวมันจะใจดีก่อน จะไม่ได้ด่ากัน มันก็รีบ ถ้าเราเย็นไว้ เย็น ๆ ไว้สักหน่อย มันไม่มีตัวมีตนจริง ๆ ความโกรธ มีหวังชนะ
a8a8a8a8a8a8a8a8a8a
คิดว่าสมควรแก่เวลาแล้วนะครับ หลวงพ่อทั้งบรรยายทั้งตอบคำถาม ให้พวกเราได้เข้าใจ และสามารถที่จะนำไปปฏิบัติ วิทยากรทั้ง 3 ท่าน ทั้งหมดก็ได้ให้ความรู้ ความเข้าใจ และแนวทางปฏิบัติด้านธรรมะ สุดท้ายจะขอพรจากหลวงพ่อนะครับ ก่อนที่จะถึงช่วงนั้นนี่ ก็คิดว่าทุกท่านที่มาร่วมรับฟังในที่นี้ ก็คงได้รับประโยชน์ การได้ฟังธรรมะถือว่าเป็นมงคลชีวิตอย่างหนึ่ง เราเติมบุญเข้าไปในชีวิตของเรา แล้วคนที่เติมสิ่งที่ ดี ๆ ในชีวิตของเราก็คือ ต้องกราบขอบพระคุณหลวงพ่อคำเขียน สุวัณโณ ที่ท่านเมตตาอย่างมากที่ได้มาให้ความรู้ ให้การปฏิบัติแก่พวกเรา และก็กราบขอบพระคุณพระอาจารย์เอนก เจ้าอาวาสวัดโมกข์ที่ท่านก็ได้มาร่วมในพิธีทำบุญอุทิศส่วนกุศล และก็มีพระในวัดของท่านที่มาเป็นปฏิคาหกให้พิธีการวันนี้ด้วย ขอขอบพระคุณนายแพทย์กำพล ผู้ส่งข่าวของเรา และก็ขอบพระคุณอาจารย์กำพลที่บรรยายธรรมะและเป็นอุปกรณ์ธรรมะให้พวกเราศึกษาอย่างดี ขอบคุณทีมงานทุกคนที่ร่วมมือ ร่วมใจ ขยันขันแข็งในการเตรียมงาน และก็เสียสละแรงกายแรงใจที่มาทำงานร่วมกัน ทำบุญร่วมกัน คือคณะทำงานของอุทิศส่วนกุศลนี้นะครับ ขอขอบคุณสมาคมศิษย์เก่าแพทย์ขอนแก่นที่ให้สถานที่ รวมทั้งเป็นผู้สนับสนุนด้วย และก็ขอบคุณผู้ฟังทุกท่านที่มาในวันนี้ ซึ่งทุกท่านก็คงจะได้รับฟังเรื่องที่เกี่ยวกับความมหัศจรรย์แห่งการเจริญสติ สิ่งที่สำคัญที่สุดคืออะไร สิ่งที่สำคัญที่สุดก็คือ ทุกคนต้องสร้างความมหัศจรรย์แห่งการเจริญสติที่ตัวของท่าน ทุก ๆ คนเอง นะครับ (จบ)
จากคุณ : พรรณี [ 16 มี.ค. 2546 ]
Thailand Web Stat