วันพุธที่ 1 กันยายน พ.ศ. 2553

สิ่งที่ต้องทำหลังติดตั้ง Ubuntu 10.04

It has become a tradition with my to do lists. This time, it’s for “Lucid Lynx”, the new Ubuntu release from Canonical. And yep it’s better than the previous version “Karmic Koala”. There have been some drastic changes in the UI and under the hood. Lucid Lynx, out of box, is faster, more social, cloud integrated…basically it feels like an operating system you would want to use today. So without wasting any more word let’s get on with the list :) :

1 – Expand the Software Repository List

First of all, lets make Ubuntu “see” more packages. Go to the terminal and edit your sources.list with :

sudo gedit /etc/apt/sources.list

Here is the content of my sources.list which I think is quite complete to have all the necessary applications you could ever need. So delete the whole content of your sources list and replace it with the content of mine

Save it. Now import the necessary repositories keys to avoid “aptitude” crying about some missing keys, go to the terminal and type:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com DCF9F87B6DFBCBAE F9A2F76A9D1A0061 A040830F7FAC5991 2EBC26B60C5A2783

Get your system up to date with :

sudo aptitude update && sudo aptitude full-upgrade

Now all your programs will run on the last version.

2 – Anti-Virus

Windows equivalent : AVG AntiVirus, NAV, TrendMicro, F-Prot, Kaspersky, …

Ubuntu equivalent : ClamAV, Avast

ClamAV

sudo aptitude install clamav clamtk

Access it through System Tools → Virus Scanner .

Avast

wget http://files.avast.com/files/linux/avast4workstation_1.3.0-2_i386.deb && sudo dpkg -i avast4workstation_1.3.0-2_i386.deb

Access it through Accessories → avast! Antivirus .

3 – Essential tools for compiling from sources

sudo aptitude install build-essential checkinstall cdbs devscripts dh-make fakeroot libxml-parser-perl check avahi-daemon

4 – Java runtime environment

Java is a very important thing to install, now that many programs like Azureus need it to run. So type:

sudo aptitude install sun-java6-jre sun-java6-plugin equivs

6 – Multimedia

Windows equivalent : windows media player, real player, vlc, mplayer

Ubuntu equivalent : vlc, mplayer, helix player

To have Ubuntu playing all kinds of stuff, you need to install many codecs. So on the Terminal, type:

* Installing vlc and mplayer (plays almost everything):

sudo aptitude install vlc mplayer

* Common packs

sudo aptitude install non-free-codecs libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg libmp4v2-0 totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs libmpcdec3 libquicktime1 flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-dev

* Gstreammer 0.10

sudo aptitude install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-gnonlin gstreamer0.10-pitfdll gstreamer0.10-sdl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-schroedinger gstreamer0.10-plugins-ugly-multiverse totem-gstreamer

* More programs

sudo aptitude install gstreamer-dbus-media-service gstreamer-tools ubuntu-restricted-extras

* Enable dvd support

sudo aptitude install libdvdcss2 && sudo /usr/share/doc/libdvdread4/./install-css.sh

* Flash

sudo aptitude install gsfonts gsfonts-x11 flashplugin-nonfree

7. Tweak your eyecandy

Ubuntu 10.04 comes with compiz fusion effects OOTB but doesn’t offer a way to customize them.

In a terminal copy/paste this:

sudo aptitude install simple-ccsm

Now navigate to System → Preferences → Simple CompizConfig Settings Manager .

8 – Missing Windows software?? Run Windows softwares in Linux!!!

Run Windows Applications such as 7zip, Google Sketchup, AutoCAD, Dreamwaver, Flash MX, Fireworks MX, IE6, IE7, Safari, Itunes, Windows Media Player and many more…

Play Windows Games in Linux like Age Of Empires, Call Of Duty, Diablo, Fear, Fallout, Far Cry, Grand Theft Auto, Half Life, Halo, Hitman, Max Payne, Need For Speed, Prince Of Persia, Sim City Star Wars, The Simsworld of warcraft , Tomb Raider, Warcraft, World Of Warcraft, Counterstrike and many other can be played.

Install Playonlinux. It’s based on wine. Wine is a compatibility layer for running Windows programs in Linux.

sudo aptitude install wine playonlinux

9 – Clipboard Management

By Default in ubuntu when u copy something from an application and closes the application u will not be able to access it from the clipboard. And also when u copy severals text in serial u only have the last on available to you in the clipboard. To solve that install either of the following but Glipper is better because it supports plugins.

Glipper

sudo aptitude install glipper

Then right click ur panel → Add to Panel then drag Clipboard Manager to ur panel

Parcellite

sudo aptitude install parcellite

10 – Archiver/ Packing software

Windows equivalent : winrar, zip, 7zip

Ubuntu equivalent : tar, unrar, p7zip, arj, unace

It’s bad when you don’t have Internet on your computer/notebook, but you have to pack/unpack something but the file format isn’t recognized by the system. To prevent from this bad situation, you can install a bunch of packing software by typing this on the terminal:

sudo aptitude install unace rar unrar zip unzip p7zip-full p7zip-rar sharutils uudeview mpack lha arj cabextract file-roller

11 – Graphical web browser

Windows equivalent : Internet explorer, firefox, opera

Ubuntu equivalent : Firefox, opera, chromium

Opera

sudo aptitude install opera

Firefox (installed by default intrepid)

sudo aptitude install firefox

Chromium (open source equivalent of Google Chrome)

sudo aptitude install chromium-browser chromium-browser-l10n

12 – Download Manager

Windows equivalent : Free download manager

Ubuntu equivalent : Multiget

MultiGet is a http/ftp downloader with a nice GUI for linux desktop users. It can run on almost all desktops without any configuration. It has many powerful functions comparing to others.

sudo aptitude install multiget

Access it through Applications → Internet → MultiGet .

13 – Graphical Email client

Windows equivalent : Outlook

Ubuntu equivalent : Evolution, Thunderbird

Evolution (installed by default in lucid)

sudo aptitude install evolution

Access it through Applications → Internet → Evolution Mail .

Thunderbird

sudo aptitude install thunderbird

Access it through Applications → Internet → Mozilla Thunderbird Mail/News .

14 – Instant Messanging protocal clients

Windows equivalent : MSN messenger, Yahoo messenger, QQ, AIM, Gtalk, ICQ,IRC

Ubuntu equivalent : Empathy, Pidgin, emesene

Empathy IM Client (installed by default)

Add the related launchpad repository :
sudo add-apt-repository ppa:telepathy/ppa && sudo aptitude update

Then install it by running the following :
sudo aptitude install empathy telepathy-mission-control-5 telepathy-gabble telepathy-butterfly telepathy-haze telepathy-idle telepathy-salut telepathy-sofiasip libtelepathy-farsight0 python-tpfarsight galago-eds-feed python-galago python-galago-gtk msn-pecan

Access it through Applications → Internet → Empathy IM Client .

Pidgin

Pidgin is an easy to use and free chat client used by millions. Connect to AIM, MSN, Yahoo, and more chat networks all at once. Supported chat networks: AIM, Bonjour, Gadu-Gadu, Google Talk, Groupwise, ICQ, IRC, MSN, MySpaceIM, QQ, SILC, SIMPLE, Sametime, XMPP, Yahoo!, Zephyr

Add the launchpad repository :
sudo add-apt-repository ppa:pidgin-developers/ppa && sudo aptitude update

Then install it :
sudo aptitude install pidgin pidgin-data pidgin-lastfm pidgin-guifications msn-pecan pidgin-musictracker pidgin-plugin-pack pidgin-themes

Access it through Applications → Internet → Pidgin Internet Messenger .

Emesene only for MSN Messenger.

Add the launchpad repository :
sudo add-apt-repository ppa:bjfs/ppa && sudo aptitude update

Then install it :
sudo aptitude install emesene

Access it through Applications → Internet → Emesene .

15 – VOIP

Windows equivalent : skype

Ubuntu equivalent : skype

Skype

sudo aptitude install skype

Access it through Applications → Internet → Skype.

16 – Viewing PDF files

Windows equivalent : Adobe Reader

Ubuntu equivalent : Adobe Reader

Adobe Reader

sudo aptitude install acroread acroread-fonts

Access it through Applications → Office → Adobe Reader.

17– Adobe Air

wget http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin
chmod +x ./AdobeAIRInstaller.bin

sudo ./AdobeAIRInstaller.bin

Access it through Applications → Accessories → Adobe Air Application Installer.

18 – Music / MP3 / OGG Players

Windows equivalent : iTunes, Winamp

Ubuntu equivalent : Rhythmbox, Banshee, Amarok

Rhythmbox

sudo aptitude install rhythmbox

Access it through Applications → Sound & Video → Rhythmbox Music Player.

Banshee

sudo aptitude install banshee banshee-extension-ubuntuonemusicstore libappindicator0-cil banshee-extension-appindicator banshee-extension-lyrics banshee-extension-mirage

Access it through Applications → Sound & Video → Banshee Media Player.

Amarok

sudo aptitude install amarok amarok-common

Access it through Applications → Sound & Video → Amarok.

19– Hard Disk Partitions Manager

Windows equivalent : Symanted Partition Magic

Ubuntu equivalent : GParted

GParted

sudo aptitude install gparted ntfsprogs menu ntfs-config

Access it through System → Administration → Partition Editor.

20 – Vector Graphics Editor

Windows equivalent : Adobe Illustrator

Ubuntu equivalent : Inkscape

Inkscape

sudo aptitude install inkscape

Access it through Applications → Graphics → Inkscape Vector Graphics Editor.

21 – Image Editor

Windows equivalent : Adobe Photoshop, Paint.Net

Ubuntu equivalent : GIMP

GIMP

Add the launchpad repository :
sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn && sudo aptitude update

Then install it with the following command :
sudo aptitude install gimp gimp-data gimp-plugin-registry gimp-data-extras

Access it through Applications → Graphics → GIMP Image Editor.

PINTA

Add the launchpad repository :
sudo add-apt-repository ppa:moonlight-team/pinta && sudo aptitude update

Then install it with the following command :
sudo aptitude install pinta

Access it through Applications → Graphics → Pinta Image Editor.

22 – 3D Graphics Applications

Windows equivalent : 3D Studio MAX

Ubuntu equivalent : Blender

Blender

sudo aptitude install blender

Access it through Applications → Graphics → Blender (windowed).

23 – Simple Yet Advanced Text Editor

Windows equivalent : Notepad ++

Ubuntu equivalent : GEdit

GEdit

sudo aptitude install gedit gedit-plugins

Access it through Applications → Accessories → Text Editor.

24 – Office Applications

Windows equivalent : Microsoft Office

Ubuntu equivalent : OpenOffice

OpenOffice

sudo aptitude install openoffice.org

Access it through Applications → Office

25 – Microsoft Visio

Windows equivalent : Microsoft Visio

Ubuntu equivalent : Dia

Dia

sudo aptitude install dia

Access it through Applications → Graphics → Dia Diagram Editor

26 – Microsoft Project

Windows equivalent : Microsoft Project

Ubuntu equivalent : OpenProj

OpenProj

wget http://nchc.dl.sourceforge.net/sourceforge/openproj/openproj_1.4-2.deb && sudo dpkg -i openproj_1.4-2.deb

Access it through Applications → Office → OpenProj

27 – Development IDE

Windows equivalent : Dreamweaver

Ubuntu equivalent : Quanta, Kompozer, NetBeans

Quanta

sudo aptitude install quanta

Access it through Applications → Programming → Quanta Plus

Komposer

sudo aptitude install kompozer nvu

Access it through Applications → Internet → Kompozer

NetBeans

sudo aptitude install netbeans

Access it through Applications → Programming → NetBeans IDE

28 – Source Control Management

Windows equivalent : TortoiseSVN

Ubuntu equivalent : RabbitVCS

RabbitVCS

Add the launchpad repository :
sudo add-apt-repository ppa:rabbitvcs/ppa && sudo aptitude update

Then install it :
sudo aptitude install rabbitvcs-nautilus
killall nautilus

Right Click on any folder or file and access the RabbitVCS submenu

29 – Graphical FTP clients

Windows equivalent : CuteFTP, SmartFTP

Ubuntu equivalent : FileZilla

FileZilla

This is great FTP program, very complete, in my opinion, the best one for linux.

On the terminal type:

sudo aptitude install filezilla filezilla-common

Access it through Applications → Internet → FileZilla FTP Client.

30 – P2P Clients / Servers, File Sharing

Windows equivalent : utorrent, azureus, emule

Ubuntu equivalent : Deluge, azureus, amule

Bittorent clients

Deluge (written in python)

Add the launchpad repository :
sudo add-apt-repository ppa:deluge-team/ppa && sudo aptitude update

Then install it :
sudo aptitude install deluge-torrent

Access it through Applications → Internet → Deluge Torrent.

Azureus: Uses Java to run, very complete but a bit heavy

sudo aptitude install azureus

Access it through Applications → Internet → Azureus.

Emule Donkey Clients

Amule

Add the launchpad repository :
sudo add-apt-repository ppa:happyaron/amule-dlp && sudo aptitude update

Then install it with the following command :
sudo aptitude install amule-dlp amule-dlp-gnome-support amule-dlp-utils-gui amule-dlp-daemon

Access it through Applications → Internet → aMule.

31 – Programs for CD burning with GUI

Windows equivalent : Nero, Roxio Easy CD Creator

Ubuntu equivalent : K3b, Brasero

K3b

Nero is available for linux,but its not free.A trial is available for 1 month usage and later it asks or activation code.But K3B is as good as Nero.Have a good feature set as Nero.

sudo aptitude install k3b k3b-data libk3b6

Access it through Applications → Sound & Video → K3B.

Brasero (installed by default in Lucid)

sudo aptitude install brasero

Access it through Applications → Sound & Video → Brasero Disc Burning .

32 – Mountings ISO files

Windows equivalent : Alcohol

Ubuntu equivalent : acetoneiso

Acetoneiso

The best one for linux ACETONEISO, which is similar to ALCOHOL in windows

its supports almost all formats. AcetoneISO is CD/DVD image manipulator for Linux.Using this tool it is very easy to Mount and Unmount ISO,MDF,NRG Images . I dont think its available in ubuntu repository.

sudo aptitude install libksba8 libenca0 libtwolame0 fuseiso kommander p7zip-full gnupg-agent gnupg2 pinentry-qt mencoder cdrdao && wget http://darkstar.ist.utl.pt/getdeb/ubuntu/jaunty/ac/acetoneiso_2.1.1-1~getdeb1_i386.deb && sudo dpkg -i acetoneiso_2.1.1-1~getdeb1_i386.deb

33 – Install Vista like gadgets.

Windows equivalent : Vista Sidebar

Ubuntu equivalent : google-gadgets

Google gadgets

sudo aptitude install google-gadgets-gtk

This will complete the installation.

Now press Alt+F2, and type “ggl-gtk” to start them. You should see a small icon show up in your system tray, and a sidebar. Right click on any of them and select ‘Add Gadgets’ to show a menu. If you’d like to have Google Gadgets start automatically, go to System – Preferences – Session, click ‘Add’, paste ‘Google Gadgets’ for the name and ‘ggl-gtk’ for the command. Click OK and Close, and you’re good to go.

34 – Google Desktop

Google Desktop allows one to full text search of a user’s e-mail, computer files, music, photos, chat, and Web pages viewed,OpenOffice documents , PDF files and more .

Now similar tools already existed on Linux like beagle (supported by novell ) , meta tracker etc . However Google Desktop search is not based on any of these tools and uses its proprietary algorithms to search for files on the computer ,also being 1.0 release and more stable then these products it could be preferred over tools like beagle .

To install Google Desktop Search type the following command in the terminal window : -

sudo aptitude install google-desktop-linux

Access it through Applications → Google Desktop → Google Desktop

Now after choosing appropriate option through Applications → Google Desktop → Google Desktop Preferences, you would find Google Desktop icon in the bar at the top of the screen , now it would automatically scan and index files on computer and store it in local database which could be searched using web browser .

35 – Photo Management

Google Picasa

Google Picasa is an extremely professional good looking photo management application available on Windows ,Linux and Mac OS. Now Google Picasa has a number of features that many photo management software on Linux dont have further Google Picasa looks very user friendly as compared to similar open source application available on linux . Now Google Picasa for Linux is not a native linux application but runs on Linux thru application layer called wine which allows many windows application to run flawlessly on Linux.

Now to install Google – Picasa type the following command in the terminal window

wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_3.0-current_i386.deb && sudo dpkg -i picasa_3.0-current_i386.deb

Access it through Applications → Graphics → Picasa → Picasa

36 – Map Viewing and Management

Google Earth

To install Google Earth type the following command in the Terminal Window.

sudo aptitude install googleearth

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

Now you can launch Google Earth from Application → Internet → Google Earth

37 – Gmail Notification

Checkgmail

If you would like to get notified when you have a new mail in your google mail account, checkgmail is for you. To install Checkgmail type the following command in the Terminal Window.

sudo aptitude install checkgmail

Now you can launch it from Application → Internet → CheckGmail

38 – Configure Firewall
If you are concern about your security, then it is pertinent that you activate the firewall and prevent any unauthorized access to your computer.

UFW is installed by default, but if you need a graphical interface, install GUFW.

sudo aptitude install gufw

39– Gnome Do

Gnome Do is a small application that allows you to search and do things faster and more efficiently in your Ubuntu machine. It is similar to QuickSilver in Mac and Launchy in Windows. For those who have not tried Gnome Do before, it might take some time for you to get used to it. But once you’re hooked to it, there will be no turning back for you.Gnome Do also comes with a dock interface that you can use it like any other docks.

sudo aptitude install gnome-do

Now you can launch it from Application → Accessories → Gnome Do

40 – Ubuntu Tweak

Ubuntu Tweak allows you to tweak your system settings, all in one place. You can install new applications, customize your desktop settings, configure your startup applications, changing the system filetype association and many more tweaks in this single application.

Add the launchpad repository :
sudo add-apt-repository ppa:ubuntu-tweak-testing/ppa && sudo aptitude update

Then install it with the following command :
sudo aptitude install ubuntu-tweak

Then access it through Applications → System Tools → Ubuntu Tweak

App Runner

App Runner is a small open source utility that makes it very easy to run any type of program/executable/script on any distro/OS that uses the nautilus file manager: Debian/Ubuntu/Super OS/Fedora/etc

wget http://hacktolive.org/files/app_runner/App_Runner_0.2.deb && sudo dpkg -i App_Runner_0.2.deb

Then right-click the file -> Scripts -> Run This App or Run This App (root)

ที่มา : http://theindexer.wordpress.com/2010/03/21/to-do-list-after-installing-ubuntu-10-04-aka-lucid-lynx/

วันอังคารที่ 31 สิงหาคม พ.ศ. 2553

ติดตั้ง Grub2

วิธีการ Reinstall GRUB 2 สำหรับ ubuntu 10.04
กรณีติดตั้ง UBUNTU คู่กับ Windows แล้วภายหลังได้ติดตั้ง Windows ใหม่จะทำให้ไม่สามารถบู๊ตเข้า UBUNTU ได้อีก จึงต้องติดตั้ง GRUB ใหม่ ซึ่งมีวิธีการตามนี้เลยครับ
1. บู๊ตด้วย Boot Ubuntu 10.04 Desktop CD
2.หลังจากเข้าระบบเรียบร้อยแล้วก็ เปิด Terminal ขึ้นมาเลยครับ
3.พิมพ์คำสั่งครับ sudo fdisk -l พาร์ทิชั่นต่างๆก็จะถูกแสดงขึ้นมา ให้ดูไว้ครับ ว่าพาร์ทิชั่นไหนที่มันเป็น Linux

ตัวอย่างของผม

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0b8b4d2d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 7180 57673318+ 7 HPFS/NTFS
/dev/sda2 7181 38914 254897499+ f W95 Ext'd (LBA)
/dev/sda5 7181 23107 127933596 b W95 FAT32
/dev/sda6 23108 31010 63480816 b W95 FAT32
/dev/sda7 31011 38585 60846012+ 83 Linux
/dev/sda8 38586 38914 2634752 82 Linux swap / Solaris

4.พิมพ์ต่อเลยครับ sudo mount /dev/sda7 /mnt (แทนที่ "sda7" ด้วยพาทิชั่นของคุณครับ)
5.จากนั้นสั่งต่อตามนี้ครับ sudo grub-install --root-directory=/mnt/ /dev/sda
6.รอสักพักเสร็จแล้ว Reboot หนึ่งรอบ
7.หลังจาก Reboot แล้ว ปรับปรุงเมนู grub ด้วยคำสั่ง sudo update-grub
เสร็จแล้วครับ
อ้างอิงจาก : https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

เครดิตจาก http://phaa-love-ubuntu.blogspot.com/2010/06/reinstall-grub-2-ubuntu-1004.html
วิธีการ Reinstall GRUB 2 สำหรับ ubuntu 10.04
กรณีติดตั้ง UBUNTU คู่กับ Windows แล้วภายหลังได้ติดตั้ง Windows ใหม่จะทำให้ไม่สามารถบู๊ตเข้า UBUNTU ได้อีก จึงต้องติดตั้ง GRUB ใหม่ ซึ่งมีวิธีการตามนี้เลยครับ
1. บู๊ตด้วย Boot Ubuntu 10.04 Desktop CD
2.หลังจากเข้าระบบเรียบร้อยแล้วก็ เปิด Terminal ขึ้นมาเลยครับ
3.พิมพ์คำสั่งครับ sudo fdisk -l พาร์ทิชั่นต่างๆก็จะถูกแสดงขึ้นมา ให้ดูไว้ครับ ว่าพาร์ทิชั่นไหนที่มันเป็น Linux

ตัวอย่างของผม

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0b8b4d2d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 7180 57673318+ 7 HPFS/NTFS
/dev/sda2 7181 38914 254897499+ f W95 Ext'd (LBA)
/dev/sda5 7181 23107 127933596 b W95 FAT32
/dev/sda6 23108 31010 63480816 b W95 FAT32
/dev/sda7 31011 38585 60846012+ 83 Linux
/dev/sda8 38586 38914 2634752 82 Linux swap / Solaris

4.พิมพ์ต่อเลยครับ sudo mount /dev/sda7 /mnt (แทนที่ "sda7" ด้วยพาทิชั่นของคุณครับ)
5.จากนั้นสั่งต่อตามนี้ครับ sudo grub-install --root-directory=/mnt/ /dev/sda
6.รอสักพักเสร็จแล้ว Reboot หนึ่งรอบ
7.หลังจาก Reboot แล้ว ปรับปรุงเมนู grub ด้วยคำสั่ง sudo update-grub
เสร็จแล้วครับ
อ้างอิงจาก : https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

เครดิตจาก http://phaa-love-ubuntu.blogspot.com/2010/06/reinstall-grub-2-ubuntu-1004.html

ติดตั้ง cairo-dock บน Ubuntu 10.04

To try it:
---------
If you're under Ubuntu >= 9.04 :
sudo add-apt-repository ppa:cairo-dock-team/weekly
sudo apt-get update
sudo apt-get install cairo-dock cairo-dock-plug-ins

otherwise :
echo "deb http://ppa.launchpad.net/cairo-dock-team/weekly/ubuntu $(lsb_release -sc) main ## Cairo-Dock-PPA-Weekly" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E80D6BF5
sudo apt-get update
sudo apt-get install cairo-dock cairo-dock-plug-ins

วันจันทร์ที่ 30 สิงหาคม พ.ศ. 2553

Update Ubuntu ผ่าน command line

sudo apt-get update
sudo apt-get dist-upgrade

วันพุธที่ 25 สิงหาคม พ.ศ. 2553

PHP กับ SQL เหมือนกิ่งทองใบหยก อ่านซะ สุดยอดครับท่าน
http://www.w3schools.com/sql/

วันจันทร์ที่ 23 สิงหาคม พ.ศ. 2553

บทความมากมายเกี่ยวกับ Syslog-ng มีได้ไม่อั้น ด้านล่างเลย

http://www.syslog.org/wiki/Syslog-ng/HowToGuides

ว่าง ๆ ก่อน จะแปล

วันศุกร์ที่ 6 สิงหาคม พ.ศ. 2553

สองมือน้อยจัดการ Ultrasurf จอมป่วน

หลาย ๆ admin คงปวดหัวกับลูกข่ายที่ใช้ ultrasurf เพื่อปลดล็อก policy ของเรา แต่วันนี้เราจัดการได้ครับอาจจะไม่ร้อยเปอรฺ์เซ็น แต่ก็สร้างความอึดและอัดแก้ผู้ที่ใช้โปรแกรมนี้จนไม่อยากใช้ไปเลยครับ ต้องขอขอบพระคุณ คุณยิม (จาก http://www.thaibsd.com)

A lot of administrators have faced many problems with "Ultrasurf" software which is always breaks our policy. Now I have solution to solve this problem. If you are ones who have problem like this, bring this command to your system.

route add -net 65.49.2.0/24 10.0.0.2

10.0.0.2 ผมเปลี่ยนเป็น IP ของ Lan Card ใบที่ 1 ครับ
number 10.0.0.2 I change to be my first lan card's IP

คำสั่งสั้น ๆ แต่มากด้วยอานุภาพขอบอก เสร็จแล้วก็จิบกาแฟอย่างสบายอารมณ์ 5555555
Now, with this power of command you can take a cup of coffee and don't worry about that again.

วันพฤหัสบดีที่ 22 กรกฎาคม พ.ศ. 2553

Config Apache

ServerSignature Off
ServerTokens Prod


The first one, ServerSignature Off tells apache not to display the server version on error pages, or other pages it generates.
บรรทัดแรก ServerSignature Off บอก Apache ไม่ให้แสดงรุ่นของ Apache ในหน้าที่ผิดพลาด หรือหน้าอื่นๆ ที่ตัว Apache สร้างขึ้น

The second one ServerTokens Prod tells apache to only return Apache in the Server header, returned on every page request.


ที่มา : http://www.petefreitag.com/item/419.cfm

วันอังคารที่ 13 กรกฎาคม พ.ศ. 2553

Chillispot แบบ fixed ip

บทความทั้งหมดมาจาก
http://manajung.blogspot.com/2010/01/chillispot-fix-ip-static-ip-address.html
ขอบคุณครับ

Chillispot แบบ fixed ip (Static IP address) และแบบ DHCP
มีหลายคนเข้าใจผิด คิดว่า Chillispot ทำงานกับเครื่องลูกที่ถูก fixed IP ไม่ได้

-ubuntu 8.0.4
-chillispot 1.0
-freeradius 1.1.7
-phpmyprepaid 0.4 RC3


#nano /etc/chillispot.conf -------------ตามนี้

###########################################
#
# Sample ChilliSpot configuration file
#
##########################################

# TAG: fg
# Include this flag if process is to run in the foreground
#fg

# TAG: debug
# Include this flag to include debug information.
#debug

# TAG: interval
# Re-read configuration file at this interval. Will also cause new domain
# name lookups to be performed. Value is given in seconds.
#interval 3600

# TAG: pidfile
# File to store information about the process id of the program.
# The program must have write access to this file/directory.
#pidfile /var/run/chilli.pid

# TAG: statedir
# Directory to use for nonvolatile storage.
# The program must have write access to this directory.
# This tag is currently ignored
#statedir ./


# TUN parameters

# TAG: net
# IP network address of external packet data network
# Used to allocate dynamic IP addresses and set up routing.
# Normally you do not need to uncomment this tag.
net 10.0.134.0/24

# TAG: dynip
# Dynamic IP address pool
# Used to allocate dynamic IP addresses to clients.
# If not set it defaults to the net tag.
# Do not uncomment this tag unless you are an experienced user!

dynip 10.0.134.16/25

# TAG: statip
# Static IP address pool
# Used to allocate static IP addresses to clients.
# Do not uncomment this tag unless you are an experienced user!
statip 10.0.134.0/28


# TAG: dns1
# Primary DNS server.
# Will be suggested to the client.
# If omitted the system default will be used.
# Normally you do not need to uncomment this tag.
#dns1 192.168.0.101

# TAG: dns2
# Secondary DNS server.
# Will be suggested to the client.
# If omitted the system default will be used.
# Normally you do not need to uncomment this tag.


# TAG: domain
# Domain name
# Will be suggested to the client.
# Normally you do not need to uncomment this tag.
#domain tfh.com,192.168.0.101

# TAG: ipup
# Script executed after network interface has been brought up.
# Executed with the following parameters:
#
# Normally you do not need to uncomment this tag.
#ipup /etc/chilli.ipup

# TAG: ipdown
# Script executed after network interface has been taken down.
# Executed with the following parameters:
#
# Normally you do not need to uncomment this tag.
#ipdown /etc/chilli.ipdown

# Radius parameters

# TAG: radiuslisten
# IP address to listen to
# Normally you do not need to uncomment this tag.
#radiuslisten 127.0.0.1

# TAG: radiusserver1
# IP address of radius server 1
# For most installations you need to modify this tag.
radiusserver1 127.0.0.1

# TAG: radiusserver2
# IP address of radius server 2
# If you have only one radius server you should set radiusserver2 to the
# same value as radiusserver1.
# For most installations you need to modify this tag.
radiusserver2 127.0.0.1

# TAG: radiusauthport
# Radius authentication port
# The UDP port number to use for radius authentication requests.
# The same port number is used for both radiusserver1 and radiusserver2.
# Normally you do not need to uncomment this tag.
#radiusauthport 1812

# TAG: radiusacctport
# Radius accounting port
# The UDP port number to use for radius accounting requests.
# The same port number is used for both radiusserver1 and radiusserver2.
# Normally you do not need to uncomment this tag.
#radiusacctport 1813

# TAG: radiussecret
# Radius shared secret for both servers
# For all installations you should modify this tag.
radiussecret sharedsecret

# TAG: radiusnasid
# Radius NAS-Identifier
# Normally you do not need to uncomment this tag.
#radiusnasid nas01

# TAG: radiuslocationid
# WISPr Location ID. Should be in the format: isocc=,
# cc=,ac=,network=
# Normally you do not need to uncomment this tag.
#radiuslocationid isocc=us,cc=1,ac=408,network=ACMEWISP_NewarkAirport

# TAG: radiuslocationname
# WISPr Location Name. Should be in the format:
# ,
# Normally you do not need to uncomment this tag.
#radiuslocationname ACMEWISP,Gate_14_Terminal_C_of_Newark_Airport


# Radius proxy parameters

# TAG: proxylisten
# IP address to listen to
# Normally you do not need to uncomment this tag.
#proxylisten 10.0.0.1

# TAG: proxyport
# UDP port to listen to.
# If not specified a port will be selected by the system
# Normally you do not need to uncomment this tag.
#proxyport 1645

# TAG: proxyclient
# Client(s) from which we accept radius requests
# Normally you do not need to uncomment this tag.
#proxyclient 10.0.0.1/24

# TAG: proxysecret
# Radius proxy shared secret for all clients
# If not specified defaults to radiussecret
# Normally you do not need to uncomment this tag.
#proxysecret testing123


# DHCP Parameters

# TAG: dhcpif
# Ethernet interface to listen to.
# This is the network interface which is connected to the access points.
# In a typical configuration this tag should be set to eth1.
dhcpif eth1
GNU nano 2.0.7 File: /etc/chilli.conf


# TAG: dhcpmac
# Use specified MAC address.
# An address in the range 00:00:5E:00:02:00 - 00:00:5E:FF:FF:FF falls
# within the IANA range of addresses and is not allocated for other
# purposes.
# Normally you do not need to uncomment this tag.
#dhcpmac 00:00:5E:00:02:00

# TAG: lease
# Time before DHCP lease expires
# Normally you do not need to uncomment this tag.
#lease 600


# Universal access method (UAM) parameters

# TAG: uamserver
# URL of web server handling authentication.
uamserver https://10.0.134.1/cgi-bin/hotspotlogin.cgi

# TAG: uamhomepage
# URL of welcome homepage.
# Unauthenticated users will be redirected to this URL. If not specified
# users will be redirected to the uamserver instead.
# Normally you do not need to uncomment this tag.
uamhomepage http://10.0.134.1/welcome.html

# TAG: uamsecret
# Shared between chilli and authentication web server
uamsecret sharedsecret

# TAG: uamlisten
# IP address to listen to for authentication requests
# Do not uncomment this tag unless you are an experienced user!
uamlisten 10.0.134.1

# TAG: uamport
# TCP port to listen to for authentication requests
# Do not uncomment this tag unless you are an experienced user!
#uamport 3990


# TAG: uamallowed
# Comma separated list of domain names, IP addresses or network segments
# the client can access without first authenticating.
# It is possible to specify this tag multiple times.
# Normally you do not need to uncomment this tag.
uamallowed www.chillispot.org,10.10.134.0/24

# TAG: uamanydns
# If this flag is given unauthenticated users are allowed to use
# any DNS server.
# Normally you do not need to uncomment this tag.
uamanydns


# MAC authentication

# TAG: macauth
# If this flag is given users will be authenticated only on their MAC
# address.
# Normally you do not need to uncomment this tag.
macauth

# TAG: macallowed
# List of MAC addresses.
# The MAC addresses specified in this list will be authenticated only on
# their MAC address.
# This tag is ignored if the macauth tag is given.
# It is possible to specify this tag multiple times.
# Normally you do not need to uncomment this tag.
#macallowed 00-0F-B0-D4-AF-2A

# TAG: macpasswd
# Password to use for MAC authentication.
# Normally you do not need to uncomment this tag.
macpasswd passwd

# TAG: macsuffix
# Suffix to add to MAC address in order to form the username.
# Normally you do not need to uncomment this tag.
#macsuffix suffix
---------------------------------------------------------
จบแกรแก้ไขไพล์

Fix IP ที่เครื่อง Client เป็น 10.0.134.15
netmask 255.255.255.0
gateway 10.0.134.1
dns x.x.x.x (แล้วแต่จะใช้)

และ เพิ่ม account ใน phpmyprepaid แบบ Subscription Time Account
ตรง username ให้ใส่ Mac address เช่น 00-13-D4-68-9C-88
ตรงช่อง password ให้ใส่ password อันเดียวกับ ที่บรรทัด macpasswd ในที่นี้คือ passwd

เพิ่มข้อมูล ใน Database
#mysql -u root -p
mysql>insert into radreply (username,attribute,op,value) values('00-13-D4-68-9C-88','Framed-IP-Address',':=','10.0.134.15');

mysql>INSERT INTO radcheck (username, attribute, value) VALUES ("00-13-D4-68-9C-88", "Auth-Type", "Accept");

mysql>quit;

นำ Client มาเสียบสาย LAN แล้วลองเปิดเวบดูนะครับ
ไม่ต้องกรอกข้อมูลหน้า login ใช้เน็ตได้เลย

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

เทคนิค Squid 3.0 อนุญาตเฉพาะ mac address ที่ลงทะเบียน

ความเป็นมาคือ ให้นักเรียนใช้ระบบ Authetication ผ่าน Radius ส่วนครูและบุคลากรทางการศึกษาใช้แบบอิสระ(ไม่ต้องใส่รหัส) อยูบนเครือข่ายเดียวกัน วันดีคืนดี ก็มีคน(นักเรียน)มา Fix IP ใช้เน็ต เลยหาทางแก้ไข ถ้า Block IP เขาก็เปลี่ยนไปใช้ตัวอื่นอีก เลยคิดว่าน่าจะลงทะเบียนเครื่องแล้วเก็บ Mac Address ไว้ แล้วอนุมัติให้เฉพาะ Mac Address เหล่านี้เท่านั้นที่ใช้เน็ตได้ ที่เหลือให้ปฏิเสธ หาอยู่นานจนได้อย่างนี้

acl Member arp "/etc/memberlist.lst" # กำหนด acl ชื่อ Member โดย List ของ Mac Address อยู่ที่ไฟล์ใน /etc/memberlist.lst
http_access deny !Member #ให้ปฏิเสธการเชื่อมต่อของ Mac Address ที่ไม่ตรงกับ acl Member

ก็ได้ผลเป็นที่น่าพอใจ ลองใช้เครื่องอื่น ๆ Fix IP มา ปรากฎว่าเชื่อมต่อได้ แต่เมื่อเปิดเว็บ โช๊ะเด๊ะ ติด Squid ซะงั้น เฮ้อ โล่งอกไปที หลังจากหาวิธีป้องกันคนนอกมาใช้เครือข่ายตั้งนาน

อาจจะมีนักเรียนที่เก่ง(น้อยมากแต่ป้องกันไว้ก่อน) แอบใช้ซอร์ฟแวร์บางชนิดเพื่อทะลุ block ของ squid ที่นิยมใช้คือ ultrasurf อันนี้ก็แก้ไขได้ ดูในส่วนของ security แล้วกัน คุณ yim แนะนำไว้ เจ๋งมากๆ

ที่เป็นตัวฉัน

รูปภาพของฉัน
เรียนภาษาอังกฤษมา แต่ชีวิตผกผันให้ต้องมาเป็น admin ซะนี่ เล่นเอาซะมึน และงงตามลำดับ คิดอย่างเดียวว่า เป็นอะไรเป็นได้ถ้าใจอยากเป็น อุปสรรคคือแบบฝึกหัด ท้อแต่ไม่เคยถอย คิดไว้เสมอ ความพยายามอยู่ที่ไหน ความสำเร็จอยู่ที่นั่น ถ้าพยายามก่อน ก็ชนะแล้ว 50% อีก 50 % ใช้ความสามารถเอาเอง