≡ Menu

Tip of the day

Usually, you do not need to setup an email server under Linux desktop operating system. Most GUI email clients (such as Thunderbird) supports Gmail POP3 and IMAP configurations. But, how do you send mail via the standard or /usr/bin/mail user agents or a shell script? Programs such as sendmail / postfix / exim can be configured as a gmail smarthost but they are largely overkill for this use.
[click to continue…]

The tail command is one of the best tool to view log files in a real time using tail -f /path/to/log.file syntax on a Unix-like systems. The program MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). This is one of those dream come true program for UNIX sys admin job. You can browse through several log files at once and do various operations like search for errors and more.
[click to continue…]

Find Out If Your WebSite Blocked In China Or Not

Internet censorship in the People's Republic of China is conducted under a wide variety of laws and administrative regulations. In accordance with these laws, more than sixty Internet regulations have been made by the People's Republic of China (PRC) government, and censorship systems are vigorously implemented by provincial branches of state-owned ISPs, business companies, and organizations.

The Golden Shield Project is part of what is sometimes known outside of mainland China as the Great Firewall of China. It is used to block and filter out many websites. So how do you find out if your website is blocked by the Great Firewall of China?

China Channel Firefox Add-on

You can use China Channel Firefox add-on to find out if your website is blocked or not. You can experience the censored Chinese internet at home. From the project webpage:

The Firefox add-on China Channel offers internet user outside China to surf the web as if they were in China. Take an unforgetable virtual trip to China and experience the technical expertise of the Chinese Ministry of Information Industry (supported by western companies). It's open source, free and easy.

Install China Channel Firefox Add-on

Grab add-on here

Install and restart Firefox.

Click on Tools > China Channel > Manage Proxies To setup proxy > Click on the OK button in the popup window to finalize the installation process.

Fig.01: China Channel Firefox Add-on

Fig.01: China Channel Firefox Add-on

Select "CHINA CHANNEL" and click "GO", you will get connected through a random proxy server in China now.

Fig.02: China Channel Firefox Welcome Screen

Fig.02: China Channel Firefox Welcome Screen

Now can browse net via china based proxy server. Try to visit your website and see if it is blocked or not:

Fig.03: The Great Firewall of China in Action

Fig.03: The Great Firewall of China in Action

Recently, I received a call from client about FTP server not working. Basically, someone was trying to
access networked file system mounts such as cifs and nfs via ftp. This is bad idea and it will result into problems because it is not supported by many applications (I'm not talking about cluster file system here). There are many issues with this kind of weird setup:

+ Permission problem
+ I/O Problem
+ Performance issue etc

Some FTP server do offer work around but I don't recommend exporting networked file system via another file system.

Bottom line, don't mix networked file system with each other.

It happens all the time. Sooner or later, every organization may run out of qualified UNIX system administrator / staff because of various issues. As a single admin you may have to do lots of work because other people in accouting, sales, or programmers may not have all the skills required to run servers. Also, I don't trust new people or people with Windows background. I also don't have a time for UNIX admin training for new person.

In short, to avoid overloading yourself, I recommend sudo. It allows you to delegate authority to give certain users or groups of users the ability to run some commands as root or another user while providing an audit trail of the commands and their arguments via a log file. With sudo you don't have to share root password with anybody. Another option is Pluggable Authentication Modules (PAM) under UNIX / Linux. Command tasks such can be delegated via sudo program:

  1. Start / stop / restart common services and configurations, e.g. Jboss, Tomcat, Apache, Mysql etc
  2. Shutdown / reboot server
  3. Backup data to tape
  4. Run other individuate tasks and commands as per requirements and so on.

Once you started to trust their skills sets, grant them more privileges or may be promote them as full time UNIX sys admins.

In totally unrelated news : Bill Gates, retired as chairman. Checkout the hits and misses of his leadership of Microsoft.

mplayer lacks an option for selecting files in a reverse order. So here is a quick way to playback all mp3 files in reverse order:
$ ls -1 -r *.mp3 > mp3.rev
$ mplayer -playlist mp3.rev

Where,

  • -r reverse order while sorting
  • -1 list one file per line
  • -playlist file : Play files according to a playlist file

Let's hear your shell hack in the comments.

KDE 4 has been released. I've received couple of questions about installing KDE 4 under Ubuntu Linux 7.10. KDE 4 Packages are available for Ubuntu Linux version 7.10 (Gutsy) and from development Ubuntu Linux Hardy version. They install to /usr/lib/kde4 and can be installed alongside your existing KDE 3. However these packages are not compatible with KDE 4 beta packages. Following simple step will help you install KDE 4.

How do I install KDE 4 under Ubuntu Linux?

First you need to update Ubuntu package source file.

WARNING! These examples may crash your Desktop as KDE v4.0 packages are not 100% compatible with Ubuntu 7.10. Following instructions worked on my desktop but failed to work on Laptop. YMMV.

Step # 1: Update Source File

Open a terminal

Open /etc/apt/sources.list file using a text editor such as vi or gedit, enter:
$ sudo vi /etc/apt/sources.list
OR
$ sudo gedit /etc/apt/sources.list
Append following line:
deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu gutsy main
Close and save the file. Type the following command to update package list:
$ sudo apt-get update

GUI tool to update software source

Alternatively, you can use GUI tool by visiting System > Administration > Software Sources > Third Party Software > Add > Enter url 'deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu gutsy main' > Add Source > Update > Close
Add KDE 4 as Software Source for Ubuntu Linux
(Fig. 01: Update Software Source for KDE 4)

Step # 2: Install KDE 4 desktop

To install kde 4, enter:
$ sudo apt-get install kde4-core
You'll get a warning when installing kde 4, just force to install the same without verification:

WARNING: The following packages cannot be authenticated!
Install these packages without verification [y/N]? y

Output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dbus-x11 dolphin-kde4 kappfinder-kde4 kde-icons-oxygen kde4libs-bin kdebase-bin-kde4 kdebase-data-kde4 kdebase-kde4 kdebase-runtime
  kdebase-runtime-bin-kde4 kdebase-runtime-data kdebase-runtime-data-common kdebase-workspace kdebase-workspace-bin kdebase-workspace-data
  kdelibs5 kdelibs5-data kdepasswd-kde4 kdepimlibs-data kdepimlibs5 kfind-kde4 klipper-kde4 konqueror-kde4 konqueror-nsplugins-kde4
  konsole-kde4 ksysguard-kde4 ksysguardd-kde4 kwin-kde4 kwrite-kde4 libcapseo0 libcaptury0 libclucene0 libexiv2-0 libgpgme11 libkonq5
  libkonq5-templates libphonon4 libplasma1 libpth20 libqimageblitz4 libraptor1 librasqal0 librdf0 libsoprano4 libstreamanalyzer0
  libstreams0 libstrigiqtdbusclient0 systemsettings-kde4
Suggested packages:
  kdebase kde-i18n sword-frontend gpgsm
Recommended packages:
  exiv2 raptor-utils redland-utils
The following NEW packages will be installed:
  dbus-x11 dolphin-kde4 kappfinder-kde4 kde-icons-oxygen kde4-core kde4libs-bin kdebase-bin-kde4 kdebase-data-kde4 kdebase-kde4
  kdebase-runtime kdebase-runtime-bin-kde4 kdebase-runtime-data kdebase-runtime-data-common kdebase-workspace kdebase-workspace-bin
  kdebase-workspace-data kdelibs5 kdelibs5-data kdepasswd-kde4 kdepimlibs-data kdepimlibs5 kfind-kde4 klipper-kde4 konqueror-kde4
  konqueror-nsplugins-kde4 konsole-kde4 ksysguard-kde4 ksysguardd-kde4 kwin-kde4 kwrite-kde4 libcapseo0 libcaptury0 libclucene0 libexiv2-0
  libgpgme11 libkonq5 libkonq5-templates libphonon4 libplasma1 libpth20 libqimageblitz4 libraptor1 librasqal0 librdf0 libsoprano4
  libstreamanalyzer0 libstreams0 libstrigiqtdbusclient0 systemsettings-kde4
0 upgraded, 49 newly installed, 0 to remove and 2 not upgraded.
Need to get 105MB of archives.
After unpacking 204MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  libphonon4 libstreams0 libstreamanalyzer0 kdelibs5-data kde4libs-bin kdelibs5 libstrigiqtdbusclient0 libkonq5-templates libkonq5
  dolphin-kde4 kappfinder-kde4 kdebase-data-kde4 kdebase-bin-kde4 kdepasswd-kde4 kfind-kde4 konqueror-nsplugins-kde4 konqueror-kde4
  konsole-kde4 kwrite-kde4 kdebase-kde4 kdebase-workspace-data libplasma1 ksysguardd-kde4 ksysguard-kde4 kdebase-workspace-bin klipper-kde4
  kwin-kde4 systemsettings-kde4 kdebase-workspace kdepimlibs-data kdepimlibs5 kde4-core...
Install these packages without verification [y/N]? y
Get:1 http://ppa.launchpad.net gutsy/main libphonon4 4:4.0.0-0ubuntu2~gutsy1~ppa1 [164kB]
Get:2 http://archive.ubuntu.com gutsy-backports/universe kde-icons-oxygen 4:4.0.0-0ubuntu1~gutsy1 [45.4MB]
Get:3 http://in.archive.ubuntu.com gutsy/main dbus-x11 1.1.1-3ubuntu4 [34.8kB]
................
...
.........
Setting up systemsettings-kde4 (4:4.0.0-0ubuntu7~gutsy1~ppa1) ...
Setting up kdebase-workspace (4:4.0.0-0ubuntu7~gutsy1~ppa1) ...
Setting up kde4-core (3.3~gutsy1~ppa1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place

Note: It may take some time to install kde 4. You also need to disable compiz 3d desktop effect support.

References:

=> Kubuntu Project - Be Free with KDE 4.0