Skip navigation

Tag Archives: Linux

When I got my new T410s a couple of months ago, the first thing I did was pop in a live cd of 10.10 and check out the hardware support. I found that the Lenovo’s red pointing stick scrolling nor the two finger trackpad scrolling worked with a fresh version of Ubuntu. I relied on these navigational controls, so I set out to remedy this situation.

To fix the red pointing stick + middle button scrolling do the following:

create file /usr/share/X11/xorg.conf.d/20-thinkpad.conf and add:

Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TrackPoint"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection

Restart X session
$>sudo service gdm restart

Now you should have middle button + trackpoint scrolling. Let’s get two finger scrolling back too:

Now /usr/share/X11/xorg.conf.d/20-thinkpad.conf looks like:

Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TrackPoint"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection

Now append to it:

Section "InputClass"
Identifier "touchpad catchall"
MatchProduct "SynPS/2 Synaptics TouchPad"
MatchDevicePath "/dev/input/event*"
Option "VertTwoFingerScroll" "on"
Option "EmulateTwoFingerMinW" "8"
Option "EmulateTwoFingerMinZ" "40"
EndSection

Save and close it. Now open a terminal (ctrl+alt+t) and type:
$>gconf-editor

Now change desktop->gnome->peripherals->touchpad->scroll_method to 2.

Restart Gdm. Now you should have two finger scrolling and trackpoint scrolling.

Sources:
Trackpoint info
http://psung.blogspot.com/2010/04/thinkpad-trackpoint-scrolling-in-ubuntu.html
Two-finger Scrooling method 1 (didn’t work for me)
http://sunilgarg.com/2007/10/enable-two-finger-scrolling-in-ubuntu/
Watch dmesg
http://www.backtrack-linux.org/forums/beginners-forum/35966-continuous-dmesg-output.html
Two-finger scrolling
http://ubuntuforums.org/showthread.php?t=1603657

The command:
$>dmesg

Prints out the driver message buffer in Linux. If you want to catch device events (eg. when inserting new hardware like a usb stick), dmesg is one way to print out these events. To watch them in real-time, use the watch command:

watch "dmesg | tail -20"

Step 1: Tethering

Running Android? Install azilink
Something else? Find a way to tether…

Make note of the device you’re using to connect (e.g. azilink –> tun0, “real tethering” –> usb0, etc)

Step 2: Ad-Hoc Network

— Server side (the tethered device) —

# Set up ad-hoc network:
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid Jkrez # <-- network name here
ifconfig wlan0 10.0.0.1

# Some quick permissions…
echo 1 > /proc/sys/net/ipv4/ip_forward
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1

# Make me a router! (note -o “output” device, -i “input” device)
iptables -A FORWARD -o tun0 -i wlan0 -s 10.0.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE

— DHCP Server —

Don’t want to manually configure clients? Time for a little dhcp3d server action:

sudo apt-get install dhcp3-server

edit /etc/default/dhcpd3-server

INTERFACES="tun0" #<-- same interface name as above

edit /etc/dhcpd3/dhcpd.conf
Add/change the following:

authoritative;

option domain-name “Jkrez”; #essid from before
option domain-name-servers 4.2.2.2 #Google dns, or your favorite dns

subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.1;
option subnet-mask 255.255.255.0
option time-offset -18000; #Eastern timezone
range 10.0.0.100 10.0.0.200;
}

Then run:
sudo /etc/init.d/dhcpd3-server

Now clients should be able to auto connect. Enjoy!

— Don’t want to mess with a dhcp server? —

Set up a client (GUI edition!)

In NetworkManager try to connect to Jkrez (this will fail since no dhcp)
Right Click and “edit connections”, in Wireless tab select Jkrez and “Edit”
Go to IPv4 Settings and enter:
IP 10.0.0.2 # Unique IP for each client
Netmask 255.255.255.0
Gateway 10.0.0.1

DNS 4.2.2.2 # Or your favorite nameserver

These steps can also be done via CLI; setup ad-hoc wifi same way using iwconfig, ip/mask/gateway via ifconfig, and dns vi /etc/resolv.conf

—————————-

Thanks to my friend Pat, and the following linux links for tips along the way:
https://help.ubuntu.com/community/Internet/ConnectionSharing?action=show&redirect=InternetConnectionSharing
https://help.ubuntu.com/community/dhcp3-server