martes, 9 de septiembre de 2008

activate/deactivate Touchpad on linux

I think I already wrote this some time ago but I think is enough interesting to repeat the explanation.
So, for all the people who has a laptop and, as they're typing their hand touches the touch-pad and moves the pointer to any place on the screen, making them start writing on another place.Too uncomfortable!

So, it must be edited the file /etc/X11/xorg.conf as root and change the following things:

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
#Deactivate this:
#InputDevice "Mouse0" "CorePointer"
#And write the next:
InputDevice "TouchPad" "CorePointer"
EndSection


Now, we have to add the following text to let xorg knows we're using a touch-pad


Section "InputDevice"
Identifier "TouchPad"
Driver "synaptics"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
Option "Emulate3Buttons" "yes"
Option "CorePointer"
EndSection



And also, we must comment the lines about the original configuration about mouse:

#Section "InputDevice"
# generated from default
# Identifier "Mouse0"
# Driver "mouse"
# Option "Protocol" "auto"
# Option "Device" "/dev/psaux"
# Option "Emulate3Buttons" "no"
# Option "ZAxisMapping" "4 5"
#EndSection



Now, we can use
synclient
, a program that can modify parameters of the touchpad on the fly, without restarting the xorg ;)

$ synclient -l
will show all the parameters of the touchpad
TouchpadOff
Is the option that shows if the touchpad is working or not so, we can do a script like that:

if synclient -l | grep "TouchpadOff = 0" > /dev/null
then synclient TouchpadOff=1
else synclient TouchpadOff=0
fi


Only configure one key of your keyboard to run this script ;)

P.S: There's some computers that has practical key so, once the xorg configuration file has being set up, the key works:D

lunes, 8 de septiembre de 2008

Sweden, Bredband and Xavi x5258-p2 router

So, since I arrived here, in Stockholm, most of the time I've been speaking English so I've decided change the language of this blog to English. Because is more useful for everybody and also, I want to practice my writing English. So, here's the first post in English:

well, When I arrived here, I saw I can connect to the net by cable or by wifi. The problem was the wifi has WEP crypt and so, since it's too insecure, I decided to change it to WPA crypt.

The first problem was that the router is in Bridge mode so the ip given is a public one and what we need is enter in a private ip: 192.168.1.1, the address of the router. Then, first of all we have to configure our computer with a ip in the range of 192.168.1.1/24 like, for example: 192.168.1.2
Now, we open our favorite browser and write the address 192.168.1.1.
Now, it should appear this on your screen:



There are two ways of enter: as user (less and basic options) or as admin (all access) so:
For admin: user: admin // pass: qwerty
For user: user: user // pass: user

If we enter as an admin, It will appears this:



All changes you do in the wireless configuration, must be followed by a restarting of the access point ("Management" on the menu, "System command" and "Restart access point"



Good luck for everybody who has this router!