Category / linux

Linux 6th September 2009 at 8:44 am

Linux is an operating system like Microsoft Windows and Mac OS X. Unlike Windows and OS X it is free.
Now another common mistake is to use the phrase I have in my first sentence. Linux is NOT the name of the operating system. Linux is actually the name of what is called the Kernel which lies at the heart of many types of free operating systems. The Linux name given to all these operating systems is a convenient way to refer to a system which uses the Linux Kernel. Those of you familiar with the Unix type operating systems will be more at home with Linux Kernel based operating systems but having said that, in the graphics desktop environment, you can experience a Windows style desktop,


an OS X style desktop or any other style desktop you wish as the two most commonly used Linux based graphics desktop environments, GNOME and KDE, are completely configurable to your own preferred style or use. I use the word free above in the context of “free to use” and yes “free to modify” but, free to modify comes with some provisos. Under the GNU license which the Linux Kernel adheres to, if you modify a copy of the Linux Kernel, you must make this available to anyone else. The idea being that others may benefit from your modifications and they in turn may do the same and offer a continuation of improvements that will benefit the whole Linux community.
Well that’s the basis of Linux. It’s not an operating system on it’s own but forms the first building block on which GNU based operating systems are based. Here is just a sample list of these type of operating systems, also referred to as distributions or distros: Ubuntu, Fedora, Mint, openSUSE, Mandriva, Debian, PCLinuxOS, Puppy, Sabayon, Arch, CentOS, Slackware, MEPIS, Tiny Core, FreeBSD, Kubuntu, Zenwalk, Vector, PC-BSD, Damn Small, Gentoo, KNOPPIX.

GNOME – How to move window buttons 20th August 2009 at 10:19 am

Some people prefer their min,max,close window buttons to be on the left – mac style.
Somehow I managed it then forgot how I did it so when I finally found how to do it AGAIN!, I thought I’d share it.

GNOME calls this “metacity button layout”.

From a terminal window, type gconf-editor.

Now navigate to apps/metacity/general and change the button_layout value as required.
The colon (:) indicates the left-side and right-side divider.

So, Windows style would be menu:minimize,maximize,close and Mac style would be close,minimize,maximize:menu.


CentOS 5, VAIO and Wireless 19th August 2009 at 8:59 am

I own a Sony VAIO laptop on which I dual boot either Windows XP or CentOS 5 (Linux Kernel).
I always wanted to get wireless networking to work but, the plain and simple truth is that although the core components for wireless activities are present, there are vital applications missing which allow a user to connect wirelessly in a similar manner to Windows.
So the hunt began. Now I’m not one to beat around the bush so here’s what I found (that worked for me).
My model of laptop uses the Intel 3945ABG wireless adapter and although CentOS appears to identify it, I always got the message whenever I tried to activate the device:

Error for wireless request “Set Encode” (8B2A):
SET failed on device wlan0; Invalid argument.
SIOCSIFFLAGS: No such file or directory
Failed to bring up wlan0.

After sifting through huge amounts of postings to forums about all the tweaks and options other people had tried and failed with, I found this article, that pointed out that CentOS 5 (and for that matter RHEL 5) simply doesn’t have all the required tools to make it work.

Here’s an outline of what you need to do:

1) Add Dag Wieers repo
from HERE.
Chose your flavour from the list.
Download the file to the root directory and extract all files.

2) yum install dkms-ipw3945

3) chkconfig –level 345 NetworkManager on
chkconfig –level 345 NetworkManagerDispatcher on

4) Reboot

You will now have an icon in your system tray from which you can simply configure your wireless connections.

CentOS5 update problem solved 13th August 2009 at 11:30 am

Recently I tried to update my CentOS5 PC and had the following error:-

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sov.uk.goscomb.net
* updates: mirror.sov.uk.goscomb.net
* addons: mirror.sov.uk.goscomb.net
* extras: mirror.sov.uk.goscomb.net
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package libxml2.i386 0:2.6.26-2.1.2.8 set to be updated
—> Package xulrunner.i386 0:1.9.0.12-1.el5 set to be updated
—> Package libxml2-python.i386 0:2.6.26-2.1.2.8 set to be updated
—> Package libtiff.i386 0:3.8.2-7.el5_3.4 set to be updated
—> Package apr.i386 0:1.2.7-11.el5_3.1 set to be updated
—> Package bind-utils.i386 30:9.3.4-10.P1.el5_3.3 set to be updated
—> Package kernel.i686 0:2.6.18-128.4.1.el5 set to be installed
—> Package nss.i386 0:3.12.3.99.3-1.el5.centos.2 set to be updated
—> Package apr-util.i386 0:1.2.7-7.el5_3.2 set to be updated
—> Package tomcat5-servlet-2.4-api.i386 0:5.5.23-0jpp.7.el5_3.2 set to be updated
—> Package bind-libs.i386 30:9.3.4-10.P1.el5_3.3 set to be updated
—> Package tomcat5-jsp-2.0-api.i386 0:5.5.23-0jpp.7.el5_3.2 set to be updated
—> Package python.i386 0:2.4.3-24.el5_3.6 set to be updated
—> Package nss-tools.i386 0:3.12.3.99.3-1.el5.centos.2 set to be updated
—> Package kernel-headers.i386 0:2.6.18-128.4.1.el5 set to be updated
—> Package nspr.i386 0:4.7.4-1.el5_3.1 set to be updated
—> Package firefox.i386 0:3.0.12-1.el5.centos set to be updated
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 229, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 145, in main
(result, resultmsgs) = base.buildTransaction()
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 647, in buildTransaction
(rescode, restring) = self.resolveDeps()
File “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 704, in resolveDeps
for po, dep in self._checkFileRequires():
File “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 939, in _checkFileRequires
if not self.tsInfo.getOldProvides(filename) and not self.tsInfo.getNewProvides(filename):
File “/usr/lib/python2.4/site-packages/yum/transactioninfo.py”, line 414, in getNewProvides
for pkg, hits in self.pkgSack.getProvides(name, flag, version).iteritems():
File “/usr/lib/python2.4/site-packages/yum/packageSack.py”, line 300, in getProvides
return self._computeAggregateDictResult(“getProvides”, name, flags, version)
File “/usr/lib/python2.4/site-packages/yum/packageSack.py”, line 470, in _computeAggregateDictResult
sackResult = apply(method, args)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 861, in getProvides
return self._search(“provides”, name, flags, version)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 43, in newFunc
return func(*args, **kwargs)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 837, in _search
for pkg in self.searchFiles(name, strict=True):
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 43, in newFunc
return func(*args, **kwargs)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 586, in searchFiles
self._sql_pkgKey2po(rep, cur, pkgs)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 470, in _sql_pkgKey2po
pkg = self._packageByKey(repo, ob['pkgKey'])
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 413, in _packageByKey
po = self.pc(repo, cur.fetchone())
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 68, in __init__
self._read_db_obj(db_obj)
File “/usr/lib/python2.4/site-packages/yum/sqlitesack.py”, line 94, in _read_db_obj
setattr(self, item, _share_data(db_obj[item]))
TypeError: unsubscriptable object

After some searching and checking several suggestions, I found the cause and solution to be very simple.
The yum cache had become corrupted.

The solution:

cd /var/cache/yum
rm -rf *
yum makecache

See below
Sponsored Links




That cured it.

yum update then worked perfectly.

Many thanks to http://just-another.net.

Booting from a Linux CD and wiping an operating system 7th June 2009 at 7:26 pm

Some times it is very useful to boot from a Linux installation CD or DVD in order to use tools straight from the CD/DVD. You are not necessarily looking to install Linux but simply to make use of its low level software tools.
There are a number of ways to do this but I shall list just two as they are the most familiar to me.
1) Using the first CD or DVD from RedHat/Fedora/CentOS media :-
Set your BIOS to boot from your CD-ROM drive
When the boot process reaches the boot> prompt, enter “linux rescue” and hit return, this will provide you with a number of boot options, choose the most basic as we don’t need any networking functionality.
This will load linux into memory and provide access to the programs held on the CD/DVD.
The following command will allow you to wipe the beginning of your hard drive thus removing key information about anything held on the drive.
See below
Sponsored Links




dd if=/dev/zero of=/dev/sda bs=512 count=50000

or

dd if=/dev/zero of=/dev/hda bs=512 count=50000

depending on whether you have a SATA drive or an IDE drive respectively.

2) Boot from a Puppy Linux CD, start a terminal window then follow the same dd commands described above.

Upon begining an operating system installation it will appear that the hard drive is brand new and completely blank.

Postfix smtpd_client_restrictions 21st May 2009 at 8:37 am

Keeping known email abusers out is always desired. Postfix has a parameter which is specified in the main.cf file that allows you to refer to these lists.
The script I use is as follows…

smtpd_client_restrictions =
	permit_mynetworks
	permit_sasl_authenticated
	reject_unauth_pipelining
	reject_rbl_client cbl.abuseat.org
	reject_rbl_client dnsbl.ahbl.org
	reject_rbl_client dnsbl.sorbs.net
	reject_rbl_client list.dsbl.org
	reject_rbl_client sbl-xbl.spamhaus.org
	#reject_rhsbl_client blackhole.securitysage.com
	reject_rhsbl_client rhsbl.sorbs.net
	permit

Note the commented out line

	#reject_rhsbl_client blackhole.securitysage.com

See below
Sponsored Links




This is a list that was not properly administered. A friend of mine tried to email me who uses the mac.com domain and was being rejected as an abuser which, of course, is rediculous.
I keep the entry as a future reference. There are others out there so if you know of them please let me know.
mta.