Restore CentOS top panel

Have you ever messed up top panel of your CentOS?
Here is a way to restore it to it's default.
sudo mv ~/.gconf/apps/panel ~/.gconf/apps/panel.bak
sudo reboot

Disable system beep for CentOS

Here is way to disable the system beep for CentOS
# unloading the pcspkr module: 
rmmod -v pcspkr
In addition, add the following line in /etc/rc.d/rc.local file to automatic disable it during boot.
/sbin/rmmod pcspkr
if you ever want to re-enable the speaker, run the following command:
/sbin/modprobe pcspkr

Copy files between Linux Systems using scp

1. Copy file from a remote server to local server: copy directory pathogenbase from remote server /srv/www/ directory to current working directory

scp -r user_name@remote_ip:/srv/www/pathogenbase/ .
2. Copy file_name from local server to remote server: copy file_name from /srv/www on local server to remote server /srv/www/
scp /srv/www/file_name user_name@remote_ip:/srv/www/
3. If you are copying files between windows and Linux you could use winSCP.

Eclipse and CentOS

1. install
$ sudo yum groupinstall Eclipse
2. configuration

3. install Django
$sudo pip install django
4. install PyDev: use eclipse install new software feature by adding http://pydev.org/updates

use rdesktop to access windows desktop from CentOS

CentOS comes with rdesktop installed:
run the following command to access your windows desktop:
rdesktop -u user_name -f ip_address
To toggle full screen mode, use
ctrl+alt+enter

Problems and solution


1. While suing this program you may encounter WARNING: Remote desktop does not support colour depth 24; falling back to 16 if your windows system is Windows XP.
To fix the problem go to windows machine:

# go to Start -> Run -> gpedit.msc
# In the Group Policy Editor, navigate to Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Terminal Services, and double-click on the 'Limit maximum Color Depth' object. Set the item to "Enabled" and set "Color Depth" to "24 bit"
2. One other problem you may encounter is: Idle time over and rdesktop closed the connection. To fix this problem:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\terminal services\MaxIdleTime
It was set to 900,000 mSec. or 15-minutes. I increased the value to 10,800,000 or 3-hours.

Dual Head display on CentOS using ATI Radeon HD 3450

Go to official AMD site to download the official linux driver for this video adapter:
1. install the driver:
$ sudo sh ./ati-driver-installer-x86.x86_64.run 
#Here I choose custom installation and opt out Catalyst Control Center.
2. Configure the driver after installation and enable dual head display
$ sudo aticonfig –initial
# if your second display is at the right of your main display
$ sudo aticonfig --initial=dual-head --screen-layout=right

Disbale SELinux on CentOS

Sometimes you want to disbale SELinux on your CentOS machine, here is how:
[sourcecode language="text"]
Edit /etc/sysconfig/selinux  and change SELINUX=disabled
[/sourcecode]

After you disable SELinux, you need reboot your system to make it take effect.

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...