Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Saturday, May 23, 2009

How to create a shutdown button on a Linux desktop.

A shutdown button can be created on a Linux desktop using a single lined script.

Open your favorite text editor

eg : vi shutdown or
: gedit shutdown

append the following lines

#!/bin/bash
poweroff


save and quit. Move the file location to your desktop

chmod 777 shutdown
chmod +x shutdown (made the file 'shutdown' executable)

Now double click on your 'My Computer" icon to open the file browser window.

goto Edit-->Preferences-->Behavior-->Run executable text files when they are clicked-->close

Now you can double click on the 'shutdown' file to shutdown the machine. You can rightclick on it to choose an appropriate icon for the button.

Friday, May 15, 2009

How to assign swap area in Linux to increase speed?

We can assign swap area in linux either on a partition or a file.

I am creating here swap area using a file.

First we need to create the swap file.

dd if=/dev/zero of=/swapfile bs=1024 count=2000000

this will create a file 'swapfile' under / of size above 2gb

Type the following commands :-

mkswap /swapfile

swapon /swapfile

Now we can add the swap entry on fstab so that on every reboot, system will automatically loads the awap area.

vi /etc/fstab

append the following line to the bottom

/swapfile  swap  swap  defaults  0 0

save and quit

To see the swap usage use the command top 

thanks & regards

tell2humanlinux@gmail.com

Thursday, May 14, 2009

How to put the grub password in linux!

In Linux anyone can reset the root password from single usermode . So it is considered as a security fault if the machine is public. There comes the importance of putting the grub password, so that only admin is allowed to login if the machine is rebooted.

Here are the steps to put the grub password.

1) open the command prompt and type the following commands

2) grub

3) md5crypt

4) type the password

5) copy the encrypted password generated

6) Ctrl c

7) vi /boot/grub/grub.conf

8) paste the following line just above the 'title'

password --md5 "encrypted password here"

9) save and quit. Done.

I have give the sample grub file here.

======================================

#boot=/dev/hdb
default=0
timeout=15
splashimage=(hd1,8)/boot/grub/splash.xpm.gz
hiddenmenu
password --md5 %&mkj89(*$*J)$OO*=*

title CentOS (2.6.18-92.el5)
root (hd1,8)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-92.el5.img

======================================


thanks & regards
tell2humanlinux@gmail.com

Saturday, May 9, 2009

How to install flash player on centos/redhat linux !

This post can also answer the question " how to fix the firefox error on centos/redhat linux" 

Installing the flash player on centos/redhat linux seems to be very difficult sometimes. But the installation is quite simple :). The flash player may not be installed automatically using firefox. While trying install firefox, you may get the error following error " Firefox could not install this item because "install-0zr..rdf" (provided by the item) is not well-formed or does not exist. Please contact the author about this problem."The Screeshot of error is provided. To fix this issue, you need to upgrade/install certain libraries using yum. I have mentioned the commands below.

1. First you need to install those libraries (.i386 and .x86_64):

yum install curl compat-libstdc++-33 glibc nspluginwrapper

2. Once done with the libraries, we need to download the flash player rpm.

mkdir flash

cd flash

download the rpm inside the folder flash.

click here to Download

3. Next we need to execute the command below to install the rpm. This command should be executed inside the folder, where the rpm is downloaded. Ours is in the folder 'flash'.

rpm -ivh flash-plugin-10.0.12.36-release.i386.rpm

(replace with the version of rpm you have downloaded)

4. Close the Firefox and restart it. You should be able to see the flashes hereafter.

thanks & regards

tell2humanlinux@gmail.com

Thursday, May 7, 2009

How to browse files in an ISO image?

Its always easy to do things using the command lines in Linux. To browse files of an ISO image is an easy task in Linux. Open a terminal window and type in the following commands.

sudo mkdir /media/iso

sudo modprobe loop

sudo mount filename.iso /media/iso -t iso9660 -o loop

cd /media/iso

Hereafter you will be able to navigate to the /media/iso folder and see the contents of the ISO image. To unmount the ISO, use the following command:

sudo umount /media/iso

I will explain the commands and options used specificly:

sudo modprobe loop  ->loads/ installs the module for loopback file system support

iso9660  -> the file system used by CD roms

-t  -> specify the file system type

-o loop  -> for additional options while using a loopback filesystem


thanks & regards

tell2humanlinux@gmail.com

How to change the default text editor in ubuntu!

In ubuntu , the default text editor for editing the configuration files may be nano. For eg: to set a cronjob crontab -e , the configuration file opens up with the nano text editor. But we can set the default text editor as our favourite editor by using a simple command.

update-alternatives -- config editor

once this command is entered, it asks to enter the no: of our favourite editor. eg:

humanlinux@localhost:~# update-alternatives --config editor

======================================

There are 3 alternatives which provide `editor'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/vim.tiny
2 /bin/ed
*+ 3 /bin/nano
======================================

Just enter the corresponding no: of your favourite editor.
Here i have choosed 1.

======================================
Press enter to keep the default[*], or type selection number: 1
Using '/usr/bin/vim.tiny' to provide 'editor'.
======================================

thanks & regards
tell2humanlinux@gmail.com

Sunday, May 3, 2009

Get free Ubuntu stickers ! :)

Get ubuntu stickers for free! All you need to do is to mail a self addressed stamped envelope to your local address:  The addresses for different countries are give here!

Argentina

Ubuntu Sticker Offer
Av. Maipu 2259 PB C
ZIP: 1636
Buenos Aires
Argentina

Thanks to the Ubuntu Argentina Team!



Australia

Sticker Offer
P.O Box 1412
Lavington, NSW 2641

Thanks to the Ubuntu Australia Team!



Belgium

Powered by Ubuntu - stickers 
p/a Lange Vesting 100
8200 Brugge
Belgium

Thanks to the Ubuntu Belgium Team!



Bolivia

Rolando Espinoza La Fuente
Calle 16 de Julio #424 / Zona Central 
Cochabamba, Cochabamba
Bolivia

Thanks to the Bolivian Ubuntu LoCo Team!



Brazil

Comunidade UbuntuBR
A/C Etiquetas Ubuntu
Av. Rui Barbosa, 2095 cj63
Santana - Sao Jose dos Campos/SP
CEP: 12211-000

Thanks to the Ubuntu Brazil Team!



Canada

Ubuntu Sticker Offer
2448 Cadboro Bay Rd.
Victoria BC
V8S 4C1
Canada

Thanks to the Ubuntu Canada Team!


Chile

Stickers Ubuntu Chile
Arlegui #573 E-11
Viña del Mar
CHILE

Thanks to the Ubuntu Chile Team!



Colombia

Javier A Miranda R 
Carrera 118Bis N°89A-26
Int. 4, Apto. 102 
Bogota, DC -111011
COLOMBIA

Thanks to the Colombian Ubuntu Team!



France

Ubuntu-Sticker
105, rue de l'Ourcq
75019 Paris
France

http://www.ubuntu-fr.org/contact

Thanks to the French Ubuntu Team!



Germany

http://ubuntu.kamerastars.de

Thanks to the German Ubuntu Team!



Hungary

Ubuntu Hungarian LoCo Team
ORY Mate
H-1163 Budapest
Gordonka u. 32.
Hungary

Thanks to the Hungarian Ubuntu Team!



India

Baishampayan Ghose
214/4, Sher-e-Punjab Society
Andheri (E), Mumbai --- 93
India

Thanks to the Ubuntu Indian LoCo Team!



Italy

Palma Salvatore
Via Magna Grecia, 14
87029 Scalea (CS)
Italy

Thanks to the Italian Ubuntu LoCo Team!



Mexico

Stickers Ubuntu
Avenida Adolfo Lopez Mateos Condominio 1 Casa 41
Fraccionamiento Rancho San Lucas
Metepec, Mexico
CP: 52172

Thanks to the Mexican Ubuntu LoCo Team!



Netherlands

Ubuntu Stickers
Hyacintstraat 13
4587 AV Kloosterzande
The Netherlands

Thanks to the Dutch Ubuntu Team!



New Zealand

Ian Beardslee c/o C/- Catalyst IT 
PO Box 11053
Manners St
Wellington New Zealand

Thanks to the New Zealand Ubuntu Team!



Norway

Ubuntu Stickers Scandinavia
c/o FreeCode AS 
Nydalsveien 30 B 
0484 OSLO

Thanks to the Norwegian Ubuntu Team!



Peru

Gonzalo L. Campos Medina
Av. Peru K-134 / Urb. Garibaldi
ILO, ILO
PERU

Thanks to the Peruvian Ubuntu Team!



Serbia

Ivan Jelic
Bore Stefanovica 2/1
36000 Kraljevo
Serbia

Thanks to the Serbian Ubuntu Team!



Switzerland

Pro-OpenSource
Stichwort: Ubuntu-Stickers
c/o Ruben Richiger
Dietlistrasse 2
9000 St. Gallen

Thanks to the Swiss Ubuntu Team! 



Tunisia

Ubuntu Stickers
B.P. 57 Monastir République
5060 Monastir
Tunisie

Thanks to the Tunisian Ubuntu Team! 



Turkey

Atila Sendil
TUPRAS Gn.Md.
Bilgi Sistemleri Md.
Korfez / Kocaeli

Thanks to the Turkish Ubuntu Team!



United Kingdom

The Linux Emporium
Bridge House
17a Maybrook Road
Sutton Coldfield
Birmingham
B76 1AL UK

Thanks to the United Kingdom Ubuntu Team!


United States

System76, Inc. (Free Stickers)
1582 S. Parker Rd. Ste. 310
Denver, Colorado 80231


Venezuela

Nathalie Colina
Calle Dabajuro
Casa # 4
Urbanizacion El Señorial
Puerta Maraven 
Punto Fijo, Estado Falcón
Venezuela

Thanks to the Venezuelan Ubuntu Team!

ref:http://system76.com/article_info.php?tPath=3&articles_id=9&osCsid=5f9879db81c873e7a8e169de0963010a

thanks & regards 
tell2humanlinux@gmail.com

Thursday, April 16, 2009

How to create a local Repository for Linux!

Creating a Local Repository of Yum and apt:-

You should have a FTP server or HTTP server to make yum actually working. However since we haven't really gone through setting up FTP or HTTP server, please read-on and understand the process. If you have got vsftpd installed, use that. Otherwise, don't forget to actually set it up yourself later.

Here we will create a local repository for Fedora and CentOS in the easy way.

0. You should have the yum as well as the createrepo package installed first.

1. Create the directory to hold the repository.

mkdir -p /var/ftp/pub/yum-repo/centos/
mkdir -p /var/ftp/pub/yum-repo/fedora/

2. createrepo /var/ftp/pub/yum-repo/centos/ ; createrepo /var/ftp/pub/yum-repo/fedora/ will create the local yum repository by creating a folder named "repodata with four xml files named, filelists.xml.gz, other.xml.gz, primary.xml.gz and repomd.xml

You will have to run the createrepo command each time a rpm is added there.

3. Now in the client's yum.conf, add the repo directly. However in recent versions, the repositories are put in a separate directory called /etc/yum.repos.d/ . If so, put the contents in a filename, with the extension .repo

[humanlinux repo]
name=Fedora Core $releasever - humanlinux Local Repo
baseurl=file:///var/ftp/pub/yum-repo/fedora/
enabled=1
gpgcheck=0
#gpgkey=file:///path/to/your/RPM-GPG-KEY

Fedora Specific Local Repository:- 

NB : You can create directories inside /var/ftp/pub/yum-repo/fedora/ to look like /var/ftp/pub/yum-repo/fedora/base/8/i386 , /var/ftp/pub/yum-repo/fedora/updates/8/i386 , /var/ftp/pub/yum-repo/fedora/base/9/i386, /var/ftp/pub/yum-repo/fedora/updates/9/i386 and so on.

1) Filling the repos with RPMs:- 

Copy the rpm packages to /var/ftp/pub/yum-repo/fedora/ or /var/ftp/pub/yum-repo/fedora/base/8/i386 from the DVD's Packages directory.

OR

rsync from a rsync supported mirror from the list, http://mirrors.fedoraproject.org//mirrorlists/publiclist/Fedora/8/ like rsync://ftp.sh.cvut.cz/fedora/linux and

rsync -avrt rsync://ftp.sh.cvut.cz/fedora/linux/releases/8/Everything/i386/os/ /var/ftp/pub/yum-repo/fedora/base/8/i386 (remember to have a slash after os/ :-))

2) Updates and regular downloading:- 

/var/ftp/pub/yum-repo/fedora/updates/8/i386

rsync the updates from rsync://ftp.sh.cvut.cz/fedora/linux/updates/8/i386/ to /var/ftp/pub/yum-repo/fedora/updates/8/i386

And then enter the command in a cron job too, to download the updates frequently.

Creating Apt repository:- 

This is done using the apt-mirror tool. Download and install apt-mirror first and then edit the /etc/apt/mirror.list ( to list which packages tree should be mirrored ) which is similar to /etc/apt/sources.list.

apt-mirror will do the rest of the job. Once it is finished, clean up the repositories by running /var/spool/apt-mirror/var/clean.sh.

tell2humanlinux@gmail.com

Wednesday, April 15, 2009

How to sent gmail from/using terminal!

We can sent emails using the terminals. This is an advantage if the internet connection is very slow , since it take much time to load the GUI web interface.
Here are the steps to sent a gmail using/from the terminal.

1)We have to install a package
for Debain : apt-get install ssmtp
gnu/linux : yum install ssmtp

2)edit the file /etc/ssmtp/ssmtp.conf with your favourite editor.
Add the following lines at the end.

AuthUser=youremailaddress(senders adress)
AuthPass=email password
FromLineOverride=Yes
mailhub=smtp.gmail.com
Use STARTTLS=YES


save & quit!

3)To sent an email, type this on the terminal

echo "This is a test mail' | mail -s "hello" receiptemailaddress@gmail.com
tell2humanlinux@gmail.com

How to turn-on the num lock on every boot-up!

It is frustating to see that the numlock is turned off on very reboot in ubuntu. But it is quite easy to fix it.Just install a tiny package.

sudo apt-get install numlockx

This can:-
1)Control the state of NumLock

2)Provides control over the keyboard number lock from scripts.
3)Particularly useful for use with .xinitrc/.xsession or GDM/XDM/KDM sessions
4)Included is an optional script that can be used to start numlockx automatically
in every X session.

thankyou:-
tell2humanlinux@gmail.com

Wednesday, April 8, 2009

OpenDNS!


OpenDNS offers DNS resolution for consumers and businesses as an alternative to using their Internet service provider's DNS servers. By placing company servers in strategic locations and employing a large cache of the domain names, OpenDNS usually processes queries much more quickly, thereby increasing page retrieval speed. DNS query results are sometimes cached by the local operating system and/or applications, so this speed increase may not be noticeable with every request, but only with requests that are not stored in a local cache.

Other features include a phishing filter, domain blocking and typo correction (for example, typing wikipedia.og instead of wikipedia.org). By collecting a list of malicious sites, OpenDNS blocks access to these sites when a user tries to access them through their service. OpenDNS recently launched Phishtank, where users around the world can submit and review suspected phishing sites.

OpenDNS is not, as its name might seem to imply, open source software.

OpenDNS earns a portion of its revenue by resolving a domain name to an OpenDNS server when the name is not otherwise defined in DNS. This has the effect that if a user types a nonexistent name in a URL in a web browser, the user sees an OpenDNS search page. Advertisers pay OpenDNS to have advertisements for their sites on this page. While this behavior is similar to VeriSign's previous Site Finder or the redirects many ISP's are placing on their own DNS servers, OpenDNS states that it is not the same, as OpenDNS is purely an opt-in service (compared to Site Finder's effect on the entire Internet, as VeriSign is an authoritative registry operator) and that the advertising revenue pays for the customized DNS service. Note that web browsers are not the only users of DNS resolution service and for any other user, this way of resolving names is at best useless, and may be worse than replying that the name does not exist, as is normal.

According to OpenDNS, it may in the future provide additional services that run on top of its enhanced DNS service, and may charge money for some of them.

One example of such an added service was the company's April 22, 2007 launch of "shortcuts", letting users make custom DNS mappings, such as mapping "mail" to "mail.yahoo.com". This feature launch was covered by a large number of publications, including the New York Times, Wired, and PC World.

On May 13, 2007, OpenDNS launched a new domain blocking service which provides the ability to block/filter web sites visited based upon categories. This provides for corporate, educational and parental control over the type of sites that are deemed appropriate by the networks owner. On August 9, 2007 OpenDNS added the ability to override the filter through individually managed blacklists and whitelists. On February 20, 2008 in an effort to make their domain block list current with new website additions OpenDNS changed from a closed list of blocked domains to a community driven list whereby individual OpenDNS subscribers can suggest sites for blocking. If a sufficient number of other subscribers concur with the categorization of the site it is added to the appropriate category for blocking. The threshold of votes required to add a new site to the filter has not been disclosed. Over 50 categories now exist for categorizing websites providing for fine grained control over web browsing habits.

visit the official site:- http://www.opendns.com/

the details to setup openDNS is provided in the website.

tell2humanlinux@gmail.com

Friday, April 3, 2009

Faster YUM search!

Yum fastest mirror plugin (yum-plugin-fastestmirror) allow yum to select the closest and freshest mirror around you for your yum update. Once the yum fastest mirror plugin is activated, whenever you perform yum update or install, you will get a better connection. As yum will search the mirror based on your IP thru the GeoIP system. Yum select the fastest mirror based on:-

1. The connecting location of the client.
2. The current freshness/staleness of the mirrors for that region.

yum fastest mirror plugin (yum-plugin-fastestmirror) sound interesting? Want to try?
To install yum fastest mirror plugin (yum-plugin-fastestmirror) you can use this command:-

yum install yum-plugin-fastestmirror
or
yum install yum-fastestmirror

Once the installation completed, you have to edit the file /etc/yum.conf and add the following line to the file:

plugins=1

If it is already there , no need to add!

Done. you have just installed yum fastest mirror plugin.
if you perform yum install or yum update now,
you will notice there is a new line added like below

Loading “fastestmirror” plugin
Setting up Install Process
Setting up repositories

Happy yumming!

tell2humanlinux@gmail.com

Wednesday, April 1, 2009

Opera Browser installation in GNU/Linux


Here i am discussing the step-by-step process to install Opera Browser in GNU/Linux:-

I am installing Opera/9.64 (X11; Linux i686; U; en) Presto/2.1.1 in Redhat linux/Centos 5 Version

1)Download the opera from the folowing url

http://www.opera.com/browser/download/

Select distribution and vendor as Redhat 5 or your current version

And check the box : Download this package in TAR.GZ format

Click on DOWNLOAD OPERA

2) The download begins

after completion,goto the downloaded location

Move it to the home
Create a directory 'opera'
mkdir opera

move the downloaded package to opera

mv opera-9.64.gcc4-shared-qt3.i386.tar.gz opera

3)Extract the package using the following command

tar xzf opera-9.64.gcc4-shared-qt3.i386.tar.gz

4)then open the directory opera

cd opera

list the files

ls

you can see some files & Folders

You can see one named install.sh

5)type

./install.sh

It starts the instalations process

It ask for the confirmation

Type 'y' to complete the instllation.

6)After the  instllation,the Opera opens up

For the next time if you want to browse using Opera

7)Click on Application->internet->Opera

mail me at :- tell2humanlinux@gmail.com