23 Feb 2012

List of all the drivers on your Linux installation.

cd /lib/modules/2.6.18-128.1.OpenVA.2.0.1039/kernel/drivers/net
ls -1 *.ko | xargs -I{} modinfo {} | grep -e "description"
description:    3Com 3c59x/3c9xx ethernet driver 
description:    RealTek RTL-8139C+ series 10/100 PCI Ethernet driver
description:    RealTek RTL-8139 Fast Ethernet driver
description:    AceNIC/3C985/GA620 Gigabit Ethernet driver
description:    AMD8111 based 10/100 Ethernet Controller. Driver Version 3.0.3
description:    Broadcom 4400 10/100 PCI ethernet driver
.....

ls -1 *.ko | xargs -I{} modinfo {} | grep -e "description\|alias"

description:    3Com 3c59x/3c9xx ethernet driver 
alias:          pci:v000010B7d00009210sv*sd*bc*sc*i*
alias:          pci:v000010B7d00009056sv*sd*bc*sc*i*
alias:          pci:v000010B7d00001202sv*sd*bc*sc*i*
alias:          pci:v000010B7d00001201sv*sd*bc*sc*i*
alias:          pci:v000010B7d00009201sv*sd*bc*sc*i*
alias:          pci:v000010B7d00004500sv*sd*bc*sc*i*
alias:          pci:v000010B7d00006564sv*sd*bc*sc*i*
alias:          pci:v000010B7d00006562sv*sd*bc*sc*i*
alias:          pci:v000010B7d00006560sv*sd*bc*sc*i*
alias:          pci:v000010B7d00005257sv*sd*bc*sc*i*
alias:          pci:v000010B7d00005157sv*sd*bc*sc*i*
alias:          pci:v000010B7d00005057sv*sd*bc*sc*i*
alias:          pci:v000010B7d00005B57sv*sd*bc*sc*i*

....


This is an other way to do it for all your kernel modules 
modprobe -l | sed -e "s:\(/.*/\)::" - | sed -e "s/\.ko//" - | xargs -i{} modinfo {} | grep -e "description"

description:    3Com 3C359 Velocity XL Token Ring Adapter Driver 
description:    3Com 3c574 series PCMCIA ethernet driver
description:    3Com 3c589 series PCMCIA ethernet driver
description:    3Com 3c59x/3c9xx ethernet driver 
description:    3ware 9000 Storage Controller Linux Driver
description:    3ware Storage Controller Linux Driver
description:    RealTek RTL-8139C+ series 10/100 PCI Ethernet driver
description:    RealTek RTL-8139 Fast Ethernet driver
description:    Dell PERC2, 2/Si, 3/Si, 3/Di, Adaptec Advanced Raid Products, HP NetRAID-4M, IBM ServeRAID & ICP SCSI driver
description:    Abit uGuru Sensor device
 .....

What are you going to do with all that.  I don't know. 

-- 
Aaron Nel 

4 Jan 2012

disabling FSPPS/2 Sentelic FingerSensingPad track pad.

Linux help.

I created a script to disable the FSPPS/2 Sentelic FingerSensingPad track pad on my gigabyte Q1585n note book. The Sentelic FigerSensingPad is two sensitive, and I have a mouse. When I type I want to disable the track pad. The note book does not have a hardware button combination to disable the track pad.

So I wrote this script to switch states. Every time you run it it changes it from enabled to disabled. Run it again and it switches from disabled to enabled. I tested it on my Ubuntu 11.04 and my friends fedora 14.  It should work on any Linux machine with xinput installed.

here is a link to a zipped file I uploaded to google docs.
tracpad.sh.tgz


to extract the archive

tar -xf ./tracpad.sh.tgz

to make it executable

chmod a+x ./tracpad.sh

to run it
./tracpad.sh


Here is the contents of the script. I use xinput. If you just want to use xinput  to disable the touch pad or any thing else handled buy xinput read its man page.


#!/bin/bash
#
# Author: Aaron Nel
# Created: 23 12 2011

# This script disables and enables the track pad
# every time it is run it switches the state of the track pad
# Specfically the "FSPPS/2 Sentelic FingerSensingPad"

#test to see what state the tracpad is in
padE=`xinput --list-props "FSPPS/2 Sentelic FingerSensingPad" | grep "Device Enabled" | cut -f3`
#echo $padE

case $padE in
    0)
        xinput set-prop "FSPPS/2 Sentelic FingerSensingPad" "Device Enabled" 1
        echo "device enabled"
        ;;
    1)
        xinput set-prop "FSPPS/2 Sentelic FingerSensingPad" "Device Enabled" 0
        echo "device disabled"
        ;;
    *)
        echo "Error:"
        echo "Device in an unknowen state"
        echo "$padE"
        ;;

esac





If you are looking for more info or other solutions  check out these links.

http://www.google.co.za/search?gcx=c&sourceid=chrome&client=ubuntu&channel=cs&ie=UTF-8&q=FSPPS%2F2+Sentelic+FingerSensingPad

How to configure the touch pad, to make it less sensitive and other nice tweaks.
http://ubuntuforums.org/showthread.php?t=1502560

The souceforge driver project page.
http://sourceforge.net/projects/fsp-lnxdrv/

28 Dec 2011

TuxGarage: Tutorials, News, Troubleshooting: Run AWN / Dock in Natty Narwhal, instead of Gnome ...

This how to is probably the best most versatile and useful way to get AWN running in Ubuntu Linux. It adds a session option at the log in screen. So you don't touch the default setup. It is also a look into a very powerful world. Creating your own custom sessions.

TuxGarage: Tutorials, News, Troubleshooting: Run AWN / Dock in Natty Narwhal, instead of Gnome ...: If you want to use Avant Window Navigator (AWN) or another dock instead of the default panels/launcher in Natty Narwhal, there are multiple ...

20 Dec 2011

Reading the documentation in /usr/share/doc especially the .gz compressed files

Have you ever wanted to read the the documentation in the /usr/share/doc directory. If you install apache it makes it nice and easy to read all the documentation that comes with most Linux packages.
First install Apache2
$ sudo apt-get install apache2 apache2-doc
apache2-doc is the special case here. It allows you to browse your documentation /usr/share/doc/ through your web browser. from

http://localhost/doc/

This does not work out right though. you need to change the configuration of apache to get it to decompress and show the *.gz files as plain text.
I posted on Stackoverflow to get a way to use the apache to show the content of *.gz documents in the /usr/share/doc/ directory. This is what was posted as possible solution
http://stackoverflow.com/questions/5242106/apache-gz-gzip-content-handler-for-linux-documentation-usr-share-doc-and-local

Here are those instructions in brief. It tells apache how to deal with .gz files to process them as plain text and send them to the browser as plain text.
 sudo a2enmod headers
 sudo a2enmod deflate
 gksu gedit /etc/apache2/sites-enabled/000-default
Go to the bottom of the file and find the section with Alias /doc/ "user/share/doc/" and change it to look like this.
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/local/doc">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128

    AddEncoding gzip gz
    <FilesMatch "\.gz$">
      ForceType text/plain
      Header set Content-Encoding: gzip
    </FilesMatch>
</Directory>   

 sudo apache2ctl restart
Now you are done and can read your *nix documentation that comes with most packages.

stackexchange

I use the internet, and Google mostly to answer questions I have. Some times when I get an answer I have been looking for I post about it on my blog / social media. I recently found my favorite sight for interacting with like minded individuals. You would have come across stack exchange on some of your Google searches as well.

The community is not made up of normal's, but exceptional people. Who are very knowledgeable in the areas they contribute. The technical areas of programming, Linux, security and and language.  As a introvert I find my self clinking from question to the next to read all the different and interesting responses.
I spent some time answering questions as well.

how to copy an ubuntu install from one laptop to another http://askubuntu.com/questions/62340/how-to-copy-an-ubuntu-install-from-one-laptop-to-another/62383#62383

how are typical users expected to read the documentation in usr share doc http://askubuntu.com/questions/24072/how-are-typical-users-expected-to-read-the-documentation-in-usr-share-doc/29768#29768 with my answer http://askubuntu.com/a/29768/10998.

why do computers work in binary http://stackoverflow.com/questions/5165013/why-do-computers-work-in-binary/5167023#5167023

I highly recommend, using your Google account to create an account on stackexchange. To ask your technical questions here.

18 Feb 2011

Trying to get Firefox to accept my proxy setting in ubuntu 10.04. I don't know what else I could do.

3 Sept 2008

Z formal systems specification tool and CZT

I recently as part of a systems engineering course had to write a few system specification documents using the Z language. I now had to find a nice way to do this. The Community Z Tools at source forge provided the best and simplest way for me to get things done. They have integrated their tools in to jedit so that it would be very simple for them to get things working.

The instructions at source forge are not exactly straight forward. It seamed to me that I need to download the source and compile from source this is not the case. Just download the czt binary file form source forge and extract. The follow the instructions at http://czt.sourceforge.net/jedit/index.html ignoring the step to download and install the source. Every thing is include in the czt download.

The jedit tool also seams to be a quite useful tool worth a look.

2 Sept 2008

Jawug, wug, and wireless equipment

I recently decide to get involved with the South African Wireless Users Group. So I had to decide on what equipment to uses where and how I was going to connect. It was a really good learning experience. I now know a bit more about the wireless networks, the equipment and types of connections possible.

For equipment I found that Uniterm Direct had the best selection and devices. I will probably end up with an RB433, or RB411 device. The Mikrotik devices have a better routing software and are designed for extream conditions like out doors, or in relativly high heat. These mikrotik devices also allow for power of ethernet, so you can put in them in some really strange places, not have to worry to much about how to power them.

Most standarde wireless routres could do the same thing and a lot of people would use the linksys WRT54g series routers. Those are designed for indoor use and don't do well in your roof or out side in an antenna enclosure.

The only thing I was not sure about was signal quality, strength and my ability to connect to the high sites a round my house. The following articles helped me understand what was going on.
http://wireless.gumph.org/articles/longrangelink.html
and http://www.cisco.com/en/US/tech/tk722/tk809/technologies_tech_note09186a00801c12c2.shtml
and http://www.universalweb.com/CustomCablesUSA/Technical.html. This last one is particularly good at explaining the differences between the different low loss co-axial cables when using antenna.

31 Aug 2008

Ubuntu Network manager, static interface setup, multiple profiles, no internet, no dns

Recently I decided to experiment with the multiple profiles feature of the network manager provide by Ubuntu 8.04. I set up my lan network card with a static ip address so that I could manager port forwarding on my router specifically for my laptop.

I still wanted to be able to switch to the roaming mode provided by the network manager if I went to university or some where else. So I decide to save the set up in the network manager as a separate profile. I then saved other profile for the roaming modes on my wireless lan, and my cable lan interfaces.

After a restart I found that I could no longer get out on the internet after start up. I was not sure what the problem was. I could ping my router but nothing beyond my router. In checking my network manager set up I could see that where I used to have my router as a dns, I now had nothing.

So I add some dns servers saved the settings under my static profile and applied these setting buy clicking the green tick. Now every thing was working again. I could connect to the internet web pages would now load in firefox.

Again after a restart I found I had the same problem so I check my network manger and found that the settings were still there but were not applied. So I again choose the correct profile and applied the settings. This behaviour of being not being set up after a restart continued. It gets a little irritating having to go into network manager and apply setting after ever restart.

After reading around in fourums I found about about resov.conf resolvconf /etc/resolv.conf, /etc/resolvconf/interface-order and /etc/resolvconf/resolv.conf.d/. I could see that in interface-order and ifconfig my cabled lan card was begin configured correctly at start. In the resolv.conf file no dns servers were configured at start up, having no dns server to resolve requests out to the internet I could not browse the web or send emails or any thing you would need to do.

To solve the problem of not being set up at start up open the /etc/resolveconf/resolv.conf.d/base as root in a text editor and add a dns server like your router or some other dns server. Read the man resolvconf to find out why. Redundancy here is a good thing, have it point to more then one dns server.

Simply place entries like "nameserver 127.0.0.1" or "nameserver #your router#". Obviously 127.0.0.1 is localhost and probably wont work for the average set up. If your not sure what dns servers to use, ping a top level domain like www.com or www.co.za and get their ip address. Do a traceroute and look for domain names with .dns in them. You can see and example of how network manager saves one of these file in /etc/resolvconf/resolv.conf.d/original.

28 Aug 2008

linux the cisco vpn and monash south africa

I have spent quite a bit of time trying different options for the vpn connection to Monash South Africa. The open source vpnc dose not work because when importing the cisco profile it warns that IP tunnelling across TCP has been enabled. Which may cause undesired resualts, in this case it simply dose not work.

The only option left for linux is the cisco client which has not been updated since 2006. Major problem. Thus we now have to go to projects.tuxx-home.at. Here is the only way to get support for the cisco linux vpn client. There are instructions for intallation, patching and support forums. Every thing a person would need. I have used them on a number of different kernel builds, 2.6.18 -- 2.6.24. They all worked.

The vpn client on the web site dose not, but you still need to down load it to get the correct profile configuration file. It is called sa.pcf. You will need to copy that file to the cisco /etc/opt/cisco-vpnclient/Profiles/. Then all you need to do to start it is type "sudo vpnclient connect sa".
Enter your user name and password and every thing should work.

I have found some small issues with the gnome network manager and haveing both my lan network card and wireless network card enabled. So depending on how I am connecting to the internet I disable which ever one I am not using. Type "ifconfig" to find out which device to disable. Then type "ifcofig eth#" where # is the device number, some thing like 0 or 1.

Here is some more info on getting the cisco vpn working www.blog.arun-prabha.com/2008/05/01/cisco-vpn-installation-issue-with-ubuntu-804-hardy-heron/.

13 May 2008

Problems in Ubuntu 8.04 LTS

I recently upgraded to Ubuntu 8.04 LTS. I found that after using it for about 20 minuites their were certain things I could do that would totally crash the whole system. Later I found that it was a bug in the released kernel, check https://bugs.launchpad.net/ubuntu/+source/linux/+bug/188226.

It has to do with the cpu schedualer (Completely Fair Schedualer), not being configured properly for the desktop system. Their is already a way to fix it, but in requires over 100 mb of downloads to fix the problem. This will be a serrious problem to people who pay exhorbitant rates for internet access.

The basic solution is to update your system to an the latest development release kernel. From 2.6.24-16-generic t0 2.6.24-17-generic. Caution this 2.6.24-17-generic kernel
is a developmental release used for testing changes and bug fixes, it is not the same as the release version kernel. This new kernel will only be released 2008-07-01 it the next version of hardy, ubuntu-8.04.1.

Any way I upgraded to ensure that I have a Linux desktop that dose not stall any time I open two many windows or try to do thing as a different users, ie every time i use the sudo command to do some thing cpu intensive.

Fix
Using synaptic
Open Synaptic > Settings > Repositories
Go to the updates tab and select Pre-released updates ( hardy proposed)
Close the window and reload the package information.
Either navigate through the Base System Section or search to find
linux-image-2.6.24-17-generic
linux-ubuntu-modules-2.6.24-17-generic
Select both packages.
If you are using an nvidia graphics card you will need to also up grade it. Serach for
nvidia-glx-new - we want the version that matches our kernel, 169.12+2.6.24.12-17.36 instead of the old one 169.12+2.6.24.12-16.36 notice that the 12-16 / 12- 17 referes to the version of kernel supported. This should automatically include the
linux-restricted-modules-2.6.24-17-generic. Which include the binary / compiled modules necessary for the nvidia driver to work.
This should be all the updates that you need to fix the problem with out a major difficulty.
Next click apply and wait.
When it finished be sure to disable the Pre-released updates ( hardy proposed)
Synaptic > Settings > Repositories
Go to the updates Tab and select Pre-released updates ( hardy proposed)
And reload the package lists.

That should fix the problem, all this is described in the bug report check https://bugs.launchpad.net/ubuntu/+source/linux/+bug/188226. It also includes instructions on how to compile the kernel form source with the correct options. For more advanced users. This would probable save people form having to download a whole new kernel, and graphics card drivers.

18 Apr 2008

mips and spim materials to help you get started.

Here is a link to a full text book on the mips processor.
http://www.comms.scitech.susx.ac.uk/fft/programming/R4400_Uman_book_Ed2.pdf
You will not need to read the whole text book, but it will come in very hand if you are struggling with MIPS. Choose what you read out of this text book.

I found it at the following site http://2020ok.com/. Here you may find some other useful books on a range of other computer related topics.

Also check out http://en.wikipedia.org/wiki/MIPS_architecture to get a better understanding of MIPS.

The official web site for spim is one of the best places to go and has a lot of extra resources, make user you visit this web site. http://pages.cs.wisc.edu/~larus/spim.html.At the bottom of the page is a section on additional materials.

Lastly here is a link to a document I got of the net and cant remember where. I found it gave a good overview of all the very basics and is an excellent reference when writing simple MIPS programs. http://www.scribd.com/doc/2576056/SPIM

23 Mar 2008

ffmpeg

I spent close to 2 days trying to get around a problem with ffmpeg
Input #0, flv, from 'tmp.flv':
Duration: 01:43:15.8, start: 0.000000, bitrate: 64 kb/s
Stream #0.0: Video: flv, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Output #0, mp4, to 'tmp.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 29.97 tb(c)
Stream #0.1: Audio: 0x0000, 22050 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1

Which is basically saying that it dose not know how to take the audio input codec mp3 and produce and audio out put codec.

I tried to used the -acodec option to force output to mp3. Which as far as I understand I don't need to do as mp4 has both an mp4 video codec and audio codec.

The only site I found useful information on all in one place was http://howto-pages.org/ffmpeg/.
It describes how to compile from source and enable the different lib's required. I still found this site much more helpfull then the mailing lists that keep popping up in google searches.

This can be used as a work around for the mp3 encoding problem which I found at the ubuntu forums
ffmpeg -i inputfile.flv -acodec copy -vcodec mpeg4 outputfile.mp4

Whats important here is the -acodec copy, I dont know what the quality of the output will be like but at least it dose not bomb out in an error.

I found the quality to be good, not great just good. I lost some video information. The sound was great, no distortion or delay. The file size shrank close to 20%. I think that -sameq option could improve things but my file sise more then doubles. Which gets me great out put. I am going to experiment to try and get a better result.

18 Oct 2007

Another day, another cable

Another day, another cable

This article provides some interesting incites to why we pay so much for so little in South Africa when it come to the internet.

2 Oct 2007

vlc segmentation fault

I recently had problems with vlc media player. It would crash unexpectedly when running. It would not start when run from the Applications > Sound & Video > VLC. Occasionally it would start up but it would look terrible, or start two player interfaces. I then turned to the console using vlc, or wxvlc to get it to run. Some times it would come out with two player interface's, and whole string of exceptions.

Solution

in your home directory /home/yourhome/ their is a config directory for vlc called .vlc /home/yourhome/.vlc go and delete it completely. VLC automatically creates it when it is frist started. This will reset all the settings that could cause this type of problem.
rm /home/[you home dir]/.vlc

Immediately after doing that I tryied vlc from the application menu and it worked. I expect that I am not the only one to have this problem. I hope it helps some one else out there.

25 Sept 2007

Bauer-Power: Information is Power!

Bauer-Power: Information is Power!

A really good video on how data recovery works. It was associated with 2 links to sites that have more info. http://myharddrivedied.com/presentations.html and web.forensicspeak.com. If any one is interested in finding out more about recovering data on a hard drive I recommend these sites. If you are interested in taking apart a hard drive go to the video above.

I also recomend going to http://www.cgsecurity.org/ it explains to linux tools for data recovery. I have used the one and it worked for me. I was able to recover from bad partion information. It has a number of links as well to site that could prove to be useful.

15 Sept 2007

Coding Horror: Gigabyte: Decimal vs. Binary

Coding Horror: Gigabyte: Decimal vs. Binary

This is an in depth look at why a 250 gb hard drive is a lot less then the advertised size.

8 Sept 2007

Apache2 Documentation apache2-doc manuall problems

For those of us who want to find out how to fix the problem of apache2-doc at http://localhost/manual/ giving us junk like this

URI: index.html.de Content-Language: de Content-type: text/html; charset=ISO-8859-1 URI: index.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 URI: index.html.es Content-Language: es Content-type: text/html; charset=ISO-8859-1 URI: index.html.fr Content-Language: fr Content-type: text/html; charset=ISO-8859-1 URI: index.html.ja.euc-jp Content-Language: ja Content-type: text/html; charset=EUC-JP URI: index.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR URI: index.html.pt-br Content-Language: pt-br Content-type: text/html; charset=ISO-8859-1.

Which is a type map, which is meant to allow for multiple languages in the documentation. It dose not work so to fix it try the following at this link.Apache2 Documentation doesn't work - Ubuntu Forums.

I changed these instructions a bit by
sudo mkdir typemaps
and
sudo mv *.html to ./typemaps/
which moved the all the *.html type map pages to the typemaps dir. so if I need to restore them I can. you could also just delete them with
sudo rm -f *.html
but then you have no way of retrieving them. This post dose not contain any documentation on modifying the /etc/apache2/apache2.conf file.

You may have to repeat the above instructions in some of the /usr/share/doc/apache2-doc/manual/ sub directories, like: developer, faq, howto, misc, mod, rewrites, programs, platform, ssl, and vhosts. As the documentation links to them as well.

3 Aug 2007

Away From Home, by Ame Haji Ame's

This is a poem written by one of the students I tutored last semester. I think It is worth posting on my blog.

Away from home in a strange land.
Young people don't greet "Mambo?".
You don't greet strangers in this land.
No anymore "Salaam Alaykum" to everyone.
Here people judge you with your colour,
They don't judge you with your hair and finger nails.
No combing your hair is fashion in this land!
You can't walk alone as you do in Stone-Town streets.
The food is labelled 'Halal' for Muslims.
Drinking alcohol is not a sin but big business
Females smoke more than males in this strange land!

In this land, fish is more expensive than beef.
This land is not English, but they grow English tomatoes.
Here dates are more expensive than apples!
Spices are thirty times expensive in this land.

But good things are here:
People don't walk kilometres for water.
There is no power rationing in this land.
Houses have heaters and not coolers in this land

But money kills people each and everyday.
Innocent people die, criminals live in total happiness!
Crime rate is higher than inflation rate in this land!
Cars are the best transport than bicycles on this land.
Birds don't sing but shout on this strange land!
Cameras are everywhere, privacy is nowhere in this land.
Marriages are no more for the opposite, but for the same sex.
People care for things and not beings on this land.

This land is so strange, making you think of home always.
This land is strange, and has more strangers.
This is a land of fear, and is a land of dreams.

My land is the land of peace,
The land of spices, and not pieces.
My land is the land of people and not things.
My land is the only haven under the sun.

by Ame (A-Zu)

19 Jul 2007

A good resource on how 2 on configure feisty

This site http://ubuntuguide.org/wiki/Ubuntu:Feisty has a complete how to guide on every thing you would want to configure in Ubuntu. It is defiantly worth a look at.