Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

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/

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.

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/.

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.

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.

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.

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.

27 Jun 2007

Contacts, Calandar back up on online server

For a while now I have been looking for a way to sync my contacts, on my laptop and cell phone as well as my calendar. Scheduleworld.com provides a free way to do that.

It is compatible with Google's gmail, and gcal. So it provides an all in one solution. It also works with evolution mail client in Linux with a special plugin you can download.

All the information is on their web site. Check out these links to find out more.
http://www.estamos.de/projects/SyncML/Support.html
http://ubuntuforums.org/showthread.php?t=282408
http://www.scheduleworld.com/tg/syncmlInfo.jsp.

7 Jun 2007

nvidia restricted binary drivers and settings

I have found a really nice tool for setting up the xorg.conf and daul view. From the command line in Ubuntu type gksudo nvidia-settings. Up pops nvidias GUI tool for setting up your nvidia card and xorg.config.

Only it has problems, or at least I had problems. they relate to where some of the advanced nvidia settings are stored in a file called .nvidia-settings-rc. From your home directory type ls -a .nvidia-settings-rc. This file is basically used to initialize your graphics card at boot and is linked into the boot process through the init folder in /etc/rcX.d.

The problem I had with this file was that the permissions on it doesn't allow the program to rw access it and execute it. I may be wrong here. What I did to fix the problem was change the permissions from
user@user-machine:~$ ls -l .nvidia-settings-rc
-rw-r--r-- 1 user user 1511 2007-06-06 18:33 .nvidia-settings-rc
to
user@user-machine:~$ ls -l .nvidia-settings-rc
-rwxr-xr-x 1 aaron aaron 1511 2007-06-06 18:33 .nvidia-settings-rc
with a chmod 755 .nvidia-settings-rc. now it probably dose not need the execute permissions some thing to experiment with but make sure it has the rw.
basically try:
$ chmod u=rw,g=rw,o=rw .nvidia-settings-rc
$ gksudo nvidia-settings.

I still get a lot of ERROR .... (no Display connection) messages on the command line but at least now it actually generates the xorg.conf file in the /etc/X11/ directory.

I'm not sure what the error messages mean or how to fix it. It has some thing to do with the advanced options of gamma, colour saturation. This can be fixed but I didn't find it necessary to. There is some discussion at the nvidia forums. Check out this thread http://www.nvnews.net/vbulletin/showthread.php?t=61396 it seams to have the most though discussion on fixing it.

Please post you comment on this if you have any solutions for the ERROR ... (no Display connection) problem.

Ubuntu 7.04 Feisty Fawn

I am a real distro whore and have moved to yet another one. My favorite so far Ubuntu has always been on the top of the list of distros I wanted but with telkoms internet connection prices I have always chosen distros with more software then comes on the Ubuntu free cd.

I have used fedora 4, 5, and 6. I think that fedora gets a lot of free publicity because of Red Hat. It is no way near to the functionality and ease of use in the GUI that can be found in either suse or Ubuntu. I think any one who uses fedora just cause of it's relation to Red Hat should consider moving to suse or Ubuntu. I have only used these distros for desktop productivity, programing and web development. So as far as running a server is concerned I can't cant say which one is better.

I have used suse 9.2, 10, 10.1 and finally moved over to a complete Linux system one my acer travelmate 5623 with 10.2. I have to say that suse with yast make Life very easy. The GUI based install can be done buy any one and it is rpm based so all the red hat packages tend to be compatible. I have found it to be a little slow, and it has crashed on me relating to X windows problems. I have used the 3D desktop across two screens on suse with out much problems, although I prefer to use it with out desktop effects as it works better because Lap top and 19" dont have the same resolutions. Over all I am very happy with novels suse product. In terms of usability I have to say it is one of the easiest I have used.

I have installed Debian on an old Pentium 1 I had lying around. It was a pain, never got X to work so I never used the Gui. It was a pain to install, but then they aren't aim at making it easy to use they are aiming at making it stable so if X cant figure out what settings it is meant to have then it is doing what it was created to do be stable.

Now I have moved completely to Ubuntu. I was able to get a friend to download the dvd of 7.04 and this has so far been what I am looking for. I have struggled with X. Similar problems to that of Debian, the auto config is that automatic and requires some expert knowledge on how to set it up. But in general after googleing a bit I found the solutions I needed. For X and some other commonly tried advanced configurations such as visualization go to librenix. I also found that nvidia has made a graphical tool called nvidia-settings to solve most problems I will put my solution in a new post to make it easy to Google.

Ubuntu is faster then suse probably cause their generic kernel is using more i686 code and take better advantage of my SMP (symmetric muilt-processors, dual core). I have been playing with beryl and it is definitely hands down the best desktop effects product out there. More settings better features every thing is better. I still need to do some development on Ubuntu to get a better feel for it but so far it is exactly what I am looking for a LAMP system.

I understand them not including Java, adobe, and some other free but proprietary licensed software but once every thing is up and running all you need to do is enable the relevant repos through synaptic and you can easily download them. Synaptic comes close to yasts in that it allows you to add cd and dvd repos which make life a breeze. Synaptic though is not an all in one control panel like tool which is what yast is. I will stick with the way Ubuntu is laid out for the moment, though I might try to install yast a little later.

2 Jun 2007

xorg and xserver issues in Linux ubuntu

Dual monitor support in Linux seam lacking, so do tools to configure them. May be I not looking hard enough. I would have expected xorg to have written some nice GUI tools to configure the product.

Having to edit the xorg.config text file seams like a real waste of time, and is very confusing for new linux users. Do a search on google for xorg prolems and xserver problems there are just to many. Most come down the the automatic detection program / scripts not working. I dont have a problem with this cause there is just so much hard ware out their.

My suggestion for the the guys at xorg or who ever to create a nice gui front end for the xorg.config file with human understandable instructions on how to create a working conifg file. I will have a look into this my self when I have time. but in the mean time as I have now moved to ubuntu 7.04.

This link will suffice to help those wanting to create set up thier monitors for a dual view system http://ubuntuforums.org/showthread.php?t=221174.
This one is for just after install isues https://help.ubuntu.com/community/FixVideoResolutionHowto.
Like if you get the famous xserver failed to start error after a new install or you have screen resolution problems.

Free online and downloadable books

I am going to start of list of links for finding good free books to view on line or to down load. I will have a similar list as I have on the right hand side for ftp sites.

Good list of linux and open source materails as well as others. http://eo.yifan.net/users/k/aravind/olbooks.htm

9 May 2007

how to load a file in xspim

I am tutoring a class that teaches basic assembler using the mips architecture and spim. Im using linux so i got the source and compiled and installed it. I then began buy running xspim. What a pain no documentation enplaning any thing that I could make sense of. So here I am writing about how I got it to work.

This is how to load an assembler file and make sense of the first screen you see when you first run xspim.
start xspim buy typeing
#> xspim
at the comand line. or buy running it from the /usr/local/bin/xspim
#> /usr/local/bin/xspim
depending on your configuration.

The following window pops up.

The assembler you can see in the text segment part of the window doesn't run and out puts an error sayin
Instruction references undefined symbol at 0x00400014
jal 0x00000000 [main].
This code that is already loaded comes from the /usr/local/lib/exceptions.s file. It is the assembler code to load and run your file.

You can load your file buy clicking the load button in the middle part of the window. This is will open the following pop window.Input the file location relative to the root (/) directory ie as /home/#user/mips/my_file

click the assembly file button. You will see that the jal xxxxxxxx [main] command changes to reference your code at memory location xxxxxxxxx. which will be just after the load program code.
the jal xxxxxxxx [main] instruction is a jump and load instruction with the memory address and label [main] being the label. So you need to have a lable in your source code that contains a main label.
my_file looks like this
.text
main: addi $v0, $0, 5 # read into $t1
syscall
add $t1, $0, $v0
addi $t1, $t1, -32 # F -32
addi $t2, $0, 5
mult $t1, $t2 # (F -32) * 5 (mult before div)
mflo $t1
addi $t2, $0, 9
div $t1, $t2 # (F -32) * 5/9
mflo $t1
addi $v0, $0, 1 # print $t1
add $a0, $0, $t1
syscall
addi $v0, $0, 10 # exit
syscall

what's important here is th "main:" part of the code which will be where the jal xxxxxxxx [main] will jump to when running your assembler. Now you can step through your code and run it buy clicking the relevant buttons. You will notice that their args parameter references your mips file. You will need to edit your mips assembler file with an other program like gedit, or scite.

It took me a while to figure out how all this worked as the documentation dose not have a quick start tutorial or any thing like that. I hope this will be use full for some assembler hackers out there.

15 Apr 2007

New kernel for suse 10.2

I recently upgraded my suse kernel to suse to the one available in the update source that yast automatically adds. It fixed among other things the spdif out that my head phones jack into. Previously it didn't work although sound did and it played through the speaker built into my laptop.

It seams to be more responsive as well in gnome. If their are any other big changes I notice I will post about them as well.

1 Mar 2007

Operating Systems and A new computer

I recently got an new Acer travelmate 5623, as my previous HP nx9110 stoped working. According to HP it stoped working because of mother board ware and tear. Which would cost R 5000 to replace.

My new Acer came with vista as it was a R 1000 cheaper to go with vista over XP. Apparently Acer is not shipping their products with system disks. So I had to use my DVD writer to create an image of my system for back and install purposes. Good thing to, with in 2 days I had to reinstall vista to get around an annoying error message that kept coming up. It had to to with user profiles and the folders linked to them.

Vista gave me the a real shock when I saw that the system was using 600MB of ram from start up. So I set about changing some of the services and performance setting to see if I could change that. I prefer to at least 80 % of my ram free. I was only able to free up 200MB. So 40% of my ram is dedicated to just ruining my system.

I have had one trouble of another since I got vista. Their program compatibility system kinda works as I was able to install and use open office and FireFox. I could get it to work with PDFcreator, it just wouldn't let me install it.

Vista is a bit easier to use but that dose not account for more then half my ram disappearing. Gnome is just as easy use if not more and it only requires along with the Linux system about 220 MB on start up. Which is why I am now switching to opensuse 10.1.

I hope to do every thing this semester in Linux, and after trying out opensuse 10.1 on one of my external drives I have to say Linux is really impressing me. Novel has really done some thing impressive with suse. It is almost an replacement for Windows in terms of productivity and easy of use.

Almost a replacement but not quite. I have to manually install my Realtech 8111 network card and my Intel pro 3945 doesn't work probably. Linuxes big problem is still hard ware compatibility. Hardware manufactures are sticking to where the money is and at the moment that is with windows. The just don't put in the same effort to make hardware work with Linux.

Their are still solutions to all these problems but they are some times very complex. For instance to update the driver for my wireless card I have to download and separately install 5 different packages to get around the dependency hell in the Linux system.

I still plan to move to the more stable and efficient suse 10 .1 with Gnome as my desktop because I can Google my Linux problems and find a solution, but with windows I have to wait till some lackey at Microsoft puts out a security up date to fix my vista problems. I will and suggest any one wanting to go the vista route wait till SP1.