Archive for July, 2008

Useful tools

July 20, 2008

1. Download manger for linux-    aria, gwget, d4x, curl wget

2. Media player-     totem, vlc, mplayer, xmms

3. Image Editor-     pixel, GIMP, mtpaint

4. Bluetooth –        bluez-utils, gnome-bluetooth, bluez-gnome

5. DUN – pppd, pon. iwdial,


Download the entire content of a site

July 20, 2008

wget is a command line tool for downloading any object from net. It also be used to download

the entire content of a site too. Here is a example of doing so

wget -r  -l0  –no-parent  http://urltodowload


– r = recursive

-l0= restricts the recursiveness to only 0 levels deep

–limit-rate = to mask your download somewhat, 20KB would be nice i think

-nc = for avoiding downloading linked files already downloaded
-w = to wait 4 seconds between retrievals
–random-wait = to make the -w time * 0-2

-A jpg,jpeg tells it to only save .jpg and .jpeg files

-U = user-agent
-S = print server response
http_proxy = does what you asked (note that i don’t know wheither wget might automaticly fall back on no proxy or not)

Now the wget command with all these switces –

wget -U “Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.7.3) Gecko/20040916” -r -l 2 -A jpg,jpeg -nc –limit-rate=20K -w 4 –random-wait http_proxy http://username:passwrd@(ifneeded) -S

Tricky Trips

July 8, 2008

To change a user shell

chsh -s /bin/bash <user>

you are login with user tarique and now a you want to run a GUI package with user sheikh

and the GUI fails. what then?

To way to solve this

cd /home/tarique

cp .Xauthority /home/sheikh


xhost +x

export DISPLAY=:0.0

then run the package

Building extra apache module

July 4, 2008

apxs -Compile -i proxy.c

apxs -c -i proxy.c mod_proxy_connect.c mod_proxy_http.c proxy_util.c

When u execute this command u must have permission to write to apache installation directory.

Apache, myql and php installation in Solaris

July 4, 2008


$ gtar zxf httpd-NN.tar.gz
$ cd httpd-NN

./configure –prefix=/usr/local/apache –enable-so –enable-mods-shared=all –enable-ssl –enable-proxy=shared

Main config file httpd.conf and must check the following options

  • Listen
  • Server Root
  • Document Root
  • Directory Index
  • Add Type
  • User
  • Group

To check config file syntax

httpd -t


pkginfo |grep mysql

pkgrm SUNW….

Switch to be used with configure scripts…..

./configure –prefix=/usr/local/mysql –localstatedir=/usr/local/mysql/data –disable-maintainer-mode –with-mysqld-user=mysql –with-unix-socket-path=/tmp/mysql.sock –without-comment –with-debug –without-bench

my.cnf file

#password       = your_password
port            = 3306
socket          = /usr/local/mysql/tmp/mysql.sock

# Here follows entries for some specific programs
# The MySQL server
user            = mysql
port            = 3306
socket          = /usr/local/mysql/tmp/mysql.sock
basedir         = /usr/local/mysql
datadir         = /usr/local/mysql/data
#tmpdir          = /usr/local/mysql/tmp
language        = /usr/local/mysql/share/mysql/english
default-character-set   = utf8

Be careful about mysql.sock file and check the location.


./configure  –prefix=/usr/local/apache/php –with-config-file-path=/usr/local/apache/php/lib –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/apache/bin/apxs –with-openssl=/opt/ssl –with-gd –with-pdf –with-zlib-dir=/usr/local/lib

Check mysql.default_socket = /usr/local/mysql/tmp/mysql.sock in php.ini

also check

AddType application/x-httpd-php .php

LoadModule php5_module        modules/