Ubuntu:Feisty th
From
คู่มือ Ubuntu 7.04 (Feisty Fawn) สำหรับผู้เริ่มต้น
Ubuntu 7.04 (Feisty Fawn) ได้ออกมาวันที่ 19 เมษายน 2550 คู่มือนี้ยังเป็นแค่ งานในการพัฒนา เราต้องการการช่วยเหลือของคุณในการทดสอบและปรับปรุงคู่มือนี้
หากต้องการแก้ไขหน้า คุณต้องสมัครสมาชิก
หากมีปัญหาใดๆ กรุณาส่งจดหมายติดต่อเราที่ ubuntuguide -ณ- ubuntuguide.org (ภาษาอังกฤษเท่านั้น)
หรือภาษาไทย กรุณาถามปัญหาในห้อง #ubuntu-th เครือข่าย Freenode และเว็บบอร์ด อูบันตุคลับ
Full list of all the subpages: Ubuntu:Feisty_th/TOC
อ่านก่อนใช้งาน
- นี่คือคู่มือ Ubuntu 7.04 (Feisty Fawn) สำหรับผู้เริ่มต้นอย่างไม่เป็นทางการ มันไม่เกี่ยวข้องกับอูบันตุหรือบริษัท Canonical
- สามารถถามปัญหาที่กระดานข่าว UbuntuGuide.org อย่างเป็นทางการที่ ubuntuforums.org ลองเข้าไปดูและถามปัญหา(ภาษาอังกฤษเท่านั้น) สำหรับภาษาไทย กรุณาเข้าเยี่ยมชมกระดานข่าวของอูบันตุคลับ
- หากคุณเห็นกล่องสีฟ้า มันหมายความว่าคุณต้องสั่งคำสั่งนี้ในเทอร์มินัล (โปรแกรม -> อำนวยความสะดวย -> เทอร์มินัล) หรือใช้เนื้อหาของกล่องนั้นตามที่บอกไว้ในขั้นตอนอื่นๆ
- ในการลดการพิมพ์ผิด ให้คุณคัดลอกและวางคำสั่งในโหมดเทอร์มินัล (คลิกขวาที่คำสั่งแล้วเลือกคัดลอก หรือคุณสามารถใช้ Ctrl+C ในการคัดลอกและ Shift+Insert เพื่อวาง)
- คำสั่ง "sudo" ย่อมาจาก superuser do(การกระทำของผู้ใช้ขั้นสูง) "sudo" จะถามรหัสของท่านด้วยคำสั่ง "Password:" ให้ท่านใส่รหัสผ่านที่ท่านใช้เข้าระบบลงไป(รหัสผ่านจะไม่แสดง แต่สามารถพิมพ์ไปได้เลย)
- หากคุณต้องการทราบข้อมูลเพิ่มเติมสำหรับคำสั่งใดๆ ให้ดูหน้าคู่มือสำหรับคำสั่งนั้นโดยใ้ช้คำสั่ง "man" เช่น "man sudo" จะแสดงหน้าคู่มือสำหรับคำสั่ง "sudo"
- หากคุณขี้เกียจพิมพ์ "aptitude" ตลอดเวลา กรุณาอ่านวิธีการใช้้ aptitude อย่างง่าย (Synaptic)
- คำสั่ง "aptitude" และ "wget" ต้องการการเชื่อมต่ออินเทอร์เน็ตเพื่อติดตั้ง/อัปเดต/ดาวน์โหลดโปรแกรม
- คำสั่งทุกตัวที่ใช้ "apt-get" ได้ถูกแทนที่ด้วย "aptitude" คุณสามารถใช้ "apt-get" ได้อย่างไม่มีปัญหาถ้าต้องการ เรื่องนี้มีการถกเถียงในอูบันตุฟอรั่ม (ภาษาอังกฤษเท่านั้น)
- ในการดาวน์โหลดไฟล์ คลิกขวาบนลิงก์แล้วเลือก "Save Link As..." จากนั้นดูให้แน่ใจว่าชื่อไฟล์และนามสกุลถูกต้อง
- หากคุณต้องการช่วยแปลอูบันตุไปยังภาษาของคุณ หรือต้องการช่วยผู้อื่นกรุณาดู [1] (ภาษาอังกฤษเท่านั้น) ก่อนทำการแปล กรุณาอ่านเว็บไซต์ทีมแปลภาษาไทยของ OpenTLEเสียก่อน
- เว็บไซต์อูบันตุฟอรั่ม(www.ubuntuforums.org) เป็นภาษาอังกฤษเท่านั้น หากคุณต้องการถามปัญหาใดๆในภาษาไทย กรุณาใช้กระดานข่าวอูบันตุคลับหรือห้องสนทนา #ubuntu-th ใน ฟรีโน๊ด
- เนื่องจากคู่มือนี้แปลมาจากภาษาอังกฤษ ข้อความบางตัวอาจจะเข้าใจยาก หากท่านไม่เข้าใจกรุณานำข้อความพร้อมลิงค์นั้นไปโพสท์ในกระดานข่าวอูบันตุคลับ และสำนวนที่ใช้อาจจะต่างกันเพราะคู่มือนี้มีผู้ร่วมพัฒนาหลายท่าน
- ขอให้ึความเอื้ออาทรอยู่กับคุณตลอดไป...
- หากคุณใช้คอมพิวเตอร์รุ่น 64 บิต กรุณาแทนคำว่า "i386" เป็น "amd64" ทุกตัว
มาเริ่มต้นกันเถอะ
จะสามารถหาภาพจับหน้าจอ/สกรีนแคสต์ของ Ubuntu ได้จากที่ใดบ้าง
- Ubuntu 6.10 Screenshots
- Ubuntuclips.org - video howto's for human beings
- Ubuntu Video - linux videos for human beings
จะสามารถหาภาพจับหน้าจอ/สกรีนแคสต์ของ Kubuntu ได้จากที่ใดบ้าง
- Kubuntu 6.10 Screenshots
จะสามารถหาภาพจับหน้าจอ/สกรีนแคสต์ของ Xubuntu ได้จากที่ใดบ้าง
- Official Xubuntu screenshots
- Xubuntu 6.10 Screenshots
จะสามารถหาภาพจับหน้าจอ/สกรีนแคสต์ของ Edubuntu ได้จากที่ใดบ้าง
- Edubuntu 6.10 Screenshots
จะสามารถหาภาพจับหน้าจอ/สกรีนแคสต์ของ *buntu ได้จากที่ใดบ้าง
- Ubuntu Multimedia Center RC1 Screenshots
- Ubuntu CE 2.0 Screenshots
- Nubuntu 6.10 Screenshots
- Ubuntu Satanic Edition 1.0 Screenshots
จะสามารถหาโปรแกรมใหม่ ๆ ได้จากที่ใดบ้าง
- http://gnomefiles.org/
- http://www.kde-apps.org/
- http://freshmeat.net
- http://sourceforge.net/
จะสามารถหาชุดตกแต่งสำหรับพื้นโต๊ะทำงานของท่านได้จากที่ใดบ้าง
- http://art.gnome.org/
- http://www.gnome-look.org/
- http://www.kde-look.org/
- http://xfce-look.org/
ยังมีคู่มือการใช้งานของ *buntu ที่ใดอีกบ้าง?
- http://xubuntuguide.org
- Ubuntu Step By Step Guides For Ubuntu Users
อัปเกรด Ubuntu Edgy เป็น Ubuntu Feisty
- ขั้นตอนตามลำดับพร้อมภาพประกอบ (ภาษาอังกฤษ)
เพิ่มแหล่งซอฟท์แวร์อื่นๆอย่างไร
- อ่านหน้านี้ก่อน
- คุณสามารถเพิ่มแหล่งซอฟท์แวร์เพิ่มเติมได้โดยใช้โปรแกรมแหล่งซอฟท์แวร์ โดยใช้งานที่ ระบบ -> ดูแลระบบ -> แหล่งซอฟท์แวร์ แล้วตรวจสอบแหล่งซอฟท์แวร์ทั้งหมด (main, universe, restricted, multiverse) คุณไม่จำเป็นต้องใช้แหล่งซอฟท์แวร์ 'sources' นี่เป็นวิธีที่แนะนำให้ใช้เพิ่มแหล่งซอฟท์แวร์!
- อีกวิธีในการเพิ่มแหล่งซอฟท์แวร์โดยใช้วิธีต่อไปนี้ (ใช้อย่างระมัดระวัง):
- ทำสำรองไฟล์แหล่งซอฟท์แวร์
sudo cp -p /etc/apt/sources.list /etc/apt/sources.list_backup
- เปิดรายชื่อแหล่งซอฟท์แวร์ในโปรแกรมแก้ไขข้อความ
- ผู้ใช้อูบันตุ/เอ็ดดูบันตุ:
sudo gedit /etc/apt/sources.list
- ผู้ใช้คูบันตุ:
sudo kate /etc/apt/sources.list
- แทนที่ทุกอย่างด้วยบรรทัดต่อไปนี้
- หากจะใช้แหล่งสำเนาใกล้บ้านท่าน ให้เติม "cc." ก่อน archive.ubuntu.com (cc = รหัสประเทศของท่าน เช่นประเทศไทยคือ th)
- ตัวอย่าง deb http://th.archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
## See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to ## newer versions of the distribution. ## Add comments (##) in front of any line to remove it from being checked. ## Use the following sources.list at your own risk. ## Uncomment deb-src if you wish to download the source packages ## If you have a install CD you can add it to the reposity using 'apt-cdrom add' ## which will add a line similar to the following: #deb cdrom:[Ubuntu 7.04 _Feisty Fawn_ - Beta i386 (20070322.1)]/ feisty main restricted deb http://th.archive.ubuntu.com/ubuntu/ feisty main restricted #deb-src http://th.archive.ubuntu.com/ubuntu/ feisty main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://th.archive.ubuntu.com/ubuntu/ feisty-updates main restricted #deb-src http://th.archive.ubuntu.com/ubuntu/ feisty-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://th.archive.ubuntu.com/ubuntu/ feisty universe #deb-src http://th.archive.ubuntu.com/ubuntu/ feisty universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://th.archive.ubuntu.com/ubuntu/ feisty multiverse #deb-src http://th.archive.ubuntu.com/ubuntu/ feisty multiverse ## Uncomment the following two lines to add software from the 'backports' ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://th.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse #deb-src http://th.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu feisty-security main restricted #deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted deb http://security.ubuntu.com/ubuntu feisty-security universe #deb-src http://security.ubuntu.com/ubuntu feisty-security universe deb http://security.ubuntu.com/ubuntu feisty-security multiverse #deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse ## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.) ## Medibuntu - Ubuntu 7.04 "feisty fawn" ## Please report any bug on https://launchpad.net/products/medibuntu/+bugs deb http://medibuntu.sos-sts.com/repo/ feisty free non-free #deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free ## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu ## servers. RealPlayer10, Opera, DesktopSecure and more to come.) deb http://archive.canonical.com/ubuntu feisty-commercial main ## enlightenment e17 beta, use at your own risk ## E17 is in Beta and may break or break your system #deb http://edevelop.org/pkg-e/ubuntu feisty e17 #deb http://e17.dunnewind.net/ubuntu feisty e17 #deb-src http://edevelop.org/pkg-e/ubuntu feisty e17
- บันทึกไฟล์ที่แก้ไขแล้ว
- ดาวน์โหลดกุญแจ PGP:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
- ทำการโหลดรายชื่อแพคเกจใหม่:
sudo aptitude update
- คุณอาจจะสร้างไฟล์ sources.list ของคุณเองและหาแหล่งซอฟท์แวร์อื่นๆที่เว็บไซต์: [2]
- กรุณาแก้ไขไฟล์ sources.list มาตราฐานเฉพาะเมื่อคุณรู้ว่าทำอะไรอยู่ เอาแหล่งซอฟท์แวร์หลายตัวรวมกันอาจจะให้ระบบของคุณพังได้
Ubuntu:Feisty th/UbuntuUpdates
วิธีอัตโนมัติ
Automatix2
- ติดตั้งแพคเกจนี้ (จำไว้ว่ารุ่นของแพคเกจอาจจะเปลี่ยนได้ ดูรุ่นล่าสุดที่ here (ภาษาอังกฤษ)):
- [3]
- ติดตั้งด้วยคำสั่งนี้:
sudo dpkg -i automatix2_1.1-3.6-7.04feisty_i386.deb
- Automatix2 จะอยู่ในโปรแกรม > เครื่องมือระบบ > Automatix
- ขั้นตอนติดตั้ง Automatix2 พร้อมภาพประกอบ (ภาษาอังกฤษ)
โปรแกรมเสริม
ปลั๊กอินจาวา และปลั๊กอินของเบราว์เซอร์ที่ไม่ใช่เพื่อความบันเทิง
การติดตั้งจาวา J2SE Runtime Environment (JRE) รุ่น 6.0 พร้อมปลั๊กอินสำหรับมอซิลลาไฟร์ฟอกซ์
sudo aptitude install sun-java6-jre sun-java6-plugin
- เมื่อถาม ให้คุณยอมรับข้อตกลงลิขสิทธิ์ DLJ
วิธีติดตั้งตัวเล่นแฟลช (มาโครมีเดียแฟลช) สำหรับมอซิลลาไฟร์ฟอกซ์
โปรดจำ: วิธีการดีที่สุดในการติดตั้งปลั๊กอินแมโครมีเดียแฟลชเพลเยอร์สำหรับมอซิลลาไฟร์ฟอกซ์คือใช้ไฟร์ฟอกซ์เข้าชม อโดบีดอทคอม: ตรวจสอบรุ่นของแฟลชเพลย์เยอร์ คุณจะเห็นคำแนะนำเกี่ยวกับไฟร์ฟอกซ์ขาดปลั๊กอินสำหรับแฟลช คลิกบนคำแนะนำนี้และทำตามขั้นตอนใดๆที่ไฟล์ฟอกซ์บอกคุณให้ทำตาม ปกติแล้วไฟร์ฟอกซ์จะติดตั้งปลั๊กอินนี้อัตโนมัติเมื่อคุณคลิก "install now".
มันสามารถทำได้โดยใช้โปรแกรมจัดการแพคเกจ:
sudo aptitude install flashplugin-nonfree
- ปิดและเปิดมอซิลลาไฟร์ฟอกซ์อีกครั้ง
คำแนะนำ: หากไม่มีเสียงในแฟลช (เช่นบนเว็บยูทูบ):
sudo aptitude install alsa-oss gksudo gedit /etc/firefox/firefoxrc
ให้แก้ไข:
FIREFOX_DSP=""
เป็น:
FIREFOX_DSP="aoss"
- ปิดและเปิดมอซิลล่าไฟร์ฟอกซ์อีกครั้ง ตอนนี้เสียงน่าจะใช้ได้ในตัวเล่นแฟลชแล้ว
วิธีการติดตั้งโปรแกรมลูกข่ายของเครือข่ายผู้ใช้ติดต่อผู้ใช้บิตทอร์เรนต์ (Azureus)
รุ่นจาวาปกติ
sudo aptitude install azureus
- เปิดโปรแกรมโดยไปที่: โปรแกรม -> อินเทอร์เน็ต -> Azureus
รุ่น GCJ
sudo aptitude install azureus-gcj
- เปิดโปรแกรมโดยไปที่: โปรแกรม -> อินเทอร์เน็ต -> Azureus
วิธีติดตั้งโปรแกรมลูกข่ายของเครือข่ายผู้ใช้ติดต่อผู้ใช้บิตทอร์เรนต์ (Deluge)
- โหลดไฟล์ที่โปรแกรมพึงพา โหลดไฟล์โค้ดล่าสุด คอมไพล์โค้ด แล้วติดตั้ง
sudo aptitude install subversion build-essential python-all-dev python-all \ python-support libboost-dev libboost-thread-dev libboost-date-time-dev \ libboost-filesystem-dev libboost-serialization-dev \ libboost-program-options-dev libboost-regex-dev zlib1g-dev && \ svn checkout http://deluge-torrent.org/svn/trunk deluge && \ cd deluge && python setup.py build && sudo python setup.py install
- ลบไฟล์ติดตั้ง
cd .. && rm -Rf deluge/
- ดาวน์โหลด์ ปลั๊กอินของ Deluge (ไม่จำเป็นต้องทำ)
- เปิดโปรแกรมโดยไปที่: โปรแกรม -> อินเทอร์เน็ต -> Deluge BitTorrent Client
สภาวะการทำงานอื่นๆ
การติดตั้ง KDE
- อ่านก่อนใช้งาน
- อ่านวิธีเพิ่มแหล่งซอฟท์แวร์อื่นๆ
- คุณอาจจะลองชมภาพตัวอย่าง KDE (ภาษาอังกฤษ)
sudo aptitude install kubuntu-desktop
- โปรดจำ: การติดตั้งนี้จะใช้ที่ประมาณ 400MB
- ระบบ -> ออก -> ออกจากระบบ
- การกลับไปยัง KDE ให้คลิก วาระ และเลือก KDE
การติดตั้ง XFCE
- อ่านก่อนใช้งาน
- อ่านวิธีเพิ่มแหล่งซอฟท์แวร์อื่นๆ
- คุณอาจจะลองชมภาพตัวอย่าง XFCE (ภาษาอังกฤษ)
sudo aptitude install xubuntu-desktop
- ระบบ -> ออก -> ออกจากระบบ
- การกลับไปยัง XFCE ให้คลิก วาระ และเลือก XFCE
การติดตั้ง FluxBox
นี่คือภาพตัวอย่าง(ภาษาอังกฤษ) Fluxbox เป็นระบบจัดการหน้าต่างขนาดเล็กยอดนิยม
sudo aptitude install fluxbox
ทำให้มันเริ่มหลังจากเข้า GDM
echo "exec startfluxbox" > ~/.xinitrc
ทำให้มีเสียงน่ารักๆเวลาเข้าระบบ
sudo aptitude install sox gedit ~/.fluxbox/startup
- หาบรรทัดนี้:
exec /usr/local/bin/fluxbox
- เอาบรรทัดนี้อยู่ข้างบนบรรทัดนั้น:
play /usr/share/sounds/login.wav > /dev/null 2>&1 &
- ฟัง
การเมานต์พาร์ติชันของวินโดวส์ทำอย่างไร
การเมานต์พาร์ติัชัน NTFS
ขั้นตอนการเมานต์พาร์ติชันของวินโดวส์แบบเป็นขั้นตอน (ภาษาอังกฤษ)
ลูกเล่น
การติดตั้งเบอร์ริวสำหรับการ์ดจอ Nvidia
- อ่านก่อนใช้งาน
- อ่านวิธีเพิ่มแหล่งซอฟท์แวร์อื่นๆ
- อ่านขั้นตอนการติดตั้งเบอรริวและไดรฟ์เวอร์การ์ดจอ Nvidia แบบเป็นขั้นตอน (ภาษาอังกฤษ)
- ดูให้แน่ใจว่าแพคเกจทั้งหมดทันสมัย
sudo aptitude update sudo aptitude dist-upgrade
- ทำสำรอง xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup gksudo gedit /etc/X11/xorg.conf
- ติดตั้งไดรฟ์เวอร์การ์ดจอ Nvidia สำหรับการ์ดแสดงผล*
- ระบบ -> ดูแลระบบ -> Restricted Driver Manager
เปิดการใช้ไดรฟ์เวอร์ Nvidia
กด Ctrl+Alt+Backspace เพื่อให้แน่ใจว่าไดรฟ์เวอร์ Nvidia ทำงานได้ถูกต้อง
- ติดตั้งเบอร์ริว
sudo aptitude install beryl emerald-themes beryl-manager
- เปิดเบอร์ริว
beryl-manager
- เปิดเอ็มเมอร์รัล (ถ้ามันไม่เปิดขึ้นมาเอง)
emerald --replace
- ให้เบอร์ริวและเอ็มเมอร์รัลเปิดมาอัตโนมัติเมื่อเข้าสู่ระบบแล้ว
- ระบบ -> ตั้งค่า -> วาระ
- Startup Program -> เพิ่ม
beryl-manager
และ
emerald --replace
- เมื่อบู๊ตเครื่องใหม่ เมนูโปรแกรมไม่ยอมขึ้นมาเหนือโปรแกรมอื่นๆ ให้คลิกขวาบนไอคอน 'Beryl Manager' ในแผงควบคุม (รูปเพชรสีแดง) และเลือก 'Reload Window Manager' ปัญหาน่าจะหายไปในครั้งหน้าที่คุณบู๊ตใหม่
การติดตั้ง Xgl/Beryl บนการ์ดจอ ATI
"อ้างอิง (จาก ubuntuforums.org)"
"ทดสอบบน Ubuntu Feisty version i386 การ์ดจอ onboard ATi Xpress 1100 share 128 MB"
- เปิดเทอร์มินอล จากเมนู
โปรแกรม > อำนวยความสะดวก > เทอร์มินอล
- อัปเดทระบบ โดยพิมพ์ :
sudo apt-get update sudo apt-get upgrade
- ติดตั้ง Xgl (ในการ์ดจอ ATI cards ไดรเวอร์ fglrx สนับสนุนเฉพาะ Xgl):
sudo apt-get install xserver-xgl
- สร้างสคริปท์ให้ Xgl รัน:
sudo gedit /usr/local/bin/startxgl.sh
- พิม์ข้อความด้านล่างแล้วบันทึกดังนี้:
#!/bin/sh Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer & DISPLAY=:1 exec dbus-launch --exit-with-session gnome-session
- ถ้ามองไม่เห็นปุ่ม shutdown กับปุ่ม restart ให้แก้เป็น:
#!/bin/sh Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer & DISPLAY=:1 cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)" xauth -i add :1 . "$cookie" exec dbus-launch --exit-with-session gnome-session
- ทำให้สคริปท์สามารถรันเป็นโปรแกรมได้:
sudo chmod a+x /usr/local/bin/startxgl.sh
- จากนั้นแก้ให้มีตัวเลือก Xgl หน้าจอเข้าระบบบน GDM:
sudo gedit /usr/share/xsessions/xgl.desktop
- พิม์ข้อความด้านล่างแล้วบันทึกดังนี้:
[Desktop Entry] Encoding=UTF-8 Name=GNOME with XGL Comment= Exec=/usr/local/bin/startxgl.sh Icon= Type=Application
- ทำให้สคริปท์สามารถรันเป็นโปรแกรมได้:
sudo chmod a+x /usr/share/xsessions/xgl.desktop
- ยกเลิกตัวเลือก universe ใน repositories (Beryl ใน universe ไม่สนับสนุนไดรเวอร์ fglrx).
ไปที่ ระบบ > ดูแลระบบ > แหล่งของซอฟแวร์ คลิกไม่เลือก ที่ Community-maintained Open Source software (universe) คลิกปิด
เปิดเทอร์มินอล:
- เพิ่ม repository key:
sudo wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
- เพิ่ม repository ลงใน apt source list:
sudo gedit /etc/apt/sources.list เพิ่มบรรทัด deb http://ubuntu.beryl-project.org/ feisty main บันทึกแล้วปิด gedit
- อัปเดท apt sources:
sudo apt-get update
- ติดตั้ง Beryl :
sudo apt-get install beryl emerald-themes
Apt จะเลือกติดตั้ง plug-ins and libraries ให้อัตโนมัติ
- วิธีติดตั้งไดรเวอร์การ์ดจอ ATI (ถ้ายังไม่ติดตั้ง):
ไปที่ ระบบ > ดูแลระบบ > Restricted Drivers Manager คลิกเลือกใช้งาน check box ที่ ATI graphics card.
จากนั้นเปิดเครื่องใหม่เพื่อให้การ์ดจอทำงาน
- หลังจากเปิดเครื่องลองเลือก Xgl จาก sessions ในหน้าจอเข้าระบบ, ทดสอบ Beryl โดยเปิดเทอร์มินอลแล้วพิมพ์:
beryl-manager emerald --replace
จะเห็นรูปเพชร Beryl ที่พาเนลด้านมุมขวาบน คลิกขวาที่รูป Beryl เลือกหัวข้อ "Select Window Manager" แล้วเลือก "Beryl" คลิกขวาอีกทีที่รูป Beryl แล้วเลือกหัวข้อ ""Select Window Decorator" แล้วเลือก "Standard Beryl Decorator (Emerald)" จะทำให้ Beryl ทำงาน
- ในการใช้การ์ดจอ ATI กับ XGL, ถ้ามี error อีกแสดงว่า beryl-xgl หายไป ให้ทำดังนี้:
ดาวน์โหลด beryl-core จาก http://ubuntu.beryl-project.org/pool/feisty/main/0.2.0/beryl-core_0.2.0~0beryl1_i386.deb แยกไฟล์ beryl-xgl จากไฟล์ที่ได้ เช่นแยกไว้ที่ ~/Desktop ไปที่เทอร์มินอลพิมพ์: sudo cp ~/Desktop/beryl-xgl /usr/bin/beryl-xgl
- ถ้าทุกอย่างทำงานได้ , เราก็เพิ่ม Beryl กับ Emerald themes ไปที่ start-up โดย:
ไปที่เมนู ระะบบ > ปรับแต่งพื้นโต๊ะ > วาระ คลิก ปุ่มใหม่ พิมพ์ Beryl ในช่องชื่อ พิมพ์ beryl-manager ในช่องคำสั่ง คลิก ปุ่มตกลง คลิก ปุ่มใหม่ พิมพ์ Emerald Themes ในช่องชื่อ พิมพ์ emerald --replace ในช่องคำสั่ง คลิก ปุ่มตกลง
- เย้ ! ทำได้แล้ว! หวังว่าทุกคนคงทำได้ ก่อนจบ เราต้องล็อคไม่ให้ Beryl ไม่ให้อัปเดท โดยเปิด Synaptic
ไปที่เมนู ระะบบ > ปรับแต่งระบบ > ตัวจัดการแพกเกจ Synaptic แล้วเลือกแพกเกจ beryl beryl-core beryl-manager beryl-plugin แล้วไปที่เมนู แพกเกจ คลิกเลือก ล็อคเวอร์ชัน
การเพิ่มพิกเซลย่อยในการวาดฟอนต์สำหรับ Feisty
นี่จะช่วยเพิ่มความสวยงามของฟอนต์ที่แถมกับการติดตั้งมาตราฐานของอูบันตุ ไฟล์ไลบราลีี่ใหม่ถูกสร้างมาแทน Freetype 2.3.x (ปัจจุบันไม่ได้อยู่ใน feisty) และรวมตัวแก้ไขการวาดพิกเซลย่อยของ David Turner
- สำหรับ i386 เพิ่มบรรทัดต่อไปนี้ไปยังไฟล์ /etc/apt/sources.list
deb http://www.telemail.fi/mlind/ubuntu feisty fonts deb-src http://www.telemail.fi/mlind/ubuntu feisty fonts
- สำหรับ AMD64/EMT เพิ่มบรรทัดต่อไปนี้ไปยังไฟล์ /etc/apt/sources.list
deb http://raof.dyndns.org/falcon feisty experimental deb-src http://raof.dyndns.org/falcon feisty experimental
- แพคเกจที่จะอัปเกรดคือ libfreetype6, libcairo2 และ libxft2
sudo aptitude update
- หลังการติดตั้งคุณอาจจะต้องการตั้งค่าฟอนต์ใหม่ ค่าต่อไปนี้ใช้ได้ดี: Native, Automatic, No bitmapped fonts.
sudo dpkg-reconfigure fontconfig-config sudo dpkg-reconfigure fontconfig
- ถ้ามีปัญหากุญแจ GPG หาย
gpg --keyserver subkeys.pgp.net --recv-keys 937215FF gpg --export --armor 937215FF | sudo apt-key add -
- กุญแจ GPG สำหรับแพคเกจ AMD64/EMT
wget http://ubuntu.moshen.de/2F306651.gpg -O- | sudo apt-key add -
บรรณานุกรม: http://ubuntuforums.org/showthread.php?t=343670 (ภาษาอังกฤษ)
โปรแกรมที่ซื้อขายกัน
การติดตั้ง Windows 9X/ME/2000/XP (Win4Lin)
- http://www.win4lin.com
การติดตั้งโปรแกรมของวินโดวส์ (VMWare Workstation)
http://www.vmware.com
- แปลง vmwareworkstation_5.5.3-34868_i386.rpm เป็น vmwareworkstation_5.5.3-34868_i386.deb โดยใช้ Alien แล้วติดตั้งมัน
- หลังการติดตั้งให้ไปดูโฟล์เดอร์ที่ติดตั้งแล้วรันไฟล์ *.config เพื่อปรับค่า
- ใช้งานมัน
การติดตั้งโปรแกรมของวินโดวส์ (CrossOver Office)
- http://www.codeweavers.com
การเล่นเกมของวินโดวส์ (Cedega)
- http://www.transgaming.com
ดูแลผู้ใช้
การเซต/เปลี่ยน/เปิดใช้รหัสของผู้ใช้ root
sudo passwd root
การปิดใช้งานผู้ใช้ root
sudo passwd -l root
การเปิดให้รูทล็อคอินเข้าสู่ GNOME
- อ่านก่อนใช้งาน
- อ่านการเซต/เปลี่ยน/เปิดใช้รหัสของผู้ใช้ root
- ระบบ -> ดูแลระบบ -> หน้าจอเข้าระบบ
- ตั้งค่าหน้าต่างเข้าระบบ
แท็บ ความปลอดภัย -> ความปลอดภัย -> อนุญาตให้ผู้ดูแลระบบเข้าสู่ระบบ (ต้องทำเครื่องหมายไว้)
การเปลี่ยนไปใช้ผู้ใช้ root ในโหมดคำสั่ง
sudo -s -H Password: <ใส่รหัสผ่านของคุณ>
การเพิ่ม/แก้ไข/ลบผู้ใช้
- อ่านก่อนใช้งาน
- ระบบ -> ดูแลระบบ -> ผู้ใช้และกลุ่ม
- ผู้ใช้และกลุ่ม
แท็บผู้ใช้งาน -> เพิ่มผู้ใช้งาน.../คุณสมบัติ/ลบ
- หรือ
sudo useradd dang sudo userdel dang
- ข้อมูลเพิ่มเติม โปรดอ่าน
man usermod
การเพิ่ม/แก้ไข/ลบกลุ่มผู้ใช้
- อ่านก่อนใช้งาน
- ระบบ -> ดูแลระบบ -> ผู้ใช้และกลุ่ม
- ผู้ใช้และกลุ่ม
แท็บ กลุ่ม -> เพิ่มกลุ่ม.../คุณสมบัติ/ลบ
การล็อคอินเข้าสู๋ GNOME โดยอัตโนมัติ (ไม่ปลอดภัย)
- อ่านก่อนใช้งาน
- ระบบ -> ดูแลระบบ -> หน้าต่างเข้าระบบ
แท็บ เข้าระบบ -> เปิดการเข้าระบบอัตโนมัติ (ต้องทำเครื่องหมายไว้) แล้วเลือกผู้ใช้งานจากรายชื่อหล่นลง
การเพิ่ม sudoers
EDITOR=gedit sudo visudo
- เพิ่มบรรทัดนี้ต่อท้ายไฟล์
system_username ALL=(ALL) ALL
- บันทึกไฟล์ที่แก้ไขแล้ว
หรือ เพราะทุกคนในกลุ่ม admin สามารถใช้งาน sudo:
sudo adduser dang admin
มันจะเพิ่มกลุ่ม admin ไปยังรายชื่อกลุ่มของผู้ใช้คนนั้น และเขาจะมีสิทธิ sudo
การใช้ "sudo" โดยไม่ถามรหัสผ่าน (ไม่ปลอดภัย)
EDITOR=gedit sudo visudo
- หาบรรทัดนี้
... system_username ALL=(ALL) ALL ...
- แทนที่ด้วย
system_username ALL=(ALL) NOPASSWD: ALL
- บันทึกไฟล์ที่แก้ไขแล้ว
การยกเลิกวาระ "sudo" อย่างกระทันหัน
sudo -K
การแก้ไขสิทธิของไฟล์และโฟล์เดอร์
คลิกขวาบนไฟล์/โฟล์เดอร์ -> คุณสมบัติ
แท็บ สิทธิ -> อ่าน/เขียน/เรียกใช้ (เช็คสิทธินี้สำหรับ เจ้าของ/กลุ่ม/อื่นๆ)
การเปลี่ยนเจ้าของไฟล์/โฟล์เดอร์
sudo chown dang /location_of_files_or_folders
หากจะเปลี่ยนเจ้าของทั้งไฟล์และโฟล์เดอร์ข้างในด้วย ให้ใช้ตัวเลือก -R แบบนี้:
sudo chown -R dang /location_of_files_or_folders
การเปลี่ยนกลุ่มเจ้าของไฟล์/โฟล์เดอร์
sudo chgrp boys /location_of_files_or_folders
หากจะเปลี่ยนกลุ่มเจ้าของสำหรับไฟล์และโฟล์เดอร์ข้างในด้วย ให้ใช้ตัวเลือก -R แบบนี้:
sudo chgrp -R boys /location_of_files_or_folders
ฮาร์ดแวร์
เมาส์
เริ่มการทำงานของปุ่มด้านข้าง (side-mouse-buttons) ใน FireFox
เราสามารถเริ่มการทำงานของปุ่มด้านข้างใน FireFox ได้โดยเพิ่มบรรทัดลงไปในไฟล์ xorg.conf โดยมากแล้วจะสามารถใช้งานได้กับเมาส์ 5 ปุ่มโดยทั่วไป ขอยกตัวอย่างรายชื่อเมาส์ที่สามารถใช้งานได้ตามคำแนะนำนี้
- Logitech MX310
- Logitech MX510
- Logitech MX518
- Logitech MX700
- Intellimouse Explorer (first edition)
- Razer Copperhead
แบ็กอัปข้อมูลไฟล์คอนฟิกของ X.org
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
แก้ไขไฟล์คอนฟิกของ X.org
gksudo gedit /etc/X11/xorg.conf
หาส่วนที่พูดถึงอุปกรณ์ป้อนเข้า (Input Device section) สำหรับเมาส์ชองคุณ และเพิ่มบรรทัดทั้งสองเช่นที่แสดงด้านล่างนี้ ถ้าเมาส์ของคุณมีจำนวนปุ่มมากกว่า 7 คุณอาจจะต้องเพิ่มจำนวนปุ่มทั้งหมดในส่วนขึ้นกับจำนวนของปุ่ม (โปรดอย่าลืมว่าเราต้องนับปุ่ม back/forward, wheel click & tilt left/right ด้วย)
แก้ไข:
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" ... Option "Protocol" "ExplorerPS/2" ... Option "Emulate3Buttons" "true" EndSection
ไปเป็น:
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" Option "Buttons" "7" Option "ButtonMapping" "1 2 3 6 7" EndSection
ถ้าคุณต้องการปุ่ม scroll เพื่อที่จะเลื่อนหน้าใน Firefox แทนที่จะใช้ปุ่มด้านข้าง ให้เปลี่ยนเป็น "ZAxisMapping" "6 7" และ "ButtonMapping" "1 2 3 4 5" แทน
ถึงขั้นตอนนี้ให้รีบูตเครื่องของคุณหรือไม่ก็ให้รีสตารต์ X(Ctrl-Alt-BackSpace) เพื่อที่จะสังเกตว่าปุ่ม forward/back ทำงานบน FireFox แต่การเซ็ตเช่นนี้ยังจะไม่สามารถใช้งานปุ่มดังกล่าวบน Nautilus ได้หากคุณไม่ติดตั้งโปรแกรม imwheel
ติดตั้งและคอนฟิก IMWheel
- ติดตั้ง IMWheel
sudo apt-get install imwheel
- แก้ไขไฟล์คอนฟิกของ IMWheel
gksudo gedit /etc/X11/imwheel/imwheelrc
- เพิ่มข้อความต่อไปนี้ลงที่ด้านท้ายของไฟล์
".*" None, Up, Alt_L|Left None, Down, Alt_L|Right "(null)" None, Up, Alt_L|Left None, Down, Alt_L|Right
- สร้างสคริปต์สำหรับเริ่มการทำงานของ IMWheel
sudo mkdir /home/login gksudo gedit /home/login/mouse
- เพิ่มข้อความต่อไปนี้ลงไฟล์ใหม่
#!/bin/sh exec xmodmap -e "pointer = 1 2 3 6 7 4 5" & exec imwheel -k -b "67" & exec $REALSTARTUP
- อนุญาตให้ใครก็ตามสามารถสั่งทำงานสคริปต์ใหม่นี้ได้
sudo chmod +x /home/login/mouse
- คอนฟิกสคริปต์นี้ให้เริ่มทำงานขณะเริ่มต้นระบบ
- เลือกที่ 'System' > 'Preferences' > 'Sessions'
- คลิกที่แท็บ StartUp
- คลิก Add, จากนั้นให้พิมพ์: /home/login/mouse
- คลิก OK, จากนั้นก็คลิก Close
- รีบูต คอมพิวเตอร์ หรือ Gnome จากนั้นจึงทดสอลปุ่ม back/forward บน Nautilus
How to configure Apple Mighty Mouse
Apple Mighty Mouse works out of the box, this how to should cover setting up of horizontal scrolling using ball and sidebuttons.
This is placeholder only. Please, provide working howto.
การ์ดแสดงผล
วิธีการติดตั้งไดรเวอร์แสดงผล (NVIDIA)
- กรุณาอ่าน #General Notes
- กรุณาอ่าน #How to add extra repositories
sudo apt-get install nvidia-glx nvidia-kernel-common sudo nvidia-xconfig
- ถ้าคำสั่งด้านบนไม่สามารถติดตั้งไดรเวอร์ใหม่ได้ ให้ทำด้วยมือโดบการเปิดไฟล์คอนฟิกของ X:
sudo gedit /etc/X11/xorg.conf
- และแทนที่ "nv" ด้วย "nvidia"
- เริ่มการทำงานของ XvMC โดยสร้างไฟล์คอนฟิกของ nVidia XvMC
sudo gedit /etc/X11/XvMCConfig
- แทรกบรรทัดต่อไปนี้ลงในไฟล์คอนฟิกใหม่เพื่อที่จะบอกโปรแกรมเล่นไฟล์วิดีโอให้รู้จักแชร์ไลบารีของ nVidia XvMC:
libXvMCNVIDIA_dynamic.so.1
- เพื่อที่จะใช้ XvMC สำหรัลการเร่งความเร็วในการแสดงผลวิดีโอให้เพิ่มแฟลกต่อไปนี้ ดู [[4]] สำหรับข้่อมูลเพิ่มเติม
xine -V xxmc filename.ts mplayer -vo xvmc -vc ffmpeg12mc filename.ts
วิธีการติดตั้งไดรเวอร์แสดงผลเบต้า (NVIDIA)
- WARNING this is very error prone.. a better method is to use Alberto Milones Envy program; http://albertomilone.com/nvidia_scripts1.html
- Thanks to Alberto Milone
- The nVidia driver has been split into different branches; latest and new legacy. See http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9755/README/appendix-a.html to find out which driver you should be using. Latest=97xx / New Legacy=96xx
sudo gedit /etc/apt/sources.list
- Add ONE of the following lines based on your architecture
deb http://www.albertomilone.com/drivers/edgy/latest/32bit binary/ deb http://www.albertomilone.com/drivers/edgy/latest/64bit binary/
deb http://www.albertomilone.com/drivers/edgy/newlegacy/32bit binary/ deb http://www.albertomilone.com/drivers/edgy/newlegacy/64bit binary/
- Save the edited file
- Add the GPG key
wget http://albertomilone.com/drivers/tseliot.asc gpg --import tseliot.asc gpg --export --armor albertomilone@alice.it | sudo apt-key add -
- Update and install
sudo apt-get update sudo apt-get install nvidia-glx sudo apt-get upgrade
- The upgrade should update your linux-restricted-modules & linux-restricted-modules-common packages.
sudo nvidia-xconfig
- Add a menu option for nVidia Settings
sudo gedit /usr/share/applications/NVIDIA-Settings.desktop
- Insert these lines in the new file and save
[Desktop Entry] Name=NVIDIA Settings Comment=NVIDIA Settings Exec=nvidia-settings Icon= Terminal=false Type=Application Categories=Application;System;
- Restart the computer and your new drivers should be installed.
- Test the install with these 2 programs
glxinfo glxgears
How to setup pivot (screen rotation) with default X.org NVIDIA drivers
- Read #General Notes
- Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The default nVidia drivers shipped with X.org ("nv") support software screen rotation. Note that it's unaccelerated and can be slow, read #How to install Graphics Driver (NVIDIA) if you decide to install the proprietary driver.
- If you have the proprietary drivers from nVidia installed, please read #How to setup pivot (screen rotation) with proprietary NVIDIA drivers instead.
- To rotate the screen find the "Device" section for the "nv" driver in the /etc/X11/xorg.conf file:
Section "Device" Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]" Driver "nv"
- Add the following options to this section:
Option "Rotate" "CW"
Where the "Rotate" option has two possible values (depending on the orientation of the monitor):
- CW - rotate the display clockwise (right).
- CCW - rotate the display counterclockwise (right).
How to setup pivot (screen rotation) with proprietary NVIDIA drivers
- Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The proprietary nVidia drivers support hardware rotation with the Xrandr extension.
- To enable rotation support find the "Device" section for the "nvidia" driver in the /etc/X11/xorg.conf file:
Section "Device" Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]" Driver "nvidia"
- Add the following option to this section:
Option "RandRRotation" "on"
- Then the display can be rotated (direction depends on the orientation of the monitor) by:
- Setting the "Rotation" property to either "Left" or "Right" in the "System > Preferences > Screen Resolution" dialog.
- Issuing either "xrandr -o left" or "xrandr -o right" command.
How to disable NVIDIA graphics logo on GNOME startup
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup gksudo gedit /etc/X11/xorg.conf
- Find this section
... Section "Device" Identifier "NVIDIA Corporation NV11 [GeForce2 MX/MX 400]" Driver "nvidia" BusID "PCI:1:0:0" ...
- Add the following line below it
Option "NoLogo"
- Save the edited file
- Read #How to restart GNOME without rebooting computer
How to install Graphics Driver (ATI)
- See Unofficial ATI Linux driver wiki
- Or Ubuntuforums.org
- Or PenLUG.org
How to Correct the Graphics Resolution (Intel)
- Read #How to enable Large Widescreen Support if you have a larger (>20") monitor
- Intel 915g, 945g, etc. graphics chipsets only have a limited set of resolutions initially installed, despite the correct driver being detected.
- Install the resolution altering tool:
sudo apt-get install 915resolution
- Run the following to see the availible modes:
915resolution -l
- Choose a resolution you don't need and replace, for example the following changes 1920x1440 to 1920x1200
915resolution 5c 1920 1200
- This should add the option for that resolution to the "System>Preferences>Screen Resolution" tool.
- If it works correctly then you can make the change permanent:
sudo gedit /etc/rc.local
- Simply add the command you typed in above before:
exit 0
How to show nvidia GPU temperature (nvidia-settings)
At a terminal, type
nvidia-settings
How to detect CPU temperature, fan speeds and voltages (lm-sensors)
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install lm-sensors
Create file called mkdev.sh, and paste in the following
#!/bin/bash # Here you can set several defaults. # The number of devices to create (max: 256) NUMBER=32 # The owner and group of the devices OUSER=root OGROUP=root # The mode of the devices MODE=600 # This script doesn't need to be run if devfs is used if [ -r /proc/mounts ] ; then if grep -q "/dev devfs" /proc/mounts ; then echo "You do not need to run this script as your system uses devfs." exit; fi fi i=0; while [ $i -lt $NUMBER ] ; do echo /dev/i2c-$i mknod -m $MODE /dev/i2c-$i c 89 $i || exit chown "$OUSER:$OGROUP" /dev/i2c-$i || exit i=$[$i + 1] done #end of file
Make this file executable, then run it
sudo chmod +x mkdev.sh sudo ./mkdev.sh
Now detect sensors, and answer "y" to all questions.
sudo sensors-detect
To load the manual modules, type
sudo /etc/init.d/module-init-tools
Load the modules into kernel with
sudo sensors -s
And check the output
sudo sensors
How to control fan speed (lm-sensors)
Install and config lm-sensors first, see section above. Then run pwmconfig to test your fans
pwmconfig
If you can control fan speeds, great. Now creat a file called /etc/init.d/fancontrol, and paste in the following
#!/bin/sh # # Fancontrol start script. # set -e # Defaults DAEMON=/usr/sbin/fancontrol PIDFILE=/var/run/fancontrol-pid PATH=/sbin:/bin:/usr/sbin:/usr/bin test -f $DAEMON || exit 0 . /lib/lsb/init-functions case "$1" in start) log_begin_msg "Starting fancontrol daemon..." start-stop-daemon --start -o -q -m -b -p $PIDFILE -x $DAEMON log_end_msg $? ;; stop) log_begin_msg "Stopping fancontrol daemon..." start-stop-daemon --stop -o -q -p $PIDFILE log_end_msg $? ;; force-reload|restart) sh $0 stop sh $0 start ;; *) log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload}" log_success_msg " start - starts system-wide fancontrol service" log_success_msg " stop - stops system-wide fancontrol service" log_success_msg " restart, force-reload - starts a new system-wide fancontrol service" exit 1 ;; esac exit 0
Make it excutable
sudo chmod +x /etc/init.d/fancontrol
Test it
/etc/init.d/fancontrol start
and
/etc/init.d/fancontrol stop
If it works fine, autoload it when you reboot. Insert the following line into /etc/rc.local, before "exit 0"
/etc/init.d/fancontrol start
How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)
- Read #General Notes
- Read #How to add extra repositories
- Install lm-sensors first to monitor CPU temps, fan speed, and voltages in GKrellM. #How to detect CPU temperature, fan speeds and voltages (lm-sensors)
- Install nvidia video driver to monitor the nvidia GPU temperature. #How to install Graphics Driver (NVIDIA)
- Install hddtemp first to monitor hard drive temperatures
sudo apt-get install hddtemp
GKrellM is a hardware monitor that can display CPU and GPU temperatures, fan speeds, voltages, CPU load, network load, disk activity, disk temperature, memory usage, and swap usage. The installation is very easy, and configuration is just a few mouse-clicks. You can set alerts to warn you if the CPU is too hot or there is a fan failure. The hddtemp utility works with GKrellM to allow it to sense the disk temperature, as keeping your disks cool (e.g. less than around 40C) will allow them to last longer than if they run continually at higher temperatures (e.g. above 50C).
sudo apt-get install gkrellm
To run the program
Click Applications -> System Tools -> GKrellM
To configure the settings,
Right click on GKrellM -> Configuration
I was struggling with lm_sensors before, but it doesn't detect all of the sensors on my computer. Later I found "GKrellM". It displays the GPU temperature on my nVidia 6600 GT out of the box. GKrellM also has plugins that show weather info, set reminders, etc.
Add an audio alert (optional Step): Here is how to play an audio message when the CPU is too hot or a fan fails. First you need to find or record your own audio alert files. (I use Audacity to record my own.) Then go to:
Configuration -> Builtins folder (Left side)-> Sensors -> Temperatures folder (Right side)-> CPU -> Alerts Button
Paste ONE of the following lines into a Terminal window first to test the sound. If you have two sound cards, you can use "-ao oss:/dev/dsp1" option to route the sound to the second sound card. Modify the file path and name so it points to the correct file. If you can hear the sound, then copy that line to a command line text field on the GKrellM's Alerts window.
mplayer /home/myfolder/alert_messages/heat_alert.mp3 mplayer -ao oss:/dev/dsp1 /home/myfolder/alert_messages/heat_alert.mp3
CPU
How to enable your CPU's Power Saving/Frequency Scaling features
- Read #General Notes
- Step 1: Enable BIOS Support
Enter your BIOS at boot and make sure both ACPI and Cool'n'Quiet (AMD) or SpeedStep (Intel) are enabled. Some BIOSes may not have option at all. If that is the case it is probably enabled by default. Other BIOSes may have the option but it is listed as another name altogether. If that is the case check your BIOS manual for more info.
- Step 2: Remove Userspace Scaling Software
powernowd
sudo apt-get remove powernowd
cpudyn
sudo apt-get remove cpudyn
- Step 3: Install CPU Module
Identify your cpu type by runnig the command
cat /proc/cpuinfo
You can also Check the following links AMD CPU Chart - [[5]] Intel CPU Chart - [[6]]
AMD Sempron/Athlon/MP ( K7 )
Socket Types: A, Slot A
sudo modprobe powernow-k7
AMD Duron/Sempron/Athlon/Opteron 64 ( K8 )
Socket Types: 754, 939, 940, S1 ( 638 ), AM2 ( 940 ), F ( 1207 )
sudo modprobe powernow-k8
Intel Core Duo
sudo modprobe speedstep-centrino
Intel Pentium M
sudo modprobe speedstep-centrino
Intel Pentium 4
sudo modprobe p4_clockmod
Others (Unknown)
I'm not entirely sure which cpus are supported using this module. If your cpu doesn't work with one of the above methods try this one.
sudo modprobe acpi-cpufreq
- Step 4: Scaling Modules
sudo modprobe cpufreq_conservative sudo modprobe cpufreq_ondemand sudo modprobe cpufreq_powersave sudo modprobe cpufreq_stats sudo modprobe cpufreq_userspace
- Step 5: Testing/Configuration
Show Available Governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
You should see output similar to
powersave conservative ondemand performance
- Step 6: Load Modules at Boot
Add the following lines to the end of /etc/modules
cpufreq_conservative cpufreq_ondemand cpufreq_powersave cpufreq_stats cpufreq_userspace
Also add the module you selected in Step 3
- Step 7: Install cpufrequtils
This is a simple, effective tool for using the modules from the command line.
sudo apt-get install cpufrequtils
Test that it's working.
cpufreq-info
- Step 8: Select a governor
The different governors control how the CPU speed is scaled. Your choices are:
ondemand
CPU frequency is scaled based on load.
conservative
The CPUfreq governor "conservative", much like the "ondemand" governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour more suitable in a battery powered environment.
performance
CPU only runs at max frequency regardless of load.
powersave
CPU only runs at min frequency regardless of load.
See [[7]] for more details.
I typically use ondemand. You get a very slight performance hit and save a lot of power (and produce a lot less heat when idle).
Try it out:
cpufreq-set -g ondemand
On systems with more than one CPU you need to repeat the last command for every other CPU you have with specifying the parameter -c (CPU). To set the governor for the second CPU write:
cpufreq-set -c 1 -g ondemand
To see how many CPUs you have type:
ls /sys/devices/system/cpu/
- Step 9: Configure cpufrequtils to automatically set this governor on boot
Edit the file /etc/default/cpufrequtils. Change the line:
ENABLE="false"
to
ENABLE="true"
Set the GOVERNOR value to the governor name you chose in Step 8.
Sources: [[8]] [[9]]
Modems / Network
How to identify Modem chipset
- Read #General Notes
- To install Modem chipset identifier
- Read #How to install Basic Compilers (build-essential)
wget -c http://easylinux.info/uploads/scanModem.gz gunzip -c scanModem.gz > scanModem chmod +x scanModem sudo cp scanModem /usr/bin/
- To identify Modem chipset
sudo scanModem gedit Modem/ModemData.txt
How to install Windows Wireless Drivers (Ndiswrapper)
- Read #General Notes
- In order to install ndiswrapper you need a copy the windows drivers for your Wireless ethernet device.
- This is only meant to be installed if your card isn't supported by Ubuntu, check Ubuntu's list of natively supported wireless cards.
- Check ndiswrapper's list of supported wireless cards if your card isn't supported natively, please visit Ndiswrapper's official supported cards list
- Find out if you have acx module loaded. Because acx module interferes with windows driver, we need to remove it if it is found.
lsmod | grep acx
- Remove the acx module if found. It could also be acx_pci or similar. Please Note: New kernel updates will auto load the acx module again. So repeat the following two commands every time the kernel is updated.
sudo rmmod acx sudo nano /etc/modprobe.d/blacklist
- Add a new list at the end of the file like this:
# drivers wireless ACX blacklist acx
- Install ndiswrapper and drivers (due to a bug in Edgy, you need to specify ndiswrapper-utils-1.8)
sudo apt-get install ndiswrapper-utils-1.8 sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf sudo ndiswrapper -l sudo modprobe ndiswrapper
- Set ndiswrapper to load on startup
sudo ndiswrapper -m gksudo gedit /etc/modules
- Add the following module to the list
ndiswrapper
- Now you can configure your wireless card with ifconfig and iwconfig.
- e.g. Supposing wlan0 is your wireless device.
sudo iwconfig wlan0 essid "AP" key ababababababababab mode Managed iwconfig
- You sould now be able to see the MAC address of the access point and signal rate.
Ndiswrapper for Broadcom 43xx wireless chipset
- The Broadcom 43xx (bcm43xx) wireless chipset is one of the most common chipsets, so special scripts have been written for it.
- Only follow this if you have a bcm43xx device. To check in the Terminal type:
lspci | grep Broadcom\ Corporation
If it displays a line similar to this,
0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
you have a Broadcom wireless chipset. Please proceed with the instructions.
- Put the Ubuntu CD that you installed Ubuntu with in the CD drive.
- Download this to the desktop (the Firefox default, so if you haven't changed it, that's where it went/will go).
- In a terminal type
cd ~/Desktop (or wherever you downloaded the file) tar -xf bcm4318*.tar.gz sudo ./ndiswrapper_setup
Your wireless chipset should now work. Try rebooting if you have problems. Please see this thread if you have problems: http://ubuntuforums.org/showthread.php?t=197102&highlight=install+ndiswrapper
How to enable WPA with Ndiswrapper driver
- First, make sure the Ndiswrapper driver works by itself without encryption.
- Create a file called /etc/wpa_supplicant.conf, and paste in the following. Modify the ssid and psk values.
ctrl_interface=/var/run/wpa_supplicant network={ ssid="YourWiFiSSID" psk="YourWiFiPassword" key_mgmt=WPA-PSK proto=WPA pairwise=TKIP }
- Test it. Make sure your router is broadcasting its SSID.
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd
- If your WPA works. Load it automatically when you reboot.
gksudo gedit /etc/network/interfaces
- Change your wlan0 section to the following.
If you are using static IP:
auto wlan0 iface wlan0 inet static address 192.168.1.20 netmask 255.255.255.0 gateway 192.168.1.1 pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf post-down killall -q wpa_supplicant
or this, if you are using dhcp.
auto wlan0 iface wlan0 inet dhcp pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf post-down killall -q wpa_supplicant
- Reboot
How to install Modem Driver (SmartLink)
- Read #General Notes
- Read #How to add extra repositories
uname -r (must be 2.6.10-5-386) wget -c http://easylinux.info/uploads/sl-modem-modules-2.6.10-5-386_2.9.9a-1ubuntu2+2.6.10-34_i386.deb sudo dpkg -i sl-modem-modules-*.deb sudo apt-get install sl-modem-daemon
Palm
How to configure PalmOS Devices
- Read #General Notes
gksudo gedit /etc/udev/rules.d/10-custom.rules
- Insert the following line into the new file
BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"
- Save the edited file
- Add the pilot-applet to the Taskbar by Right-Clicking on an empty spot
- Follow the instructions on screen
Hard Drive
How to list partition tables
- Read #General Notes
sudo fdisk -l
- You can also use System -> Administration -> Disks
How to list filesystem disk space usage
- Read #General Notes
df -Th
- You can also use System -> Administration -> Disks
How to list mounted devices
- Read #General Notes
mount
How to remount /etc/fstab without rebooting
- Read #General Notes
sudo mount -a
USB
วิธีแสดงอุปกรณ์ USB ในเครื่อง
- อ่าน #General Notes
lsusb
Workaround for random device disconnections
Random disconnection is a kernel bug that is not fixed yet. Some users report randomly disconnecting USB devices, especially external hard drives. One solution is to start the system with the option "irqpoll" in grub, but this doesn't work for everybody, and is believed to make the whole system slower. The other solution is to disable USB 2.0. This will result in way slower read/write, but the connection remains stable.
To disable USB 2.0, type this in the terminal:
sudo modprobe -r ehci_hcd
Test if the copy/write process is stable, and if you want to disable USB 2.0 upon boot, type:
sudo sh -c 'echo blacklist ehci_hcd > /etc/modprobe.d/blacklist-ehci' sudo update-initramfs -u -k `uname -r`
Optical Drives
วีธีเพิ่มความเร็ว CD/DVD-ROM
- อ่าน #General Notes
- ตัวอย่างเช่นในเครื่องเรา CD/DVD-ROM อยู่ที่ตำแหน่ง /dev/cdrom ให้เข้า เทอร์มินอลแล้วพิมพ์
sudo hdparm -d1 /dev/cdrom sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup gksudo gedit /etc/hdparm.conf
- แล้วเพิ่มข้อความนี้ในบรรทัดสุดท้ายของไฟล์
/dev/cdrom { dma = on }
- เสร็จแล้วก็บันทึก
How to mount/unmount CD/DVD-ROM manually, and show all hidden and associated files/folders
- Read #General Notes
- e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
- To mount CD/DVD-ROM
sudo mount /media/cdrom0/ -o unhide
- To unmount CD/DVD-ROM
sudo umount /media/cdrom0/
How to forcefully unmount CD/DVD-ROM manually
- Read #General Notes
- e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
sudo umount /media/cdrom0/ -l
จอภาพ / การแดงผล
วิธีเปิดใช้งานจอ widescreen ขนาดใหญ่
- จอ widescreen ขนาด 24/23" นิ้ว จะสามารถใช้งานความละเอียด 1920x1200 ได้
- ยกตตัวอย่างเช่น จอรุ่น Dell 2405, HP 2335 หรือ Apple Cinema Display.
sudo gedit /etc/X11/xorg.conf
- เพิ่มบรรทัดนี้ในส่วน "Monitor" section
Modeline "1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235
- ตัวอย่าง ถ้าเป็นจอรุ่น HP2335 ก็ประมาณนี้:
Section "Monitor" Identifier "hp L2335" Option "DPMS" Modeline "1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235 EndSection
วิธีการเปิดใช้งาน ต่อเพิ่มจอ CRT (จอภาพแบบภายนอก / โปรเจคเตอร์) สำหรับ Notebook (Intel)
โน๊ต: ใช้ได้สำหรับการ์ดจอ Intel® onboard เท่านั้น
- อ่าน #General Notes
- อ่าน #How to add extra repositories
sudo apt-get install i810switch
เปิดการใช้จอ CRT ที่ต่อเพิ่ม
i810switch crt on
ปิดการใช้จอ CRT ที่ต่อเพิ่ม
i810switch crt off
วิธีการเปิดใช้งาน ต่อเพิ่มจอ CRT (จอภาพแบบภายนอก / โปรเจคเตอร์) สำหรับ Notebook (ATI)
โน๊ต: ใช้ได้สำหรับการ์ดจอ ATI ที่เปิดใช้งาน fgrlx dirver เท่านั้น
- อ่าน #General Notes
- อ่าน #How to add extra repositories
ตรวจดูการใช้งานจอภาพ ~$ aticonfig --query-monitor
Connected monitors: crt1, lvds Enabled monitors: lvds
เปิดการใช้จอ CRT ที่ต่อ ~$ aticonfig --enable-monitor=lvds,crt1 Enabling displays 0x2, 0x1 FGLRX_EnableDisplays returned 0
ตรวจดูการใช้งานจอภาพอีกครั้งว่าใช้ได้หรือยัง ~$ aticonfig --query-monitor
Connected monitors: crt1, lvds Enabled monitors: crt1, lvd
Sound
How to setup the surround speakers (5.1 and others) with ALSA
- Read #General Notes
- Edit the ~/.asoundrc file, create it if it doesn't exist:
gedit ~/.asoundrc
- Enter the following section:
pcm.!default { type plug slave.pcm "surround51" slave.channels 6 route_policy duplicate }
- This will allow to play the surround output and duplicate the stereo output to all 6 channels (not only front ones).
How to change default soundcard
- Read #General Notes
- View available soundcards
sudo asoundconf list
- You should get something like this
Names of available sound cards: Live V8237
- Switch soundcard with 'example' being the name of the preferred soundcard
sudo asoundconf set-default-card example
Misc
How to list PCI devices
- Read #General Notes
lspci
How to install a Wacom tablet
For a detailed guide with screenshots about how to configure the "Extended input devices" in your graphic applications, please follow the official Dapper guide at https://wiki.ubuntu.com//Wacom
With the version of the Linux Wacom driver (0.7.2) in Ubuntu 6.06 Dapper Drake, if you unplug you tablet, it won't function when you plug it back in and you will have to restart X. For this reason, it is best to leave the tablet plugged in. This limitation will be removed when the 0.7.4 version of the driver is included in Ubuntu.
- Read #General Notes
- 1. Using Synaptic package manager, check if the packages xserver-xorg-input-wacom and wacom-tools are already installed - if not, install them. If you prefer using the command line, you can also execute :
sudo apt-get install xserver-xorg-input-wacom wacom-tools
- 2. Save a copy of your /etc/X11/xorg.conf :
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
- then edit it with the command line :
gksudo gedit /etc/X11/xorg.conf
- and change all /dev/wacom occurences into /dev/input/wacom (created by wacom-tools udev scripts), then save the file.
- You should be ready to go after you have restarted X. Remember to configure the "Extended input devices" in your graphic applications (Gimp, Inkscape), however you can already check if it's working by moving your stylus on the tablet : the mouse cursor should go through the whole screen.
การจัดการกับ CD/DVD
วิธีการ format แผ่น CD-RW/DVD-RW
- อ่าน #อ่านก่อนใช้งาน
- ต.ย. สมมติว่า /dev/cdrom เป็นที่ที่อ้างถึงไดร์ฟ CD/DVD-ROM
sudo umount /dev/cdrom cdrecord dev=/dev/cdrom blank=fast
วิธี เขียน files/folders ใส่แผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
Places -> CD/DVD Creator
- แดรก files/folders ไปใส่ใน window
File Menu -> Write to Disc... -> Write
วิธีเขียนไฟล์อิมเมจ (ISO) ใส่แผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
คลิกเม้าส์ปุ่มขวาบนไฟล์อิมเมจ (ISO) -> Write to Disc... -> Write
วิธีทำสำเนาแผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
- อ่าน #วิธีสร้างไฟล์อิมเมจ (ISO) จากแผ่น CD/DVD
- อ่าน #วิธีสร้างเขียนไฟล์อิมเมจ (ISO) ไปเป็นแผ่น CD/DVD
วิธีสร้างไฟล์อิมเมจ (ISO) จากแผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
- ต.ย. สมมติว่า /dev/cdrom เป็นที่ที่อ้างถึงไดร์ฟ CD/DVD-ROM
sudo umount /dev/cdrom dd if=/dev/cdrom of=file.iso bs=1024
วิธีสร้างไฟล์อิมเมจ (ISO) จากโฟลเดอร์
- อ่าน #อ่านก่อนใช้งาน
mkisofs -r -o file.iso /path ของโฟลด์เดอร์ที่ต้องการจะทำเป็นอิมเมจ/
วิธีสร้างไฟล์ MD5 checksum
- อ่าน #อ่านก่อนใช้งาน
md5sum file.iso > file.iso.md5
วิธีตรวจสอบ MD5 checksum ของไฟล์
- อ่าน #อ่านก่อนใช้งาน
- ต.ย. สมมติให้ไฟล์ file.iso และไฟล์ file.iso.md5 นั้นอยู่ในโฟลเดอร์เดียวกัน
md5sum -c file.iso.md5
วิธี mount/unmount ไฟล์อิมเมจ (ISO) โดยไม่ต้องเขียนใส่แผ่น
- อ่าน #อ่านก่อนใช้งาน
- การ mount(เม้าท์) ไฟล์อิมเมจ(ISO)
sudo mkdir /media/iso sudo modprobe loop sudo mount file.iso /media/iso/ -t iso9660 -o loop
- การ unmount(อันเม้าท์) ไฟล์อิมเมจ (ISO)
sudo umount /media/iso/
วิธี กำหนด/เปลี่ยน ความเร็วในการเขียนแผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
- Applications -> System Tools -> Configuration Editor
- Configuration Editor
/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed)
วิธีเปิดใช้งาน Burnproof ของไดร์ฟที่เขียนแผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
- Applications -> System Tools -> Configuration Editor
- Configuration Editor
/ -> apps -> nautilus-cd-burner -> burnproof (Checked)
วิธีเปิดการใช้งานโอเวอร์เบิร์น(Overburn) สำหรับไดร์ฟที่เขียนแผ่น CD/DVD
- อ่าน #อ่านก่อนใช้งาน
- Applications -> System Tools -> Configuration Editor
- Configuration Editor
/ -> apps -> nautilus-cd-burner -> overburn (Checked)
Networking
- Complete Ubuntu Networking Tutorial This is Step By Step Ubuntu Networking Guide for Beginners and Advanced Users
การตั้งค่า Google Talk
- สามารถเข้าไปดูได้ที่ Google Talk Help Center
วิธีการ เปิด/ปิด การเชื่อมต่อเข้าสู่เครือข่าย
- อ่าน #General Notes
- System -> Administration -> Networking
- Network settings
Connections Tab -> Select "Ethernet connection" -> Activate/Deactivate
How to configure network connections
- Read #General Notes
- System -> Administration -> Networking
- Network settings
Connections Tab -> Select "Ethernet connection" -> Properties Connection -> Enable this connection (Checked) Connection Settings -> Configuration: Select "DHCP/Static IP address"
DNS Tab -> DNS Servers -> Add/Delete
How to configure dialup connections
- Read #General Notes
- To configure dialup
sudo pppconfig
- To connect dialup
sudo pon provider_name
- To disconnect dialup
sudo poff
How to configure broadband connections
- Read #General Notes
sudo pppoeconf
How to change computer name
- Read #General Notes
- System -> Administration -> Networking
- Network settings
General Tab -> Host Settings -> Hostname: Specify the computer name
- Save and close all opened applications, Reboot computer
How to change computer descriptions
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... server string = %h server (Samba, Ubuntu) ...
- Replace with the following line
server string = new_computer_descriptions
- Save the edited file
sudo testparm sudo /etc/init.d/samba restart
How to change computer Domain/Workgroup
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup sudo gedit /etc/samba/smb.conf
- Find this line
... workgroup = MSHOME ...
- Replace with the following line
workgroup = new_domain_or_workgroup
- Save the edited file
sudo testparm sudo /etc/init.d/samba restart
How to assign Hostname to local machine with dynamic IP using free DynDNS service
- Read #General Notes
- Read #How to add extra repositories
- Register free Dynamic DNS at http://www.dyndns.com/services/dns/dyndns
sudo apt-get install ipcheck gksudo gedit /etc/ppp/ip-up.d/dyndns_update
- Insert the following lines into the new file
#!/bin/sh USERNAME=myusername PASSWORD=mypassword HOSTNAME=myhostname.dyndns.org cd /root/ if [ -f /root/ipcheck.dat ]; then ipcheck -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME else ipcheck --makedat -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME fi
- Save the edited file
sudo chmod 700 /etc/ppp/ip-up.d/dyndns_update sudo sh /etc/ppp/ip-up.d/dyndns_update
How to share folders the easy way
Right click on folder -> Share folder
Shared folder -> Share with: Select "SMB" Share properties -> Name: Specify the share name
How to browse network computers
- Read #General Notes
- e.g. Assumed that network connections have been configured properly
- If computers or network folders could not be found, try access them directly
- Read #How to access network folders without mounting
- Places -> Network Servers
How to access network folders without mounting
- Read #General Notes
- e.g. Assumed that network connections have been configured properly
- Network computer's IP: 192.168.0.1
- Shared folder's name: linux
- Press 'Alt+F2' (Run Application...) and enter:
smb://192.168.0.1/linux
How to mount/unmount network folders manually, and allow all users to read
- e.g. Assumed that network connections have been configured properly
- Network computer's IP: 192.168.0.1
- Network computer's Username: myusername
- Network computer's Password: mypassword
- Shared folder's name: linux
- Local mount folder: /media/sharename
- To mount network folder
sudo mkdir /media/sharename sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword
- To unmount network folder
sudo umount /media/sharename/
How to mount/unmount network folders manually, and allow all users to read/write
- e.g. Assumed that network connections have been configured properly
- Network computer's IP: 192.168.0.1
- Network computer's Username: myusername
- Network computer's Password: mypassword
- Shared folder's name: linux
- Local mount folder: /media/sharename
- To mount network folder
sudo mkdir /media/sharename sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
- To unmount network folder
sudo umount /media/sharename/
How to mount network folders on boot-up, and allow all users to read
- e.g. Assumed that network connections have been configured properly
- Network computer's IP: 192.168.0.1
- Network computer's Username: myusername
- Network computer's Password: mypassword
- Shared folder's name: linux
- Local mount folder: /media/sharename
sudo mkdir /media/sharename gksudo gedit /root/.smbcredentials
- Insert the following lines into the new file
username=myusername password=mypassword
- Save the edited file
sudo chmod 700 /root/.smbcredentials sudo cp /etc/fstab /etc/fstab_backup gksudo gedit /etc/fstab
- Append the following line at the end of file
//192.168.0.1/linux /media/sharename smbfs credentials=/root/.smbcredentials 0 0
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
How to mount network folders on boot-up, and allow all users to read/write
- e.g. Assumed that network connections have been configured properly
- Network computer's IP: 192.168.0.1
- Network computer's Username: myusername
- Network computer's Password: mypassword
- Shared folder's name: linux
- Local mount folder: /media/sharename
sudo mkdir /media/sharename gksudo gedit /root/.smbcredentials
- Insert the following lines into the new file
username=myusername password=mypassword
- Save the edited file
sudo chmod 700 /root/.smbcredentials sudo cp /etc/fstab /etc/fstab_backup gksudo gedit /etc/fstab
- Append the following line at the end of file
//192.168.0.1/linux /media/sharename smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
How to get ipw2200 and wpa to work
- See Ubuntuforums.org how-tos
How to get ipw3945 and wep/wpa to work
- Read #General Notes
- Read #How to add extra repositories
- Edgy already has all the drivers built in, except for the ipw3945 regulatory daemon. There are two ways to get it:
- Install it manually from source:
- See the daemon source and the Intel ipw3945 project page.
OR
- Install the daemon using apt (recommended for new users):
sudo apt-get install linux-restricted-modules-generic
- reboot your system and you should have wireless internet/network.
- For easy network connection, read #How to Configure Ubuntu/Kubuntu with WPA using Network-Manager.
How to Configure and start PPTP tunnels (VPN)
- Read #General Notes
- Use these instructions to automatically install PPTP Client
- OR
- Install manually
wget -c http://linux.edu.lv/uploads/content/pptp.tar.gz tar zxvf pptp.tar.gz cd ./pptp/ sudo sh ./pptp/install cd ..
- To configure PPTP Client
gksudo gedit /usr/share/applications/pptpconfig.desktop
- Replace content of this file with the following lines
[Desktop Entry] Name=PPTP Client Comment=Configure and start PPTP tunnels (VPN) Categories=Application;Network Encoding=UTF-8 Exec=gksudo pptpconfig Icon=gnome-remote-desktop.png StartupNotify=true Terminal=false Type=Application
- The above lines change the default file in three ways: the application is placed in the Application/Internet category, gksudo will make the application run as superuser and we put a nice icon that appears in the menu.
- Start the client with Applications -> Internet -> PPTP Client
EDIT You can use a different Method if you use NetworkManager
- Configure VPN with Network Manager
sudo apt-get install network-manager-pptp
You have to restart after install.
To setup a VPN Click the NetworkManager Icon in the tray VPN Connections->Configure VPN Use the defaults and be sure to check the box: Refuse EAP under the Authentication tab. To get my connection to work I also had to check Require MPPE Encryption under Compression & Encryption
- A Nice tutorial here
How to Configure Ubuntu/Kubuntu with WPA using Network-Manager
>> This section should probably be removed? Network manager w/ WPA support is standard in Feisty?
Ubuntu Dapper in typical cases can configure WPA to work out of the box with minimal hassle. You'll need to install network-manager.
For Ubuntu:
sudo apt-get install network-manager-gnome
For Kubuntu (will install knetworkmanager):
sudo apt-get install network-manager-kde
Logout/Reboot.
Ubuntu users should now see the NetworkManager Applet in the Gnome notification area. Kubuntu users will probably have to run knetworkmanager before they see NetworkManager in the systray.
If instead, you get a "The NetworkManager applet could not find some required resources. It cannot continue." message, then:
sudo gtk-update-icon-cache -f /usr/share/icons/hicolor
Once Network-Manager is installed, click on the NM icon in the notification area (default is at the top right of Ubuntu/Gnome). Choose your network, then enter your passphrase. Type a password for the keyring, and you're set.
If you don't see your network, click "Create New Wireless Network...", type your essid/networkname, then choose "WPA Personal" for wireless security.
- Note: If you installed Kubuntu then installed ubuntu-desktop & network-manager-gnome, you may not be able to use network-manager in Gnome, if at all. In this case, you may have to use WPA Supplicant and do some manual editing of conf files to get WPA up and running.
- Note: When you first log into Gnome/KDE, the keyring application will ask for a password. Future revisions of Network-Manager should resolve this.
How to setup a GPG key with Seahorse and Evolution
- Read #General Notes
- Install seahorse
apt-get install seahorse
- Applications > Accessories > Passwords and Encryption Keys
- Key > Create New Key
- Select "PGP Key", then fill out information. Ensure that you use your real email address.
- Wait for key to finish generating.
- You may now right-click on the key entry to export, sync or publish your key.
- Evolution should now hopefully see the key transparently.
Remote Access
Remote Login via XDMCP
What is XDMCP?
GNOME windows can support several different users simultaniously. Unlike vncviewer that just duplicates the current screen on a remote system, XDMCP allows several different users to login and run different GNOME sessions at the same time. So if you have a fast computer runing Ubuntu, several users can use their slow machines to login and run heavy applications only available on the fast machine.
How to turn on the XDMCP feature
To turn on the XDMCP feature on the fast computer, click the menu
System -> Administration -> Login Window
In the Login Window Preferences dialog window, select
Remote Tab -> Style: Same as Local -> Close the dialog window -> Restart the PC
How to login from another PC running Ubuntu
1. Reboot the slow PC and stop at the login screen 2. Click Options at the lower left corner of the login screen 3. Select "Remote Login via XDMCP" 4. On the dialog window, type in the host name or ip of the fast computer you want to login to
Remote Desktop Sharing/Duplication via VNC
How to configure remote desktop (not secure)
- Read #General Notes
- Warning! Remote Desktop will only work if there's a GNOME login session
- Leaving computer with an unattended GNOME login session is not secure
- Use (System -> Lock Screen) and switch off the monitor when computer is left unattended
- System -> Preferences -> Remote Desktop
- Remote Desktop Preferences
Sharing -> Allow other users to view your desktop (Checked) Allow other users to control your desktop (Checked)
Security -> Ask you for confirmation (Un-Checked) Require the user to enter this password: (Checked) Password: Specify the password
How to connect into remote Ubuntu desktop
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
- Read #How to configure remote desktop (not secure)
- Remote Ubuntu machine: 192.168.0.1
vncviewer -fullscreen 192.168.0.1:0
- To quit vncviewer
Press 'F8' -> Quit viewer
How to connect into remote Ubuntu desktop via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
- Read #How to configure remote desktop (not secure)
- Remote Ubuntu machine: 192.168.0.1
- If you have a router remember to open the appropiate port. The default one is 5900
- This process is called port forwarding port forwarding
- Download DotNetVNC: Here or RealVNC Here
- this is a free DotNet version that require the DotNet framework available from microsoft here
- The RealVNC website was created and maintained by the original developers of VNC during their time at AT&T. RealVNC comes in Free, Personal, and Enterprise editions - the latter two costing money.
- Open the VNC client you have chosen, and insert the connection string formatted like this <LINUX BOX IP><:DESKTOP NUMBER>|<::PORT>
- In example use: 192.168.1.2:0 or 192.168.1.2::5900 to connect to desktop 0, to connect to desktop 1 use 192.168.1.2:1 or 192.168.1.2::5901 and so on
How to connect into remote Ubuntu desktop via OSX
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
- Read #How to configure remote desktop (not secure)
- Remote Ubuntu machine: 192.168.0.1
- If you have a router remember to open the appropiate port the default one is 5900
- This process is called port forwarding port forwarding
- Download ChickenOfTheVNC: Here
- Open ChickenOfTheVNC, and insert the host (IP address of remote machine), the display number (0 is default and is port 5900) and the password.
- In example use: Host: 192.168.0.1, Display 0, Password: password
Windows
How to mount/unmount Windows partitions (NTFS) manually, and allow all users to read only
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
- Local mount folder: /media/windows
- To mount Windows partition
sudo mkdir /media/windows sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222
- To unmount Windows partition
sudo umount /media/windows/
How to mount/unmount Windows partitions (FAT) manually, and allow all users to read/write
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
- Local mount folder: /media/windows
- To mount Windows partition
sudo mkdir /media/windows sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000
- To unmount Windows partition
sudo umount /media/windows/
How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
- Local mount folder: /media/windows
sudo mkdir /media/windows sudo cp /etc/fstab /etc/fstab_backup gksudo gedit /etc/fstab
- Append the following line at the end of file
/dev/hda1 /media/windows ntfs nls=utf8,umask=0222 0 0
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
- Local mount folder: /media/windows
sudo mkdir /media/windows sudo cp /etc/fstab /etc/fstab_backup gksudo gedit /etc/fstab
- Append the following line at the end of file
/dev/hda1 /media/windows vfat iocharset=utf8,umask=000 0 0
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
How to mount Windows partitions (NTFS) on boot-up, and allow users read and write access
Warning: The software you will use is still in Beta. You should not enable it on production machines
- Read #General Notes
- Enable universe. Read #How to apt-get the easy way (Synaptic)
- Applications -> Add/Remove -> search for 'NTFS', you should find NTFS Configuration Tool, install it.
- Applications -> System Tools -> NTFS Configuration Tool -> Enable Write Support (depending on your device internal/external)
- Further troubleshooting is listed at this comprehensive howto thread.
Security
What are the basic things I need to know about securing my Ubuntu
- Read #General Notes
- Ensure hard drive is first in BIOS boot-up sequence
- To prevent trespassers from using Linux Installation CD which allows them to gain root user access
- To prevent trespassers from using Linux Live CD (e.g. UBUNTU/KNOPPIX/MEPIS) which allows them to destroy/browse/share the entire hard drive
- To prevent trespassers from installing another Operating System
- Ensure a password is set for BIOS
- To prevent trespassers from changing the BIOS boot-up sequence
- Ensure computer is located at a secured place
- To prevent trespassers from removing computer's hard drive which allows them to destroy/browse/share the entire hard drive from a different computer
- To prevent trespassers from removing computer's on-board battery which resets the BIOS password
- Ensure passwords used on the system cannot be easily guessed
- To prevent trespassers from cracking password file using brute force attacks (e.g. John the Ripper)
- Create password with minimum length of 8 characters
- Create password with mixture of characters/numbers, and upper/lower case
- Not create a password with just a single or just a typical union of main languages (english, german, french, spanish...) dictionary words
- Ensure interactive editing control for GRUB menu is disabled
- To prevent trespassers from modifying kernel boot-up arguments which allows them to have root user access
- Read #How to disable all interactive editing control for GRUB menu
- Ensure history listing is disabled in Console mode
- To prevent trespassers from seeing previously issued commands
- Read #How to disable history listing in Console mode
- Ensure Ctrl+Alt+Del is disabled in Console mode
- To prevent trespassers from restarting the system without permission in Console mode
- Read [[#How to disable Ctrl+Alt+Del from restarting computer in Console mode]]
- Ensure interactive option is set for remove, copy and move of files/folders in Console mode
- To prevent accidental removal/overwritten of files/folders
- Read #How to enable prompt before removal/overwritten of files/folders in Console mode
- For day to day usage, login as a normal user
- To prevent accidental deletion/modification of system files/folders
- Read #How to add/edit/delete system users
- Disable root user account, use "sudo" instead
- To reduce the amount of time spent with root privileges, and thus the risk of inadvertently executing a command as root
- "sudo" provides a more useful audit trail (/var/log/auth.log)
- Read #How to disable root user account
- Install a Firewall
- A firewall does not guarantee security but it is in most environments the first line of defense against network based attacks
- Read #How to install Firewall (Firestarter)
- Perform vulnerability test
- Nessus is a great tool designed to automate the testing and discovery of known security problems
- Read #How to install Vulnerability Scanner (Nessus)
How to disable all interactive editing control for GRUB menu
- Read #General Notes
- Run This:
grub-md5-crypt
Password: Retype password: $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/
- Backup your current configuration file
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this section
... ## password ['--md5'] passwd # If used in the first section of a menu file, disable all interactive editing # control (menu entry editor and command-line) and entries protected by the # command 'lock' # e.g. password topsecret # password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/ # password topsecret ...
- Add the following line below it
password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/ (encrypted password above)
- Find the section(s) that look like this (note the 'recovery mode' and the word 'single'):
... title Ubuntu, kernel 2.6.10-5-386 (recovery mode) root (hd0,1) kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single initrd /boot/initrd.img-2.6.10-5-386 savedefault boot ...
- Add lock between the title and root lines:
... title Ubuntu, kernel 2.6.10-5-386 (recovery mode) lock root (hd0,1) ...
- Save the edited file
This will make it so your grub console will require a password to edit the lines, and the recovery modes won't work unless the password is typed. To access the other grub options at the menu, follow the instructions at the bottom of the screen. It will be something like pressing p and typing your password.
How to disable history listing in Console mode
- Read #General Notes
- From Gentoo Wiki:
rm -f .bash_history gedit ~/.bash_profile
- Add the following:
export HISTFILESIZE=4 unset HISTFILE=5 # Change this to a reasonable number of lines to save, I like to save only 100. export HISTSIZE=1 # Ignores duplicate lines next to each other export HISTCONTROL=ignoredups
This will disable Bash history for the user, retaining keystroke history and recall to use while limiting recall history to 100 lines. This will also not record duplicate lines next to each other.
How to disable Ctrl+Alt+Del from restarting computer in Console mode
- Read #General Notes
sudo cp /etc/inittab /etc/inittab_backup gksudo gedit /etc/inittab
- Find this line
... ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now ...
- Replace with the following line
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
- Save the edited file
sudo telinit q
How to enable prompt before removal/overwritten of files/folders in Console mode
- Read #General Notes
sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup gksudo gedit /etc/bash.bashrc
- Append the following lines at the end of file
alias rm='rm -i' alias cp='cp -i' alias mv='mv -i'
- Save the edited file
How to setup a LoJack system for your laptop
- Read #General Notes
- Read #How to add extra repositories
- Read #How to assign Hostname to local machine with dynamic IP using free DynDNS service
What: Quote from Wikipedia: "LoJack is an aftermarket vehicle tracking system that allows cars to be tracked by police after being stolen. The manufacturer claims a 90% recovery rate. The name "LoJack" is a play on the word "hijack," meaning the theft of a vehicle through force."
Why: If your laptop is ever stolen and connected to the Internet. You will be able to find out from what IP it connects to the Internet from and contact the authorities.
How:
- Get a free dynamic IP account from one of the many providers. Here we will use DynDNS.
- Install ddclient. In the section #How to assign Hostname to local machine with dynamic IP using free DynDNS service we installed the package ipcheck, here we prefer to use ddclient because it can get the IP from an external source on the Internet instead of getting it from a network adapter.
sudo apt-get install ddclient
- Edit the configuration file /etc/ddclient.conf using you fevorite text editor (emacs, gedit, kedit or even vi)
sudo emacs /etc/ddclient.conf
- Make it look like this:
# Configuration file for ddclient generated by debconf # # /etc/ddclient.conf pid=/var/run/ddclient.pid protocol=dyndns2 use=web server=members.dyndns.org login=YourNameHere password='YourPasswordHere' YourHostNameHere.gotmyip.com
- NOTE:
- * Make sure that you use the web IP detection method.
- * Specify your own user id instead of the place holder YourNameHere.
- * Specify your own password instead of the place holder YourPasswordHere, make sure to surround it with single quotes.
- * The last line should specify the hostname you registered with the dynamic IP service.
- You can now start the ddclient daemon, or wait until your next reboot.
sudo /etc/init.d/ddclient start
- The hostname you registered with your dynamic IP service should be updated. You can test it with the ping command:
ping YourHostNameHere.gotmyip.com
- Even if your laptop has a firewall that prevents pings the hostname should resolve to the IP of the network gateway that your laptop is connected to.
- Now all that is left is for someone to steal your laptop.....
References:
- http://ddclient.sourceforge.net/index.php
เมนูบู๊ต
จะใช้สิทธิ root โดยไม่เข้าระบบอย่างไร
- อ่านก่อนใช้งาน
- วิธีง่ายที่สุด (จะใช้ไม่ได้หากตั้งรหัสผ่านเมนู GRUB ไว้)
- บู๊ตเครื่องคอมพิวเตอร์
- หากไม่ขึ้นเมนู GRUB ให้กด 'Esc' เพื่อเข้าเมนู
- เลื่อนตัวเลือกไปที่
Ubuntu, kernel 2.6.10-5-386 (recovery mode)
- กด 'Enter' เพื่อเข้าใช้งาน
- วิธีอื่น
วิธีแก้ไขอาร์กิวเมนต์การบู๊ตของเคอเนลเพื่อเข้าใช้สิทธิของรูท
- อ่านก่อนใช้งาน
- บู๊ตเครื่องคอมพิวเตอร์
- หากเมนู GRUB ซ่อนไว้ ให้กด 'Esc' เพื่อเข้าเมนู GRUB
- หากใส่รหัสเมนู GRUB ไว้ กด 'p' เพื่อปลดล็อคเมนู GRUB
- เลือก
Ubuntu, kernel 2.6.10-5-386
- กด 'e' เพื่อแก้ไขคำสั่งก่อนบู๊ต
- เลือก
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
- กด 'e' เพื่อแก้ไขคำสั่งที่เลือกไว้ในลำดับการบู๊ต
- เพิ่ม "rw init=/bin/bash" ต่อท้ายอาร์กิวเมนต์ จะได้ประมาณ
grub edit> kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash
- กด 'b' เพื่อบู๊ต
How to use Ubuntu Installation CD, to gain root user access
- Read #General Notes
- Boot-up computer into Ubuntu Installation CD
- At "boot:" prompt, add "rescue" to the argument
boot: rescue
- Follow the instructions on screen
How to change root user/main user password if forgotten
- Read #General Notes
- Read #How to gain root user access without login
- To change root user password
# passwd root
- To change main user password
# passwd system_main_username
How to change GRUB menu password if forgotten
- Read #General Notes
grub
grub> md5crypt Password: ****** (ubuntu) Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password) grub> quit
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this line
... password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/ ...
- Replace with the following line
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
- Save the edited file
How to restore GRUB menu after Windows installation
Super Grub Disk
- Use Super Grub Disk
- More info on how to use it here
Grub
If you have booted your linux distro with Super Grub Disk, or a live CD and want to restore your grub, follow the below instructions:
- As root (or with sudo), type
grub
- When at the grub prompt, type
find /boot/grub/stage2
- This will return something like
(hd0,2)
- To setup the boot partition boot type
root (hd0,2)
. This is the harddrive and the partition your linux is installed on... - And then to configure grub type
setup (hd0)
- Now you're done, so exit with
quit
How to identify the name of the boot drive (hd0, hd1, hd2, etc)
Press "c" on boot menu. If you don't see a boot menu, press ESC key first when booting to show the boot menu.
Type:
root (hd0,0)
Most likely you will get "(hd0,0) ext2fs", which should be your current Linux drive. Now change hd0 to hd1 to see what is there.
root (hd1,0)
If you get "(hd1,0) filesystem type unknown, partition type 0x7", then hd1 is a Windows drive.
Now change hd1 to hd2, keep going until you reach hd7.
How to add Windows entry into GRUB menu
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Append the following lines at the end of file
title Microsoft Windows root (hd0,0) savedefault makeactive chainloader +1
- Save the edited file
How to boot into Windows installed on a seperate SATA drive
This configuration applies to people who have Linux installed on a IDE drive, and Windows installed on a seperate SATA. The IDE drive boots first, so we need to add an entry to the boot menu on the Linux disk. Here we assume the name of your Windows drive is hd1. If you are not sure, click the link above to find out.
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Append the following lines at the end of file.
title Windows XP on SATA drive map (hd0) (hd1) map (hd1) (hd0) chainloader (hd1,0)+1
- Save the edited file
How to read Linux partitions (ext2, ext3) in Windows machine
- Read #General Notes
- Download Explore2fs: Here
- OR
- See www.fs-driver.org
How to enable lame for FFMPEG (needed to encode FLV with sound)
KINO FLVs silent? You need to recompile FFMPEG with LAME enabled. FFMPEG can be installed via apt-get as a package, but is not able encode MP3, which is the audio stream in FLV video (like Google & YouTube).
- Read #How to add extra repositories
- Ensure Ubuntu Universe repository is not preceded by # in /etc/apt/sources.list
- Download and install lame liblame-dev and gcc packages (mp3 encoder + GNU compiler collection)
sudo apt-get build-dep ffmpeg sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 \ liba52-0.7.4-dev libx264-dev checkinstall build-essential gcc
- Download and extract FFMPEG source to current working directory
sudo apt-get source ffmpeg
- Compile FFMPEG from source
cd ffmpeg-* sudo ./configure --enable-gpl --enable-pp --enable-vorbis --enable-libogg \ --enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug \ --enable-mp3lame --enable-faad --enable-faac --enable-xvid --enable-pthreads \ --enable-x264 maybe try instead = sudo ./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg \ --enable-liba52 --enable-libdts --enable-dc1394 --enable-libgsm --disable-debug \ --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-xvid --enable-pthreads \ --enable-x264 sudo make sudo checkinstall [accept defaults, set version to 3:0.cvs20060823-3.1ubuntu2]
If an application you are using employs FFMPEG to encode FLV, it should now work properly. You can also call FFMPEG directly from the command line. The extension/suffix of the outfile tells FFMPEG which audio or video format to encode to.
ffmpeg [-i infile] [outfile]
How to enable smooth fonts
gedit ~/.fonts.conf
- Paste in this text:
<?xml version=”1.0” ?> <!DOCTYPE fontconfig SYSTEM “fonts.dtd”> <fontconfig> <match target=”font”> <edit name=”autohint” mode=”assign”> <bool>true</bool> </edit> </match> </fontconfig>
- You’ll have to log out and back in to see the difference.
How to restart GNOME without rebooting computer
- Save and close all opened applications
Press 'Ctrl + Alt + Backspace'
- or
sudo /etc/init.d/gdm restart
- or
If these tips did not help read #System requests (What to do if your system is unresponsive)
How to turn on Num Lock on GNOME startup
sudo aptitude install numlockx sudo cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/Default_backup gksudo gedit /etc/X11/gdm/Init/Default
- Find this line
... exit 0
- Add the following lines above it
if [ -x /usr/bin/numlockx ]; then /usr/bin/numlockx on fi
- Save the edited file
- Read #How to restart GNOME without rebooting computer
How to remap the Caps Lock key as another Control key
gksudo gedit /etc/console-tools/remap
In the Console
- Change
#s/keycode 58 = Caps_Lock/keycode 58 = Control/;
to
s/keycode 58 = Caps_Lock/keycode 58 = Control/;
- Save your work
sudo /etc/init.d/console-screen.sh
- Try using it
In X Windows
gksudo gedit ~/.Xmodmap
- Add this:
keycode 66 = Control_L clear Lock add Control = Control_L
- Now, apply the changes.
xmodmap ~/.Xmodmap
- To apply them on startup
- If ~/.xinitrc does not exist,
cp /etc/X11/xinit/xinitrc ~/.xinitrc
- In all cases
gedit ~/.xinitrc
- Make the first line this:
xmodmap ~/.Xmodmap
- Restart X (Ctrl - Alt - Backspace)
- Log In, a dialog should pop up, add .Xmodmap to the left side with the add button, and Save.
How to run programs on startup when login into GNOME
- System -> Preferences -> Sessions
- Sessions
Startup Programs Tab -> Add/Edit/Delete
How to speed-up your Ubuntu box
- Read the following post: http://ubuntuforums.org/showthread.php?t=189192
How to switch to Console mode in GNOME
- To switch to Console mode
Press 'Ctrl + Alt + F1' (F2 - F6)
- To switch between consoles in Console mode
Press 'Alt + F1' (F2 - F6)
- To switch back to GNOME mode
Press 'Alt + F7'
How to disable Ctrl+Alt+Backspace from restarting X in GNOME and KDE 3.5.x
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup gksudo gedit /etc/X11/xorg.conf
- Append the following lines at the end of file
Section "ServerFlags" Option "DontZap" "yes" EndSection
- Save the edited file
- Read #How to restart GNOME without rebooting computer
How to enable Ctrl+Alt+Del to open System Monitor in GNOME
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "<Control><Alt>Delete" gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"
How to refresh GNOME desktop
killall nautilus
How to refresh GNOME panel
killall gnome-panel
How to enable autosave in Gedit and disable creation of some_file~ files
- Applications -> System Tools -> Configuration Editor
- Configuration Editor
/ -> apps -> gedit-2 -> preferences -> editor -> save -> create_backup_copy (Unchecked) / -> apps -> gedit-2 -> preferences -> editor -> save -> auto_save (Checked)
How to show all hidden files/folders in Nautilus
- Places -> Home Folder
- To temporary show all hidden files/folders in Nautilus
Press 'Ctrl + H'
- To permanently show all hidden files/folders in Nautilus
Edit Menu -> Preferences
Views Tab -> Default View -> Show hidden and backup files (Checked)
How to browse files/folders as root user in Nautilus
- To install File Browser (Root)
gksudo gedit /usr/share/applications/Nautilus-root.desktop
- Insert the following lines into the new file
[Desktop Entry] Name=File Browser (Root) Comment=Browse the filesystem with the file manager Exec=gksudo "nautilus --browser %U" Icon=file-manager Terminal=false Type=Application Categories=Application;System;
- Save the edited file
- Read #How to refresh GNOME panel
- To browse files/folders as root user in Nautilus
- Applications -> System Tools -> File Browser (Root)
How to install a "View in Terminal" Menu for Nautilus
sudo aptitude install nautilus-open-terminal
- Nautilus -> Right-click on folder or background -> Open in Terminal
How to change default file type "Open with" program
Right click on file -> Properties
Open With Tab -> Add Select "Open with" program
Select "Open with" program (Checked)
How to change preferred email client to Mozilla Thunderbird
- Read #How to install Email Client (Mozilla Thunderbird)
- System -> Preferences -> Preferred Applications
- Preferred Applications
Mail Reader Tab -> Default Mail Reader -> Command: mozilla-thunderbird %s
How to open files as root user via right click
gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root
- Insert the following lines into the new file
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do gksudo "gnome-open $uri" & done
- Save the edited file
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Right click on file -> Scripts -> Open as root
How to disable beep sound in Terminal mode
Not for Dapper---- firingstone
- Applications -> Accessories -> Terminal
- Terminal
Edit Menu -> Current Profile...
General Tab -> General -> Terminal bell (Un-Checked)
How to handle mms protocol in Mozilla Firefox
- Open your firefox.
- Type as url: about:config
Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string". Then copy the following line into the appearing text field:
network.protocol-handler.app.mms
Into the next text field copy this:
/usr/bin/X11/vlc
Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:
network.protocol-handler.external.mms
Then set
true
How to handle rtsp (realmedia) protocol in Mozilla Firefox
- Open your firefox.
- Type as url: about:config
Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string". Then copy the following line into the appearing text field:
network.protocol-handler.app.rtsp
Into the next text field copy this:
/usr/bin/X11/realplay
Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:
network.protocol-handler.external.rtsp
Then set
true
How to load Web site faster in Mozilla Firefox
- Speed Up Firefox Web Browser Tips
- Applications -> Internet -> Firefox Web Browser
- Mozilla Firefox
Address Bar -> about:config
Filter: -> network.dns.disableIPv6 -> true network.http.pipelining -> true network.http.pipelining.maxrequests -> 8 network.http.proxy.pipelining -> true
- Restart Mozilla Firefox
How to disable beep sound for link find function in Mozilla Firefox
- Applications -> Internet -> Firefox Web Browser
- Mozilla Firefox
Address Bar -> about:config
Filter: -> accessibility.typeaheadfind.enablesound -> false
- Restart Mozilla Firefox
How to apt-get the easy way (Synaptic)
- Step By Step Synaptic Package Manager Tutorials with Screenshots
- System -> Administration -> Synaptic Package Manager
- To enable the extra Universe and Multiverse repositories
- Settings -> Repositories
- In the Installation Media tab, click Add. There are three separate repositories; Dapper Drake, Security Updates and Updates. Select each repository and check Officially supported, Restricted copyright, Community maintained (Universe) and Non-free (Multiverse). Ensure you click OK between each repository to save your changes
- You should now see those three repositories under Channels. Make sure Officially supported, Restricted copyright, Community maintained (Universe) and Non-free (Multiverse) appears under each repository
- To add backports and PLF (new versions of many applications. Unsupported. May contain illegal packages. Use at own risk.)
- Settings -> Repositories
- Click on Add and then Custom
- Paste the following four lines into the box and click Add Repository, one line at a time:
deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb http://medibuntu.sos-sts.com/repo/ edgy free deb http://medibuntu.sos-sts.com/repo/ edgy non-free deb-src http://medibuntu.sos-sts.com/repo/ edgy free deb-src http://medibuntu.sos-sts.com/repo/ edgy non-free
- To refresh the list of known packages (equivalent to apt-get update)
Edit Menu -> Reload Package Information
- To install all possible upgrades (equivalent to aptitude upgrade)
Edit Menu -> Mark All Upgrades... -> Default Upgrade Edit Menu -> Apply Marked Changes
- To search for a package (equivalent to aptitude search package_name)
Edit Menu -> Search... Specify the package name
- To install the selected package (equivalent to aptitude install package_name)
Select "package_name" Package Menu -> Mark for Installation Edit Menu -> Apply Marked Changes
- To remove installed package (equivalent to aptitude remove package_name)
Select "package_name" Package Menu -> Mark for Removal Edit Menu -> Apply Marked Changes
What packages do the extra repositories provide
- The PLF repository provides
- DVD playback support (libdvdcss2)
- Skype
- Sun Java SDK (Software Development Kit) and JRE (Java Runtime Environment)
- Opera Web browser
- RealPlayer 10
- Win32 binary multimedia codecs
How to install/uninstall .deb files
- To install .deb file
sudo dpkg -i package_file.deb
- To uninstall .deb file
sudo dpkg -r package_name
How to find out which version of a package I have installed
dpkg -l packagename
How to convert .rpm files to .deb files
sudo alien -d package_file.rpm
How to compile .deb files from source
- Read #How to add extra repositories
- There are various programs available to help automate the process of create .deb files from source. For more information, see the links at the end of this section. A basic well tested method is described here.
- Install the necessary software to build the source (build-essential may be all that is necessary, though there may be other dependencies) and checkinstall (which creates deb files).
sudo aptitude install checkinstall build-essential
- In the directory where you have extracted the source, after you have run ./configure and make you can create a .deb file and install it with either of the following commands. The second -D option creates a .deb file in the directory that you can share with others or install without needing the source.
sudo checkinstall
or
sudo checkinstall -D
- For more info go to CheckInstall home page and the Installing software on Ubuntu page. Autodeb uses a modified version of AutoApt to complete the entire process above including extraction from the .tar.gz file, however it is still in an early stage of development.
How to rename all files in directory at once
- To install "mvb" file name renamer
wget -c http://easylinux.info/uploads/mvb_1.6.tgz sudo tar zxvf mvb_1.6.tgz -C /usr/share/ sudo chown -R root:root /usr/share/mvb_1.6/ sudo ln -fs /usr/share/mvb_1.6/mvb /usr/bin/mvb
- To rename all files in directory at once
mvb NEW_NAME
How to manipulate all image files in directory at once
- To install bash batch image processing script
sudo aptitude install imagemagick wget -c http://easylinux.info/uploads/bbips.0.3.2.sh sudo cp bbips.0.3.2.sh /usr/bin/bbips sudo chmod 755 /usr/bin/bbips
- To manipulate all image files in directory at once
bbips
How to set System-wide Environment Variables
sudo cp -p /etc/profile /etc/profile_backup gksudo gedit /etc/profile
- Append the System-wide Environment Variables at the end of file
- Save the edited file
How to save "man" outputs into files
man command | col -b > file.txt
How to hide GRUB menu on boot-up
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this line
... #hiddenmenu ...
- Replace with the following line
hiddenmenu
- Save the edited file
How to change the timeout seconds for GRUB menu on boot-up
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this line
... timeout 3 ...
- Replace with the following line
timeout X_seconds
- Save the edited file
How to change default Operating System boot-up for GRUB menu
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this line
... default 0 ...
- Replace with the following line
default X_sequence
- Save the edited file
How to display Splash Image for GRUB menu on boot-up
- e.g. Assumed that hd0,1 is the location of Ubuntu boot partition
wget -c http://easylinux.info/uploads/ubuntu.xpm.gz chmod 644 ubuntu.xpm.gz sudo mkdir /boot/grub/images sudo cp ubuntu.xpm.gz /boot/grub/images/ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this section
# menu.lst - See: grub(8), info grub, update-grub(8) # grub-install(8), grub-floppy(8), # grub-md5-crypt, /usr/share/doc/grub # and /usr/share/doc/grub-doc/. ...
- Add the following line below it
splashimage (hd0,1)/boot/grub/images/ubuntu.xpm.gz
- NOTE: If you have seperate boot partition use this line: splashimage (hd0,1)/grub/images/ubuntu.xpm.gz
- Save the edited file
How to convert Wallpaper to Splash Image for GRUB menu
- e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image
- splashimage.xpm.gz is the Splash Image for GRUB menu
- ImageMagick is installed
convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm
- Read #How to display Splash Image for GRUB menu on boot-up (use splashimage.xpm.gz instead of ubuntu.xpm.gz)
How to display only one kernel on GRUB menu
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup-`date +%F` gksudo gedit /boot/grub/menu.lst
- Find this line
... # howmany=all ...
- Replace with the following line
# howmany=1
Where 1 means to keep the last kernel, 2 to keep the last 2 kernels, etc. Do not delete the # symbol. The menu will be updated once a new kernel will be updated by the system, not before.
- Save the edited file
How to force GDM to system beep when login screen ready
- This is useful on computers where headphones are usually plugged in, allowing them to utilize the speakers for this attention-getting task.
echo foo >> ~/foo.wav
- System -> Administration -> Login Window -> Accessibility
Now make sure the "Login Screen Ready" check mark is checked. Click on the folder icon and navigate to your home folder and select "foo.wav".
rm foo.wav
The drop down menu should now say "(None)"
How to temporary skip boot-up services
Press 'Ctrl + C'
Clean up Ubuntu GNU/Linux System
- Clean up Ubuntu GNU/Linux System - This is very Detailed step by step procedure how to Clean up Ubuntu GNU/Linux System with different tools.
How to permanently disable/enable boot-up services
How to clean /tmp/ folder contents on shutdown
sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup gksudo gedit /etc/init.d/sysklogd
- Find this section
... stop) log_begin_msg "Stopping system log daemon..." start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile log_end_msg $? ...
- Add the following line below it
rm -fr /tmp/* /tmp/.??*
- Save the edited file
How to scroll up and down to view previous outputs in Console mode
- To scroll up to view previously outputs
Press 'Shift + Page Up'
- To scroll down to view previously outputs
Press 'Shift + Page Down'
How to find out which version of Ubuntu I am using
cat /etc/issue
How to set up (automatic) background/wallpaper-changer application for GNOME
- To install the script into a different location than your home directory, replace "~" with your path
cd ~ wget http://members.chello.at/horst.jens/files/wallpaperchanger.py chmod +x wallpaperchanger.py ~/wallpaperchanger.py gedit ~/.wallpaperchanger/wallpaperchangerconfig.py
- Edit all the lines not beginning with an "#" according to your needs. Save the file and close gedit.
- To create an menu entry for wallpaperchanger:
Click the menuitems: Applications -> Accessoires -> Alacarte Menu Editor -> File -> New Entry: Name: wallpaperchanger command: ~/wallpaperchanger.py
- To change desktop background every time you reboot your computer:
Click the menuitems: System -> Preferences -> Session -> Startup Programs -> Add: ~/wallpaperchanger.py
How to set up automatic background change (KDE)
- Go to K-menu -> System Settings -> Desktop -> Background
- Choose Slide Show
- Press Setup...
- Press Add... to add pictures you wish to see as desktop background
- Set 'Change picture after' to desired picture rotation interval.
- Press 'OK'
How to add keyboard layouts for other languages
- Go to System -> Preferences -> Keyboard
- Choose Layouts
- Press Add... to add the secondary keyboard layout. It is simpler to have two layouts; the maximum is currently four for Xorg.
- Choose Layout Options
- Expand option Group Shift/Lock behaviour
- Choose the key combination that enables you to switch between keyboard layouts. The default is by pressing both Alt keys at the same time. A common alternative is to use Alt+Shift.
- Press Close.
See #How to add the Keyboard (Layout) Indicator applet to add the Keyboard Indicator applet.
How to add keyboard layouts toggle for other languages (Xfce)
- use *.lst files on /etc/X11/xkb/rules to select 2nd_laguage_code
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,2nd_laguage_code
- you can add it to a startup file, which will be set to be executed on startup, with the following lines (remember to 'chmod +x' the file):
#!/bin/tcsh setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,il
How to add the Keyboard (Layout) Indicator applet
- Right-click on empty space on the top panel so that you see the pop-up menu.
- Click Add to Panel...
- Choose Keyboard Indicator (it is under the Utilities section, at the end)
The Keyboard Indicator applet appears on the panel. The default language should be USA for U.S. English. You can either right-click on this applet for more options or see above on how to configure.
How to type extended characters
- Read #How to add keyboard layouts for other languages
- Read #How to add the Keyboard (Layout) Indicator applet
- Add the keyboard layout US English International (with dead keys)
- Make US English International (with dead keys) the default keyboard layout.
The key marked ['"] is now a dead key. When you press it, nothing happens. However if you press a consonant immediately afterwards, the consonant appears with an accent.
- ' + a = á
- ' + e = é
- and so on for i-í, o-ó, y-ý, c-ć, z-ź, n-ń, l-ĺ, u-ú, r-ŕ
- " + a = ä
- " + e = ë
- and so on for y-ÿ, u-ü, i-ï, o-ö
Similarly, ` and a consonant generates à, è, ù, ì, ò. Similarly, ~ and a consonant generates ã, ũ, ĩ, õ, ñ.
To type ' and ", press RightAlt+' and RightAlt+" respectively. To type ' and ", you may also press '+<space> and "+<space> respectively.
There are more characters available by keeping RightAlt pressed and typing a character. Therefore,
- RightAlt+q = ä
- RightAlt+w = å
- RightAlt+e = é
- RightAlt+r = ®
- RightAlt+t = þ
- RightAlt+y = ü
- RightAlt+u = ú
- RightAlt+i = í
- RightAlt+o = ó
- RightAlt+p = ö
- RightAlt+[ and ] for « and » respectively.
- RightAlt+a = á
- RightAlt+s = ß
- RightAlt+d = ð
- RightAlt+l = ø
- RightAlt+; = ¶
- RightAlt+: = °
- RightAlt+z = æ
- RightAlt+c = ©
- RightAlt+n = ñ
- RightAlt+m = µ
- RightAlt+, = ç
- RightAlt+/ = ¿
- RightAlt+1 = ¡
- RightAlt+2 = ²
- RightAlt+3 = ³
- RightAlt+4 = ¤
- RightAlt+5 = €
- RightAlt+6 = ¼
- RightAlt+7 = ½
- RightAlt+8 = ¾
- RightAlt+9 = ‘
- RightAlt+0 = ’
- RightAlt+- = ¥
- RightAlt+= = ×
- RightAlt+! = ¹
- RightAlt+@, then o = ő (and Ő).
- RightAlt+#, then a = ā (and Ā). Similarly for ēĒ, ūŪ, īĪ, ōŌ.
- RightAlt+$ = £
- RightAlt+% =
- RightAlt+^ =
- RightAlt+& =
- RightAlt+*, then a = ą (and Ą). Similarly for ęĘ, įĮ.
- RightAlt+(, then a = ă (and Ă)
- RightAlt+(, then g = ğ (and Ğ)
- RightAlt+), then a = å (and Å)
- RightAlt+_ =
- RightAlt++ = ÷
How to set the Compose key to type special characters
- Read #How to add keyboard layouts for other languages
- Read #How to add the Keyboard (Layout) Indicator applet
- Click System, Preferences, Keyboard.
- Under Layout Options, expand on Compose key position.
- Choose Right-Win key is compose, click Close.
Now you can type extended characters using the RightWin key (next to AltGr), according to this keyboard settings file. Specifically, the lines that start with GDK_Multi_key are those that we can use here. The Compose key is actually GDK_Multi_key.
Some examples,
- RightWin + C + = produces €
- RightWin + = + C produces €
- RightWin + C + O produces ©
- RightWin + O + C produces ©
- RightWin + a + ' produces á
- RightWin + a + " produces ä
- RightWin + a + ` produces à
- RightWin + a + ~ produces ã
- RightWin + a + * produces å
- RightWin + a + ^ produces â
- RightWin + a + > produces â
- RightWin + a + , produces ą
- RightWin + e + - produces ē
- RightWin + S + 1 produces ¹
- RightWin + S + 2 produces ²
- RightWin + S + 3 produces ³
How to install ubuntu-title font used in Ubuntu logo
sudo aptitude install ttf-ubuntu-title
Now you can use this font in your favorite applications
How to associate Adobe Reader with files in Nautilus
- Read #How to install PDF Reader (Adobe Reader) with Plug-in for Mozilla Firefox
- Open Nautilus (Places -> Desktop)
- Browse to a .pdf file
- Right-click the .pdf file, select Properties, go to the Open With tab, choose Adobe Reader.
Now when you double-click on a .pdf file, it will be opened with Adobe Reader.
How to print from Adobe Reader
- Read #How to install PDF Reader (Adobe Reader) with Plug-in for Mozilla Firefox
- Read #How to add a printer
- Applications -> Office -> Adobe Reader
- File -> Print
- In the Print Command box, append -d printername. For example, if your printer was named FS-1010, the Print Command would read:
/usr/bin/lp -d FS-1010
How to pull apart and combine pdf files
sudo aptitude install pdftk cd mkdir bin cd bin gedit pdftk_burst
- add the following text to pdftk_burst:
#!/bin/bash cd ${1%/*} /usr/bin/pdftk "$1" burst rm doc_data.txt
- save and close pdftk_burst
gedit pdftk_cat
- add the following text to pdftk_cat:
#!/bin/bash cd ${1%/*} outfile="00out.pdf" if [ -f $outfile ] ; then rm -f $outfile fi /usr/bin/pdftk *.pdf cat output $outfile
- save and close pdftk_cat
chmod u+x pdftk_burst pdftk_cat
- open Nautilus (Places -> Desktop) and browse to a .pdf file
- right-click the .pdf file, select Properties, go to the Open With tab, click Add, click Use a Custom Command, click Browse, browse to pdftk_burst. Do the same with pdftk_cat.
Now, when you right-click on a .pdf file, you'll get two extra options:
- Open With -> pdftk_burst which will convert a 30 page pdf file to 30 x 1 page pdf files
- Open With -> pdftk_cat which will join together all the pdf files in the same directory, and create a file called 00out.pdf
Note: this won't work with pdfs with any type of protection - read man pdftk for more command line options.
How to remove jedit when Synaptic package manager fails after install
sudo dpkg --remove --force-depends --force-remove-reinstreq jedit
Now, you can use your Synaptic package manager again.
วิธีแปลแก่นของระบบปฏิบัติการในแบบฉบับอูบุนตูแท้ ๆ (How to compile a kernel the Ubuntu Way) ให้อ่านลิงค์ข้างล่างนี้ครับ
http://www.howtoforge.com/kernel_compilation_ubuntu
System requests (What to do if your system is unresponsive)
You can "talk" to the kernel directly via system requests: Press "ALT" + "sysreq-key" + "one of the keys" listed below (The sysreq-key is also known as the 'print screen' key):
(Taken from /usr/src/linux/Documentation/sysrq.txt)
- 'r' - Turns off keyboard raw mode and sets it to XLATE.
- 'k' - Secure Access Key (SAK) Kills all programs on the current virtual console.
- 'b' - Will immediately reboot the system without syncing or unmounting your disks.
- 'c' - Will perform a kexec reboot in order to take a crashdump.
- 'o' - Will shut your system off (if configured and supported).
- 's' - Will attempt to sync all mounted filesystems.
- 'u' - Will attempt to remount all mounted filesystems read-only.
- 'p' - Will dump the current registers and flags to your console.
- 't' - Will dump a list of current tasks and their information to your console.
- 'm' - Will dump current memory info to your console.
- 'v' - Dumps Voyager SMP processor info to your console.
- '0'-'9' - Sets the console log level, controlling which kernel messages will be printed to your console. ('0', for example would make it so that only emergency messages like PANICs or OOPSes would make it to your console.)
- 'f' - Will call oom_kill to kill a memory hog process
- 'e' - Send a SIGTERM to all processes, except for init.
- 'i' - Send a SIGKILL to all processes, except for init.
- 'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system will be non-functional after this.)
- 'h' - Will display help ( actually any other key than those listed above will display help. but 'h' is easy to remember :-)
Note that you may have to enable system requests. Read "/usr/src/linux/Documentation/sysrq.txt" for details. By default it is enabled though.
How to add locales to Ubuntu the command line way
- Open up a terminal
- Generate a /var/lib/locales/supported.d/local from /usr/share/i18n/SUPPORTED:
cat /usr/share/i18n/SUPPORTED | grep "en\|ru" > /var/lib/locales/supported.d/local
This example shows all Russian (ru) and English (en) locales being chosen. Look through /usr/share/i18n/SUPPORTED to find the ones for you, then put them in a list, replacing en\|ru and separating each language with a \| (backslash, bar). If you only want one language, just put it in quotes.
- Then regenerate all of the locales:
dpkg-reconfigure locales
- Then set your locale:
update-locale LANG=en_US.UTF-8
In this step, make sure to choose the language and country that you would like your computer to think it is in. Here, I choose en_US, the United States version of English. Once again, look at your /var/lib/locales/supported.d/local or /usr/share/i18n/SUPPORTED for the one right for you. You may also want to research locales, using the Internet.
That was easy, now the commandlxtermwill open up the Unicode version of xterm or your translated software will display things properly, like vim.
How to set default Terminal App window size
The size for a gnome terminal session can be passed through the geometry parameter, specifying columns and rows like 80x40. The default geometry is 80x25.
- First way is to add the following parameter to gnome-terminal launcher:
--geometry 100x40
- Other way is to change this parameter globaly for all gnome-terminal launcher's. Go to /usr/share/applications/gnome-terminal.desktop and edit the EXEC line like this:
Exec=gnome-terminal --geometry=120x30
Using VI editor
A few very simple tricks of using basic but strong unix editor called vi can be found here.
อยากดูภาพยนตร์จากแผ่นดีวีดี จะทำอย่างไร (How to play DVD's)
- ขั้นตอนแรก : ขอให้แน่ใจว่าได้เลือกแหล่งซอฟต์แวร์ที่เป็น universe และ multiverse ใน Synaptic Package Manager ในเมนู Administrator ไว้แล้ว repository.
- ขั้นตอนต่อมา : ให้ติดตั้งโปรแกรมแปลงรหัส (codecs) ต่าง ๆ โดยพิมพ์คำสั่งที่ Terminal ดังนี้:
sudo aptitude install libdvdnav4 libdvdplay0 libdvdread3 libdvdcss2
- ขั้นตอนสุดท้าย : ให้ใช้ totem-xine แทนที่จะเป็น "totem-gstreamer" ซึ่งได้ติดตั้งปริยายไว้แต่แรก (แปลว่าไส้ในของ totem จะต้องเป็น xine ไม่ใช่ gstreamer ไม่รู้ว่าจะใช้ gsine หรือ xine-ui แทนได้หรือเปล่า แต่น่าจะได้นะ) ว่าแล้วก็พิมพ์คำสั่งดังด้านล่างนี้ :
sudo aptitude remove --purge totem totem-gstreamer sudo aptitude install totem-xine
How to install Gmail Notifier alternative (CheckGmail)
- Add the following sources to the repository list:
deb http://asher256-repository.tuxfamily.org dapper main dupdate french deb http://asher256-repository.tuxfamily.org ubuntu main dupdate french
- Install the application
sudo aptitude install checkgmail
- Go to 'System/Preferences/Sessions/Startup Programs' and add the following path to start notifier automatically
/usr/bin/checkgmail
After this the program will appear in your notification area.
How to emulate Mac OS X Spotlight (Deskbar)
- Right click to your panel and select 'Add to panel...'. Now choose 'Deskbar' applet and click 'Add' button.
- Install 'Beagle' packet to enable data indexing on your computer
How to make Ubuntu look like Mac OS X
- Detailed instruction can be found here.
How to remove temporary files on shutdown
- Backup sysklogd file
sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
- Edit sysklogd file
gksudo gedit /etc/init.d/sysklogd
- After the following lines...
stop) log_begin_msg "Stopping system log daemon..." start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile log_end_msg $?
- Add this line:
rm -fr /tmp/* /tmp/.??*
How to tile windows in gnome
First, download the wmtile debian package here.
If you are not running i386, the project's homepage is here.
- Double click the package and install it.
- Login as root and browse to /usr/share/tile/
- Open the rc file in gedit
- Change the second option to read "multi-desktop netwm"
- Save the rc file
Now, create a launcher:
- Right-click on the gnome panel (the taskbar at the top of the screen) and choose "Add to Panel"
- Select "Custom Application Launcher" and fill in these values:
- Type: Application
- Name: Tile Windows Vertically
- Command: tile -v -w
- You can also select an icon to use with the launcher.
- Click "OK"
Now open a couple windows and click your new launcher button to test it. This works great with two or three windows, but it can get a bit strange with more.
If you want to create another launcher that tiles windows horizontally, just follow the same directions, but use the command "tile -h -w"
เครื่องเครือข่าย
เครื่องเครือข่าย Ubuntu Feisty LAMP
- Ubuntu Feisty LAMP Server Installation with Screenshots มีวิธีการติดตั้งอย่างเป็นขั้นเป็นตอนสำหรับ 7.04
- Ubuntu Edgy LAMP Server Installation with Screenshots มีวิธีการติดตั้งอย่างเป็นขั้นเป็นตอนสำหรับ 6.10
เครื่องเครือข่ายสำหรับระบบ AntiVirus
วิธีการติดตั้ง ClamAV AntiVirus บนเครื่องเครือข่าย
sudo clamscan -r /location_of_files_or_folders
วิธีการตรวจไวรัสใน ไฟล์/โฟลเดอร์ แบบอัตโนมัติ
- ในหัวข้อ Automatically scan files/folders for viruses at midnight everyday
- * * * * * means minute hour date month year
export EDITOR=gedit && sudo crontab -e
*Append the following line at the end of file
00 00 * * * sudo clamscan -r /location_of_files_or_folders
- ทำการบันทึกข้อมูล
เครื่องเครือข่ายเพื่อการตรวจสอบระบบ
- อ่าน #General Notes
- อ่าน #How to add extra repositories
ถ้าคุณต้องการตรวจสอบเครื่องเครือข่ายและเครื่องลูกที่ใช้อูบุนตู ไม่ว่าจะเป็น จำนวนหน่วยความจำที่ใช้, คุณภาพการทำงานของตัวประมวลผล, ค่าเฉลี่ยของการโหลด, จำนวนเนื้อที่ที่ถูกใช้ไป, การตรวจสอบระบบ Mysql, การตรวจสอบระบบเครือข่าย, การตรวจสอบระบบในด้านอื่น คุณต้องอ่านตรงนี้
Monitor your Ubuntu Servers and Clients using Munin
เครื่องเครือข่ายสำหรับการพิมพ์ (cupsd)
- อ่าน #General Notes
- อ่าน #How to add extra repositories
วิธีการติดตั้ง cupsd
- Cupsd ควรที่จะได้รับการติดตั้งอัตโนมัติโดยตัวของระบบตั้งแต่แรกอยู่แล้ว. ให้ตรวจสอบดูว่ามีไฟล์อยู่ที่นี่หรือเปล่า "/etc/init.d/cupsys". หรือถ้าคุณอยากจะติดตั้งเองก็สามารถทำได้
sudo apt-get install cupsys*
วิธีการเพิ่มเครื่องพิมพ์เข้าไปในระบบ
- ไปยัง System -> Administration -> Printing.
- เลือก "Add printer".
- ให้ทำตามคำแนะนำของ "Add printer wizard" ที่ปรากฎขึ้นบนหน้าจอ
วิธีการสั่งพิมพ์ผ่านเครือข่ายบนเครื่องอูบุนตู
- ตรวจทานดูว่าได้ตั้งค่าเครื่องพิมพ์ไว้อย่างดีแล้ว
- ทำการแชร์เครื่องพิมพ์ - System -> Administration -> Printing -> Global Settings menu -> Share printers
- Server ip address: 192.168.0.1
- Client ip address: 192.168.0.23
- การตั้งค่าบนเครื่องเครือข่าย
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup gksudo gedit /etc/cups/cupsd.conf
- ให้ค้นหาโค้ดข้างล่างนี้
<Location /> ... Allow localhost ... </Location>
- และเพิ่มโค้ดชุดนี้ลงไป
Allow 192.168.0.23
- ทำการรีสตาร์ท cups.
sudo /etc/init.d/cupsys restart
- การตั้งค่าบนเครื่องลูก
sudo cp /etc/cups/client.conf /etc/cups/client.conf.backup gksudo gedit /etc/cups/client.conf
- และเพิ่มโค้ดชุดนี้ลงไป
ServerName 192.168.0.1
- ทำการรีสตาร์ท cups.
sudo /etc/init.d/cupsys restart
- ลองพิมพ์ "lpq" เข้าไปและเห็นอะไรคล้ายๆ ตัวข้างล่างนี้
vitek@lightfox:~$ lpq HPLJ6P is ready no entries
วิธีการสั่งพิมพ์ผ่านเครือข่ายบนเครื่องวินโดว์
- อ่าน #How to install Samba Server for files/folders sharing service
- อ่าน #How to print on remote Ubuntu machine via samba
1.19.4.5
วิธีการตั้งค่าเครื่องพิมพ์เครือข่ายแบบ 4 port
ทำการตั้งค่า COMPUSA บนเครื่องอูบุนตู
(1) ไปยัง System -> Administration -> Printing.
(2) และทำการเพิ่มเครื่องพิมพ์โดยการเลือก Add a printer
(3) เลือกที่ Network Printer จากนั้นเลือก HP JetDirect
(4) ตรงที่เขียนว่า Host you put in the IP Address of the Print server จะมี Smb4k
(5) ตรง Port ให้ใส่ 9100 สำหรับ USB port 1, 9101 สำหรับ USB port 2, 9102 สำหรับ USB port 3, และ 9103 สำหรับ USB port 4.
(6) จากนั้นกด forward เพื่อทำการติดตั้งเครื่องพิมพ์
เครื่องเครือข่ายระบบ NFS
- อ่าน #General Notes
- อ่าน #How to add extra repositories
วิธีติดตั้งเครื่องเครือข่ายระบบ NFS
sudo apt-get install nfs-kernel-server nfs-common portmap
ทำการตั้งค่า Portmap ไม่ให้ bind กับ loopback interface:
sudo dpkg-reconfigure portmap sudo /etc/init.d/portmap restart
ระบุแชร์โฟลเดอร์(export):
sudo vi /etc/exports
กำหนดค่าของแชร์โฟลเดอร์(export):
วิธีข้างล่างนี้จะทำการแชร์โฟลเดอร์สำหรับ IP addresses ระหว่าง 192.168.1.1 และ 192.168.1.255 ซึ่งผู้อื่นสามารถเขียนและอ่านโฟลเดอร์นี้ได้:
/path/to/shared/files 192.168.1.1/24(rw,no_root_squash,async)
วิธีข้างล่างนี้จะทำการแชร์โฟลเดอร์สำหรับ IP addresses ระหว่าง 192.168.1.1 และ 192.168.1.255 ซึ่งผู้อื่นสามารถอ่านโฟลเดอร์นี้ได้อย่างเดียว:
/path/to/shared/files 192.168.1.1/24(ro,async)
เมื่อเสร็จแล้วให้ทำการบันทึกและเริ่มการใช้งานเครือข่ายระบบ NFS ใหม่:
sudo /etc/init.d/nfs-kernel-server restart
ทำการส่งค่าออก
sudo exportfs -a
การติดตั้งเครื่องลูก NFS
sudo apt-get install portmap nfs-common
ต่อเข้ากับระบบด้วยตนเอง
cd ~ mkdir temp sudo mount 192.168.1.1:/path/to/shared/files temp
อาจต้องทำการรีสตาร์ทระบบ NFS เสียก่อน:
sudo /etc/init.d/portmap restart sudo /etc/init.d/nfs-common restart
ต่อเข้ากับระบบแบบอัตโนมัติ
สร้างจุดเชื่อมต่อ:
sudo mkdir /mnt/files
ปรับค่า:
sudo vi /etc/fstab
เพิ่มโค้ดคล้ายๆ กับบรรทัดล่างนี้เข้าไป:
192.168.1.1:/path/to/shared/files /mnt/files nfs rsize=8192,wsize=8192,timeo=14,intr
ทดสอบค่าที่ตั้งขึ้นไปใหม่:
sudo mount /mnt/files
ทำการรีบู๊ทเพื่อทดสอบการเชื่อมต่ออัตโนมัติ
เครื่องเครือข่าย Samba
วิธีการติดตั้งเครื่องเครือข่าย Samba เพื่อการแชร์ไฟล์หรือโฟลเดอร์
- อ่าน #General Notes
- อ่าน #How to add extra repositories
sudo apt-get install samba smbfs
วิธีการ เพิ่ม/แก้ไข/ลบ สมาชิกออกจากระบบเครือข่าย
- อ่าน #General Notes
- อ่าน #How to install Samba Server for files/folders sharing service
- เพิ่มสมาชิกเข้าระบบเครือข่าย
sudo smbpasswd -a system_username gksudo gedit /etc/samba/smbusers
- เปิดไฟล์ขึ้นมาใหม่ แล้วเพิ่มบรรทัดข้างล่างนี้เข้าไป
system_username = "network username"
- ทำการบันทึกข้อมูล
- วิธีการแก้ไขข้อมูลสมาชิกในระบบเครือข่าย
sudo smbpasswd -a system_username
- วิธีการลบข้อมูลสมาชิกในระบบเครือข่าย
sudo smbpasswd -x system_username
How to share home folders with read only permission (Authentication=Yes)
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following lines
security = user username map = /etc/samba/smbusers
- Uncomment the following lines:
;[homes] ;comment = Home Directories ;browseable = no ;valid users = %S ;writable = yes
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share home folders with read/write permissions (Authentication=Yes)
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following lines
security = user username map = /etc/samba/smbusers
- Find this section
... # By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. writable = no ...
- Replace with the following lines
# By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. writable = yes
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share group folders with read only permission (Authentication=Yes)
sudo mkdir /home/group sudo chmod 777 /home/group/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following lines
security = user username map = /etc/samba/smbusers
- Append the following lines at the end of file
[Group] comment = Group Folder path = /home/group public = yes writable = no valid users = system_username1 system_username2 create mask = 0700 directory mask = 0700 force user = nobody force group = nogroup
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share group folders with read/write permissions (Authentication=Yes)
sudo mkdir /home/group sudo chmod 777 /home/group/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following lines
security = user username map = /etc/samba/smbusers
- Append the following lines at the end of file
[Group] comment = Group Folder path = /home/group public = yes writable = yes valid users = system_username1 system_username2 create mask = 0700 directory mask = 0700 force user = nobody force group = nogroup
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share public folders with read only permission (Authentication=Yes)
sudo mkdir /home/public sudo chmod 777 /home/public/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following lines
security = user username map = /etc/samba/smbusers
- Append the following lines at the end of file
[public] comment = Public Folder path = /home/public public = yes writable = no create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share public folders with read/write permissions (Authentication=Yes)
sudo mkdir /home/public sudo chmod 777 /home/public/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following lines
security = user username map = /etc/samba/smbusers
- Append the following lines at the end of file
[public] comment = Public Folder path = /home/public public = yes writable = yes create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share public folders with read only permission (Authentication=No)
sudo mkdir /home/public sudo chmod 777 /home/public/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following line
security = share
- Append the following lines at the end of file
[public] comment = Public Folder path = /home/public public = yes writable = no create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
- Save the edited file
sudo testparm sudo /etc/init.d/samba restart
How to share public folders with read/write permissions (Authentication=No)
sudo mkdir /home/public sudo chmod 777 /home/public/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf
- Find this line
... ; security = user ...
- Replace with the following line
security = share
- Append the following lines at the end of file
[public] comment = Public Folder path = /home/public public = yes writable = yes create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
- Save the edited file
sudo testparm sudo /etc/init.d/samba restart
How to print on remote Ubuntu machine via samba
- Read #Print Server (cupsd)
- Make sure your Ubuntu printers are configured properly.
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup gedit /etc/samba/smb.conf
- Find the following lines
... # printing = cups # printcap name = cups ...
- and uncomment them.
printing = cups printcap name = cups
- Restart cups server
sudo /etc/init.d/cupsys restart
- Now printers working on your Ubuntu machine should be acessible via samba.
เครื่องมือจัดการเครื่องเครือข่ายแซมบาผ่านเว็บ (SWAT)
วิธีติดตั้งซูเปอร์เซิร์ฟเวอร์ INETD
- อ่าน #General Notes
- อ่าน #How to add extra repositories
sudo apt-get install netkit-inetd
วิธีติดตั้งโปรแกรม SWAT สำหรับดีมอนของเครื่องเครือข่ายแซมบา
- อ่าน #General Notes
- อ่าน #How to add extra repositories
- อ่าน #วิธีการติดตั้งเครื่องเครือข่ายแซมบาเพื่อการแชร์ไฟล์หรือโฟลเดอร์
- อ่าน #วิธีติดตั้งซูเปอร์เซิร์ฟเวอร์ INETD
sudo apt-get install swat
- เปิดโปรแกรมปรับค่า inetd
sudo gksu gedit /etc/inetd.conf
- หากมีตัวอักษรดังกล่าวปรากฏ:
<#off#> swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat
- เปลี่ยนเป็น:
swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat
- เริ่มโปรแกรมใหม่
sudo /etc/init.d/inetd restart
- http://localhost:901/
SSH Server
How to install SSH Server for remote administration service
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install ssh
How to SSH into remote Ubuntu machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote Ubuntu machine: 192.168.0.1
ssh username@192.168.0.1
How to copy files/folders from remote Ubuntu machine into local machine (scp)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote Ubuntu machine: 192.168.0.1
- Remote files/folders location: /home/username/remotefile.txt
- Local machine save location: . (current directory)
scp -r username@192.168.0.1:/home/username/remotefile.txt .
How to copy files/folders from local machine into remote Ubuntu machine (scp)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Local files/folders location: localfile.txt
- Remote Ubuntu machine: 192.168.0.1
- Remote Ubuntu machine save location: /home/username/
scp -r localfile.txt username@192.168.0.1:/home/username/
How to copy files/folders from remote Ubuntu machine into local machine (rsync)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote Ubuntu machine: 192.168.0.1
- Remote files/folders location: /home/username/remotefile.txt
- Local machine save location: . (current directory)
rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .
How to copy files/folders from local machine into remote Ubuntu machine (rsync)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Local files/folders location: localfile.txt
- Remote Ubuntu machine: 192.168.0.1
- Remote Ubuntu machine save location: /home/username/
rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/
How to mount remote folders into local Ubuntu machine (sshfs)
- Read #General Notes
- e.g. Assumed that remote machine has installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote machine: 192.168.0.1
- Remote machine folder location: /media/music
- Install sshfs
sudo apt-get install sshfs
- Load kernel driver for sshfs
sudo modprobe fuse
- Join the 'fuse' user group
sudo adduser your_user_name fuse
- Logout and login for this to take effect.
- fix group on /dev/fuse
sudo chgrp fuse /dev/fuse
- Create local mountpoint in your home directory
mkdir ~/remote_music
- Mount the remote folder into ~/remote_music
sshfs 192.168.0.1:/media/music ~/remote_music
How to SSH into remote Ubuntu machine via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Download PuTTY: Here
How to copy files/folders from/into remote Ubuntu machine via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Download FileZilla: Here
How to limit the user accounts that can connect through ssh remotely
- Read #General Notes
- e.g. If you enable the SSH server, then any user with a valid account can connect remotely
- This can lead to security risks, as there exist remote password cracking tools that
- try common username/password pairs.
- Keep a backup of the ssh server configuration file with
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIGINAL
- Edit the configuration file
gksudo gedit /etc/ssh/sshd_config
- Change the parameter PermitRootLogin from yes to no. The superuser must not be able to connect directly from remote.
- Add the parameter AllowUsers and specify the usernames (space separated) that can connect remotely.
NOTE: This will allow ONLY the users specified to connect. You may use wildcards here (example: j* will allow jsmith to connect but not fsmith)
- You can also use DenyUsers for fine-grained selection of users.
- If you enable the openssh server and you have no intention for now to enable remote connections, you may add AllowUsers nosuchuserhere to disable anyone connecting.
Using SSH to Port Forward
- Read #General Notes
- e.g. Assumed that remote machine has installed SSH Server service
- Read #How to install SSH Server for remote administration service
If is possible to create secure SSH tunnels between multiple sites. Imagine two sites (home and office). If you have an SSH server available in the office available via the Internet, you can tunnel across to this server and communicate with any local PC in the office from home.
- Example: Make Port 80 (Web Server) on 10.0.2.10 in the office available locally on Port 81
From home:
ssh -L 81:10.0.2.10:80 user@office.net
Once logged in, you can now browse to http://localhost:81 which is really a secure tunnel to the web server in your office. You can setup multiple port forwardings.
ssh -L 81:10.0.2.10:80 -L 82:10.0.2.20:80 -L 83:10.0.2.30:80 user@office.net
Now, port 81 locally forwards to port 80 on 10.0.2.10, port 82 forwards to port 80 on 10.0.2.20 and port 83 forwards to port 80 on 10.0.2.30
For example, http://localhost:81 connects you to port 80 on 10.0.2.10 (computer at remote location)
Specify port with -p?? if SSH Server on office.net does not run on default port 22.
Explanation:
ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip>
Protecting SSH from brute force atack
- Read #General Notes
- Read #How to add extra repositories
It is possible to easily protect SSH from a password brute force attack with a pam_abl module. You can install it by the two ways:
- Manually according to pam_abl documentation and manually apply patch for a bug №405041 onto openssh-server
- Automatically by the repository from tolero.org
To install from a repository:
- Add a repository for your distribution listed on the ssh brute force protection page
And execute the following commands:
sudo aptitude update sudo aptitude upgrade sudo aptitude install libpam-abl sudo /etc/init.d/ssh restart
First command is to fetch the repository listing. Second is to upgrade the openssh-server package to patched version (openssh-client will be also updated). Third is to set up a protection plugin. And the fourth is to restart a server with a new security plugin.
DHCP Server
How to install DHCP Server for automatic IP addresses assignment
- Read #General Notes
- Read #How to add extra repositories
- e.g. Assumed that "eth0" is the interface for network card
- IP Address Range: 192.168.0.100 to 192.168.0.200
- Subnet Mask: 255.255.255.0
- DNS Servers: 202.188.0.133, 202.188.1.5
- Domains: tm.net.my
- Gateway Address: 192.168.0.1
sudo apt-get install dhcp3-server sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup gksudo gedit /etc/default/dhcp3-server
- Find this line
... INTERFACES=""
- Replace with the following line
INTERFACES="eth0"
- Save the edited file
sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup gksudo gedit /etc/dhcp3/dhcpd.conf
- Find this section
... # option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600; max-lease-time 7200; ...
- Replace with the following lines
# option definitions common to all supported networks... #option domain-name "example.org"; #option domain-name-servers ns1.example.org, ns2.example.org;
#default-lease-time 600; #max-lease-time 7200;
- Find this section
... # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { # range 10.5.5.26 10.5.5.30; # option domain-name-servers ns1.internal.example.org; # option domain-name "internal.example.org"; # option routers 10.5.5.1; # option broadcast-address 10.5.5.31; # default-lease-time 600; # max-lease-time 7200; #} ...
- Replace with the following lines
# A slightly different configuration for an internal subnet. subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.100 192.168.0.200; option domain-name-servers 202.188.0.133, 202.188.1.5; option domain-name "tm.net.my"; option routers 192.168.0.1; option broadcast-address 192.168.0.255; default-lease-time 600; max-lease-time 7200; }
- Save the edited file
sudo /etc/init.d/dhcp3-server restart
ระบบสำรองข้อมูลในอูบุนตุ
ถ้าคุรต้องการจะสำรองข้อมูลในอูบุนตุ ลองใช้เครื่องมือสำรองข้อมูลดังต่อไปนี้
โปรแกรม Sbackup
- สำรองข้อมูลด้วยโปรแกรม Sbackup - การสำรองและกู้คืนข้อมูลในอูบุนตุด้วยโปรแกรม Sbackup
โปรแกรม Dar และ Kdar
- สำรองข้อมูลด้วย Dar และ Kdar - การสำรองและกู้คืนข้อมูลในอูบุนตุด้วยโปรแกรม Dar และ Kdar
เครื่องแม่ข่ายสำหรับฐานข้อมูล
วิธีติดตั้งเครื่องแม่ข่ายสำหรับฐานข้อมูลแบบ SQL
- อ่าน #General Notes
- อ่าน #How to add extra repositories
sudo apt-get install mysql-server
- โปรแกรม MySQL ปรกติแล้วจะอนุญาตให้เริ่มใช้จาก localhost (127.0.0.1) เราจำต้องยกเลิกข้อจำกัดนั้นถ้าคุณต้องการให้ทุกคนเข้าถึงโปรแกรมได้ผ่านอินเทอร์เนต เปิดไฟล์/etc/mysql/my.cnf
gksudo gedit /etc/mysql/my.cnf
- หาบรรทัดที่เขียนว่า bind-address = 127.0.0.1 นำเครื่องหมายคอมเมนต์ออก
... #bind-address = 127.0.0.1 ...
- โปรแกรม MySQL ตั้งค่าเริ่มต้นให้ root ไม่มีรหัสผ่าน ถือว่าเป็นความเสี่ยงค่อนข้างมาก เราจำต้องกำหนดรหัสผ่านให้กับ root เรายังต้องกำหนดรหัสผ่านให้กับผู้ใช้ root ของเครื่องคอมพิวเตอร์ที่ติดตั้งนั้นด้วย ในที่นี้local-machine-name เป้นชื่อของเครื่องคอมพิวเตอร์ที่เรากำลังใช้งานอยู่ ดูข้อมูลเพิ่มเติมจาก ที่นี่
mysqladmin -u root password your-new-password mysqladmin -h root@local-machine-name -u root -p password your-new-password sudo /etc/init.d/mysql restart
การสำรองฐานข้อมูล MySQL ด้วยโปรแกรม AutoMySQLBackup
- AutoMySQLBackup เป็นโปรแกรมสคริปต์ที่ใช้ในการสำรองฐานข้อมูล MYSQL แบบประจำวัน ประจำสัปดาห์ และประจำเดือน โดยใช้คำสั่ง mysqldump
- ลักษณะของ AutoMySQLBackup
- ทำการสำรองฐานข้อมูล MySQL ได้หลายๆ ฐานข้อมูลด้วยโปรแกรมสคริปต์เพียงชุดเดียว (ในปัจจุบันสามารถสำรองฐานข้อมูลทั้งหมดบนเครื่องแม่ข่ายอย่างง่ายดาย โดยไม่จำเป็นต้องแยกแต่ละฐานข้อมูลออกจากกัน)
- ทำการสำรองฐานข้อมูลทั้งหมดไว้ในไฟล์เดียว หรือแยกเก็บในไดเรกทอรีและไฟล์ตามฐานข้อมูลแต่ละชุด
- บีบอัดไฟล์สำรองข้อมูลโดยอัตโนมัติ เพื่อประหยัดเนื้อที่บนดิสก์ โดยใช้คำสั่ง gzip หรือ bzip2
- สามารถสำรองข้อมูลจากเครื่องแม่ข่ายระยะไกล มาเก็บไว้ที่เครื่องแม่ข่ายกลางได้
- ทำงานโดยอัตโนมัติด้วยคำสั่ง cron หรือสั่งการจากผู้ใช้โดยตรงได้
- สามารถส่งบันทึกการสำรองข้อมูลผ่านอีเมล์ไปยังที่อยู่อีเมล์ที่กำหนดไว้ นอกเหนือจากผู้ใช้ "root" (เหมาะสำหรับการจัดการเว็บไซต์และฐานข้อมูล)
- สามารถส่งไฟล์สำรองข้อมูลที่ถูกบีบอัดไว้ผ่านทางอีเมล์ไปยังที่อยู่ที่กำหนด
- สามารถกำหนดขนาดสูงสุดของไฟล์สำรองข้อมูลสำหรับการส่งทางอีเมล์
- สามารถกำหนดให้ใช้คำสั่งในการสำรองข้อมูลแบบก่อนและหลัง
- สามารถเลือกวันที่จะทำการสำรองข้อมูลในแต่ละสัปดาห์ได้
- ดาวน์โหลจาก ที่นี่
- AutoMySQLBackup Requirements
The AutoMySQLBackup script only requires mysqldump (A standard utility provided with the mysql client) and gzip or bzip2 for compression of the backup files. If you would like to have the log emailed to you then you will need to have permission to execute the “mail” program. If you want the compressed backup files mailed to you then Mutt must be available on the server. Finally you will need a bash shell and the standard system tools and utilities (all these requirements should be the default on most linux system.)
- What AutoMySQLBackup does
Every day AutoMySQLBackup will run (if setup in /etc/cron.daily) and using mysqldump and gzip will dump your specified databases to the /backups/daily directory, it will rotate daily backups weekly so you should never have more than 7 backups in there..
Every Saturday AutoMySQLBackup will again backup the databases you have chosen but they will be placed into /backups/weekly, these will be rotated every 5 weeks so there should never be more than 5 backups in there..
Every 1st of the month AutoMySQLBackup will create a backup of all databases and place them into /backups/monthly. These will never be rotated so it will be up to you to do your own house keeping. I would suggest taking a copy of this offline every month or two so that if you have a hard drive failure you will be able to restore your database
- AutoMySQLBackup Installation
The install is as simple as editing a few variables in the AutoMySQLBackup file. The full setup is documented in the AutoMySQLBackup script file below the variables section.
- Download automysqlbackup.sh and place it into your /etc/cron.daily directory or your home directory.
- Edit (at least) the following lines :
... USERNAME=dbuser PASSWORD=password DBNAMES=”DB1 DB2 DB3″ ...
- Note:The user must have at least select privileges to the databases and make sure to keep the quotes ” ” otherwise it won’t work
- Make the file executable :
sudo chmod u+rwx
- Create the following directory
./backups
- That’s it...Now you can run it using the command line “./automysqlbackup.sh” or if it is in /etc/cron.daily it will run each day when cron
How to install MYSQL Administrator
sudo apt-get install mysql-admin
- Read #How to refresh GNOME panel
- Applications -> System Tools -> MySQL Administrator
How to install MySQL Query Browser (SQL Client)
sudo apt-get install mysql-query-browser
- Read #How to refresh GNOME panel
- Applications -> Programming -> MySQL Query Browser
How to install Oracle Database XE
- Read #General Notes
- Read #How to add extra repositories
- Read http://www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html
- Add the following repository to your /etc/apt/sources.list:
deb http://oss.oracle.com/debian unstable main non-free
- Install the software using apt-get
sudo apt-get update sudo apt-get install oracle-xe
- Add your login to the 'dba' group (where your login name is username)
sudo usermod -G dba -a username
- Run the initial configuration
sudo /etc/init.d/oracle-xe configure
You can configure any ports you want as long as they don't interfere with any other services listening on ports. You can choose the defaults by pressing enter instead of entering something in.
Apache HTTP Server
How to install Apache HTTP Server for HTTP (Web) Server service
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install apache2
- http://localhost
How to install PHP for Apache HTTP Server
How to install PHP4
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
sudo apt-get install php4 sudo apt-get install libapache2-mod-php4 sudo /etc/init.d/apache2 restart
- To test if php4 installed correctly
gksudo gedit /var/www/testphp.php
- Insert the following line into the new file
<?php phpinfo(); ?>
- Save the edited file
- http://localhost/testphp.php
- Be sure to remove the file afterwards, as it may pose a security risk
How to install PHP5
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
sudo apt-get install php5 sudo apt-get install libapache2-mod-php5 sudo /etc/init.d/apache2 restart
- To test if php5 installed correctly
gksudo gedit /var/www/testphp.php
- (Optional) Insert the following line into the new file
<?php phpinfo(); ?>
- Save the edited file
- http://localhost/testphp.php
- Be sure to remove the file afterwards, as it may pose a security risk
If that didn't work (for example, if your browser prompted you to save the testphp.php page), try these commands:
sudo a2enmod php5 sudo /etc/init.d/apache2 force-reload
Then try opening http://localhost/testphp.php again
- (Optional) Install recommended PHP5 modules
sudo apt-get install php5-xsl sudo apt-get install php5-gd sudo apt-get install php-pear
- Restart Apache
sudo /etc/init.d/apache2 restart
Many PHP applications use XSLT technology as well as server-side graphic manipulation (via GD). Also, PEAR provides access to PHP's module repository.
pear help
How to install MYSQL for Apache HTTP Server
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- Read #How to install PHP for Apache HTTP Server
- Read #How to install MYSQL Database Server
sudo apt-get install libapache2-mod-auth-mysql
- Select either php4-mysql or php5-mysql depending on which version of PHP you installed
sudo apt-get install php<version-number>-mysql sudo apt-get install phpmyadmin
- To get PHP to work with MySQL, open the file (where <version> is either 4 or 5 depending on which PHP you installed)
gksudo gedit /etc/php<version>/apache2/php.ini
- You'll need to uncomment the ";extension=mysql.so" line so that it looks like this
... extension=mysql.so ...
- Save the file then exit
sudo /etc/init.d/apache2 restart
- http://localhost/phpmyadmin
Alternative if the above doesn't work (which it probably won't and this probably will):
sudo apt-get install mysql-server
How to install Python for Apache 2
sudo aptitude install python sudo aptitude install libapache2-mod-python sudo gedit /etc/apache2/mods-available/mod_python.conf
add the following lines
AddType application/x-httpd-python .py AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On
save
cd /etc/apache2/mods-enabled sudo ln -s ../mods-available/mod_python.conf mod_python.conf sudo /etc/init.d/apache2 restart
How to map URLs to folders outside /var/www/
gksudo gedit /etc/apache2/conf.d/alias
- Insert the following lines into the new file
Alias /URL-path /location_of_folder/
<Directory /location_of_folder/> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>
- Save the edited file
sudo /etc/init.d/apache2 restart
- http://localhost/URL-path
- When you get "403 - Permission denied", you might try:
chmod o+x /location_of_folder/
- If that doens't work, the following might help:
chmod o+r,o+x /location_of_folder/
How to change the default port number for Apache HTTP Server
- e.g. Assumed that new port number is 78
sudo cp /etc/apache2/ports.conf /etc/apache2/ports.conf_backup gksudo gedit /etc/apache2/ports.conf
- Find this line
Listen 80
- Replace with the following line
Listen 78
- Save the edited file
sudo /etc/init.d/apache2 restart
- http://localhost:78
How to parse RSS into PHP for Apache HTTP Server
- Read #General Notes
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- Read #How to install PHP for Apache HTTP Server
- e.g. Assumed that RSS is DistroWatch.com - News
wget -c http://easylinux.info/uploads/magpierss-0.71.1.tar.gz sudo mkdir /var/www/feeds sudo tar zxvf magpierss-0.71.1.tar.gz -C /var/www/feeds/ sudo mv /var/www/feeds/magpierss-0.71.1/* /var/www/feeds/ sudo rm -fr /var/www/feeds/magpierss-0.71.1/ sudo chown -R www-data:root /var/www/feeds/ gksudo gedit /var/www/feeds/index.php
- Insert the following lines into the new file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>DistroWatch.com - News</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <style type="text/css"> /*<![CDATA[*/ /* DEFAULT TAG STYLES */ body { background: #ffffff; margin-left: 20px; font-family: bitstream vera sans,sans-serif; font-size: 9pt; } h1 { font-family: luxi sans,sans-serif; font-size: 15pt; } /*]]>*/ </style> </head> <body> <?php require_once 'rss_fetch.inc'; error_reporting(E_ERROR); $url = 'http://distrowatch.com/news/dw.xml'; $rss = fetch_rss($url); if ($rss) { echo "<h1>"; echo "<a href=$url>", $rss->channel[title], "</a><br/>"; echo "</h1>"; foreach ($rss->items as $item ) { $url = $item[link]; $title = $item[title]; $description = $item[description]; echo "<li>"; echo "<b>Topic:</b> <a href=$url><b><u>$title</u></b></a><br/><br/>"; echo "$description<br/><br/>"; echo "</li>"; } } else { echo "<a href=$url>", $url, "</a> - Server Down!<br/>"; } ?> </body> </html>
- Save the edited file
- http://localhost/feeds/index.php
Troubleshooting Feisty Fawn
- Fix broken Ubuntu Feisty Fawn This is simple Procedure how to fix broken Ubuntu Feisty
FTP Server
How to install FTP Server for File Transfer service
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install proftpd
How to configure FTP user to be "jailed" (chrooted) into their home directory
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup gksudo gedit /etc/proftpd/proftpd.conf
- Find this section
... DenyFilter \*.*/ ...
- Add the following line below it
DefaultRoot ~
- Save the edited file
sudo /etc/init.d/proftpd restart
How to configure FTP Server to allow anonymous FTP user to read only
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup gksudo gedit /etc/proftpd/proftpd.conf
- Append the following lines at the end of file
<Anonymous ~ftp> User ftp Group nogroup UserAlias anonymous ftp DirFakeUser on ftp DirFakeGroup on ftp RequireValidShell off MaxClients 10 DisplayLogin welcome.msg DisplayFirstChdir .message <Directory *> <Limit WRITE> DenyAll </Limit> </Directory> </Anonymous>
- Save the edited file
sudo /etc/init.d/proftpd restart
How to configure FTP Server to allow anonymous FTP user to read/write
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup gksudo gedit /etc/proftpd/proftpd.conf
- Append the following lines at the end of file
<Anonymous ~ftp> User ftp Group nogroup UserAlias anonymous ftp DirFakeUser on ftp DirFakeGroup on ftp RequireValidShell off MaxClients 10 DisplayLogin welcome.msg DisplayFirstChdir .message </Anonymous>
- Save the edited file
sudo /etc/init.d/proftpd restart
How to map anonymous FTP user to folders outside /home/ftp/
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup gksudo gedit /etc/proftpd/proftpd.conf
- Append the following lines at the end of file
<Anonymous /location_of_folder/> User ftp Group nogroup UserAlias anonymous ftp DirFakeUser on ftp DirFakeGroup on ftp RequireValidShell off MaxClients 10 DisplayLogin welcome.msg DisplayFirstChdir .message <Directory *> <Limit WRITE> DenyAll </Limit> </Directory> </Anonymous>
- Save the edited file
sudo /etc/init.d/proftpd restart
How to change the default port number for FTP Server
- e.g. Assumed that new port number is 77
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup gksudo gedit /etc/proftpd/proftpd.conf
- Find this line
Port 21
- Replace with the following line
Port 77
- Save the edited file
sudo /etc/init.d/proftpd restart
How to ftp into remote Ubuntu machine via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed FTP Server service
- Read #How to install FTP Server for File Transfer service
- Download FileZilla: Here
Personal Apt Repository
- Read #General Notes
Setting Up Repository
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
Note: This type of repository is known as a Trivial Repository.
This type of repository does not fully comply with Debian standards, so should not be used commercially. However, it is ideal for home or personal use.
- Install Package Tools
sudo apt-get install dpkg-dev
- Create Repos on Filesystem
mkdir /somewhere/apt mkdir /somewhere/apt/archives mkdir /somewhere/apt/archives/binary
- (Optional) Copy existing local APT cache to your Repos
cp -v /var/cache/apt/archives/*.deb /somewhere/apt/archives/binary/
- Create Package Lists for Repos
cd /somewhere/apt/archives dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
- Publish Repos with Apache
cd /var/www sudo ln -s /somewhere/apt/archives apt
- Add Repos to Sources (on all PCs) to /etc/apt/sources.list
Open /etc/apt/sources.list
sudo gedit /etc/apt/sources.list
Add the following to the bottom of the file:
# My Repos deb http://localhost/apt binary/
- Update APT Database
sudo apt-get update
Updating Repository
Simply copy or download ".deb" files to /somewhere/apt/archives/binary/ and then update the Packages list:
cd /somewhere/apt/archives dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
Streaming Media Server
How to install GNUMP3d for Streaming Media Server service
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- e.g. /var/music/ is the directory containing multimedia files
sudo apt-get install gnump3d
- http://localhost:8888
- Streaming Media Server Guide
How to change the default directory containing multimedia files for GNUMP3d
- e.g. Assumed that new directory containing multimedia files is /home/music/
sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup gksudo gedit /etc/gnump3d/gnump3d.conf
- Find this line
root = /var/music
- Replace with the following line
root = /home/music
- Find this line
user = gnump3d
- Replace with the following line
user = root
- Save the edited file
sudo /etc/init.d/gnump3d restart
- http://localhost:8888
How to change the default port number for GNUMP3d
- e.g. Assumed that new port number is 7878
sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup gksudo gedit /etc/gnump3d/gnump3d.conf
- Find this line
port = 8888
- Replace with the following line
port = 7878
- Save the edited file
sudo /etc/init.d/gnump3d restart
- http://localhost:7878
Groupware (Email/Calendaring)
How to install Meldware Communication Suite
- Read #General Notes
- Read #How_to_install_Java_Development_Kit_.28JDK.29_v5.0
- Meldware Communication Suite provides a multi-platform alternative to popular groupware like Exchange or Lotus Notes including Email(SMTP/POP/IMAP) and Calendaring(iCAL,WCAP). It depends on Java and, optionally, for the webmail/webcal client, Flash.
sudo aptitude install sun-java5-jdk sudo update-java-alternatives -s java-1.5.0-sun
- Download the jar file for a recent milestone or build here
- Open a new terminal (capture java path updates)
- change directory to your download directory
- replace below filename with correct version based on your download
sudo java -jar buni-meldware-20070225.jar
- A series of configuration questions are asked, for destination directory specify /opt/mcs
sudo cp /etc/init.d/skeleton /etc/init.d/meldware-cs sudo vi /etc/init.d/meldware-cs
- Replace the value in the line beginning with PATH with "/usr/sbin:/usr/bin:/sbin:/bin:/opt/mcs/bin" excluding quotes (assuming you specified /opt/mcs as the destination directory to the installer)
- Replace the value in the line beginning with DESC with "Meldware Communication Suite" including quotes
- Replace the value in the line beginning with NAME with "run.sh" excluding quotes
- Replace the value in the line beginning with DAEMON with "/opt/mcs/bin/$NAME" excluding quotes
- Replace the value in the line beginning with DAEMON_ARGS with "-c meldware" excluding quotes
- Replace the value in the line beginning with SCRIPTNAME with "/etc/init.d/meldware-cs" excluding quotes
- save (ESC):wq
sudo chmod 755 /etc/init.d/meldware-cs sudo ln -s /etc/init.d/meldware-cs /etc/rc3.d/S21meldware-cs sudo ln -s /etc/init.d/meldware-cs /etc/rc6.d/K21meldware-cs sudo ln -s /etc/init.d/meldware-cs /etc/rc4.d/S21meldware-cs
- start MCS
sudo /etc/init.d/meldware-cs restart
- Additional documentation is available here
Image Gallery Server
- For a comparison between Gallery1 and Gallery2 see here
Gallery1
How to install Gallery1 for Image Gallery Server service
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- Read #How to install PHP for Apache HTTP Server
sudo apt-get install gallery (when prompted to restart Apache, choose No or Cancel) sudo apt-get install imagemagick sudo apt-get install jhead sudo apt-get install libjpeg-progs sudo /etc/init.d/apache2 restart sudo sh /usr/share/gallery/configure.sh
- http://localhost/gallery/setup/index.php
- Gallery Configuration
Gallery Configuration Wizard: Step 1 Next Step ->
Gallery Configuration Wizard: Step 2 General settings Tab -> Admin password: Specify the password Locations and URLs Tab -> Album directory: /var/www/albums/ Temporary directory: /tmp/ Gallery URL: http://localhost/gallery Albums URL: http://localhost/albums Next Step -->
Gallery Configuration Wizard: Step 3 Next Step -->
Gallery Configuration Wizard: Step 4 Save Config ->
- http://localhost/gallery/albums.php
How to configure Gallery1 to be accessible via Internet (Hostname or fix IP) or LAN (fix IP)
- e.g. Assumed that network and internet connections have been configured properly
- Internet (Hostname or fix IP) or LAN (fix IP): http://www.url.com
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup gksudo gedit /etc/gallery/config.php
- Find this section
... $gallery->app->photoAlbumURL = "http://localhost/gallery"; $gallery->app->albumDirURL = "http://localhost/albums"; ...
- Replace with the following lines
$gallery->app->photoAlbumURL = "http://www.url.com/gallery"; $gallery->app->albumDirURL = "http://www.url.com/albums";
- Save the edited file
- http://www.url.com/gallery/albums.php
How to configure Gallery1 to be accessible via LAN (dynamic IP)
- e.g. Assumed that network connections have been configured properly
- LAN (dynamic IP): 192.168.0.1
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup gksudo gedit /etc/gallery/config.php
- Find this section
... $gallery->app->photoAlbumURL = "http://localhost/gallery"; $gallery->app->albumDirURL = "http://localhost/albums"; ...
- Replace with the following lines
$gallery->app->photoAlbumURL = "/gallery"; $gallery->app->albumDirURL = "/albums";
- Save the edited file
- http://192.168.0.1/gallery/albums.php
How to backup/restore Gallery1 data
- Read #General Notes
- To backup Gallery data
sudo tar zcvf gallery.tgz /var/www/albums/ /etc/gallery/
- To restore Gallery data
sudo tar zxvf gallery.tgz -C /
Gallery2
How to install Gallery2
How to configure Gallery2
How to install Subversion version control server (with Apache support)
- Read #General Notes
- Install Subversion and Apache 2 Module
sudo aptitude install subversion libapache2-svn
- Enable Subversion/DAV Apache 2 Module
sudo a2enmod dav_svn
- Configure Apache 2
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
Edit the file to look something like this:
<Location /svn> DAV svn SVNPath /home/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </Location>
- Create Subversion Repository
sudo mkdir /home/svn sudo svnadmin create /home/svn
- Give Apache 2 Permissions to Repository
sudo chown -R www-data /home/svn
- Create Repository User
Replace 'username' with your username
sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd username
Enter password when prompted.
- Restart Apache 2
sudo /etc/init.d/apache2 restart
How to install Subversion version control server (svnserve)
- Read #General Notes
- Install Subversion and Internet services daemon
sudo apt-get install subversion xinetd
- Create user that will own the repositories
sudo adduser --system --no-create-home --home /var/svn --group --disabled-login svn
- Create directory that will hold the repositories
sudo mkdir /var/svn sudo chown svn:svn /var/svn
- Create file /etc/xinetd.d/svnserve with the following content
service svn { port = 3690 socket_type = stream protocol = tcp wait = no user = svn server = /usr/bin/svnserve server_args = -i -r /var/svn }
- Restart xinetd
sudo /etc/init.d/xinetd restart
- Create the first repository
sudo -u svn svnadmin create /var/svn/testrepo
- It should be possible to check out the repository and work on it
svn co svn://localhost/testrepo
การแก้ไขปัญหา
วิธีการป้องกันไม่ให้เวลาของระบบแปลงค่าตัวเองเป็น UTC (GMT)
- อ่าน #General Notes
sudo cp /etc/default/rcS /etc/default/rcS_backup gksudo gedit /etc/default/rcS
- ให้หาโค้ดบรรทัดนี้
... UTC=yes ...
- ให้ใส่โค้ดบรรทัดนี้เข้าไปแทน
UTC=no
- ทำการบันทึกไฟล์
- ที่เมนู ให้ไปยัง System -> Administration -> Time and Date
ตั้งค่าเวลาให้ถูกต้อง
sudo /etc/init.d/hwclock.sh restart
วิธีการตั้งค่าเสียงใน GNOME ให้ทำงานได้อย่างถูกต้อง
- อ่าน #General Notes
- อ่าน #How to add extra repositories
sudo killall esd sudo cp /etc/esound/esd.conf /etc/esound/esd.conf_backup gksudo gedit /etc/esound/esd.conf
- ให้หาโค้ดชุดนี้
... auto_spawn=0 spawn_options=-terminate -nobeeps -as 5 ...
- แทนที่เข้าไปด้วยโค้ดชุดนี้
auto_spawn=1 spawn_options=-terminate -nobeeps -as 2 -d default
- ทำการบันทึกไฟล์
sudo apt-get install libesd-alsa0 gksudo gedit /etc/asound.conf
- ใส่โค้ดตามนี้ไปยังไฟล์ที่สร้างขึ้นมาใหม่
pcm.card0 { type hw card 0 } pcm.!default { type plug slave.pcm "dmixer" } pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } }
- ทำการบันทึกไฟล์
sudo ln -fs /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
ไปยัง System -> Preferences -> Sound Sound preferences
General Tab -> Sounds for events (Un-Checked)
- ให้ทำการบันทึกข้อมูลในทุกๆ โปรแกรมที่กำลังใช้งานอยู่ แล้วรีบู๊ทเครื่อง
วิธีการเคลียร์ถังขยะใน GNOME
- อ่าน #General Notes
sudo rm -fr $HOME/.Trash/
วิธีการกำจัดเมนูที่ซ้ำซ้อนใน GNOME
- อ่าน #General Notes
- พิมพ์ "rm -f $HOME/.config/menus/applications.menu" ใน Terminal
- อ่าน Ubuntu:Edgy/TipsAndTricks#How to refresh GNOME panel
วิธีการรีเฟรช Places ใน Gnome (ในกรณีที่เมาท์ /media/ ใน /etc/fstab แล้วไม่มีอะไรแสดงขึ้นมา)
- อ่าน #General Notes
sudo /etc/init.d/dbus restart
วิธีการเชื่อมต่อ wireless LAN (WLAN)แบบ static (ไม่ใช่ dhcp) (KDE)
- I assume you have successfully consumed WLAN connection in Windows
- สมมุติว่าคุณสามารถใช้ WLAN ใน Windows ได้
- ใหตั้งค่าอุปกรณ์เน็ทเวิร์คโดยทำตามวิธีดังนี้
- ไปยัง K-menu -> System Settings -> Network Settings
- ตั้งค่าให้เป็น Administrator mode
- ให้เลือกแทป Network Interfaces และไปยัง wireless interface (ส่วนใหญ่จะเป็น ath0) เพื่อทำการตั้งค่า
- คลิก Configure Interface...
- ตรง Choose Manual or Automatic. ให้เลือก Manual
- ให้ใส่ IP address ที่ต้องการลงไป และให้มัน activate เมื่อเริ่มการใช้คอมพิวเตอร์ทุกครั้ง
- ไปยัง Advanced Settings เพื่อตั้งคุณสมบัติอื่นๆ
- เลือกแทป Routes เพื่อที่จะใส่ Gateway IP address
- ให้ทำการเลือกรายชื่ออุปกรณ์เน็ทเวิร์คให้ถูกต้อง (เช่น ath0)
- คลิก apply เพื่อบันทึกการเปลี่ยนแปลง
- To choose wireless connection please follow the following steps
- Go to K-menu -> Internet -> Wireless Assistant
- Right click on preferred connection ssid
- Choose and complete fields for Manual connection
- Click Ok
- วิธีการตั้งค่าการเชื่อมต่อ
gksudo gedit /etc/wpa_supplicant.conf
- ใส่โค้ดชุดนี้ไปยังไฟล์ที่ถูกสร้างขึ้นมาใหม่
network={ ssid="YOUR_PREFERRED_CONNECTION_SSID" scan_ssid=1 proto=WPA key_mgmt=WPA-PSK psk="STRING_TO_GENERATE_PASSWORD" #psk=123456789 #you have option to use connection key instead of connection password }
- ทำการบันทึกข้อมูล
- สร้าง script เพื่อทำการเชื่อมต่อให้ง่ายขึ้น
gksudo gedit /etc/init.d/wifi_wpa.sh
- ใส่โค้ดชุดนี้ไปยังไฟล์ที่ถูกสร้างขึ้นมาใหม่
#! /bin/sh # wifi: wpa_supplicant init echo " * [Wifi]: Enabling WPA supplicant..." if [ -x /sbin/wpa_supplicant ]; then /sbin/wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf -D madwifi -w fi exit 0
- ทำการบันทึกข้อมูล
- ตรวจดูว่าไฟล์ทั้งสองนี้ readable และ executable
sudo chmod +r /etc/wpa_supplicant.conf sudo chmod +x /etc/init.d/wifi_wpa.sh
- วิธีทำให้การเชื่อมต่อแบบ wireless เริ่มทำงานเมื่อเปิดคอมพิวเตอร์
sudo ln -s /etc/init.d/wifi_wpa.sh /etc/rcS.d/S40netwifiwpa
- ปิดโปรแกรมทุกๆ ตัว และทำการรีบู๊ทคอมพิวเตอร์
วิธีการตั้งรีโซลูชันขนาด 1400x1050
- อ่าน http://ubuntu.vdb-studios.be/installationDapper.php
การอัพเกรด อูบุนตู
วิธีการอัพเกรด Feisty Fawn ไปสู่ Gutsy Gibbons
- ปัจจุบันนี้อูบุนตูยังเป็นเวอร์ชั่น 7.04 อยู่ Gusty Gibbons ยังไม่ออก ขอให้สนุกกับ Feisty ไปพลางๆ ก่อน