Automatically Disable the Touchpad when a USB Mouse is plugged in under Linux with udev v. 0.2

Diposkan oleh Unknown on Friday, March 14, 2008

I wanted to do it, came across this bug at Ubuntu.
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/116919

I made a generic version inspired by the appletouch howto and by the script
/usr/share/doc/xserver-xorg-input-synaptics/script/usbmouse
from xserver-xorg-input-synaptics

udev rule: /etc/udev/rules.d/85-synaptics.rules

# automaticly disable touchpad when usb mouse present
# (c) 2008 D. Jansen <>
# published under the GNU GPL 3.0, other licenses on request
SUBSYSTEM=="usb", SYSFS{product}=="*Mouse*"
ACTION=="add", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/home/djtm/scripts/touchpad-udev"
ACTION=="remove", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/home/djtm/scripts/touchpad-udev"


and the script /home/djtm/scripts/touchpad-udev

#!/bin/bash
# automaticly disable touchpad when usb mouse present
# (c) 2008 D. Jansen <>
# published under the GNU GPL 3.0, other licenses on request

if [ "$(grep -e Mouse /proc/bus/input/devices)" ]; then
xinput set-int-prop "Synaptics Touchpad" "Synaptics Off" 8 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 1
#synclient TouchpadOff=1
else
xinput set-int-prop "Synaptics Touchpad" "Synaptics Off" 8 0
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 0
#synclient TouchpadOff=0
fi
The new version no longer requires -- Option "SHMConfig" "On" -- in xorg.conf
More aboutAutomatically Disable the Touchpad when a USB Mouse is plugged in under Linux with udev v. 0.2

Installing 32-bit software's libraries in 64 bit Ubuntu

Diposkan oleh Unknown on Monday, March 10, 2008

I just came across an awesome tool that manages the installation of 32-bit libraries in a 64-bit system. It's called getlibs and I found out about it in a skype (2.0) installation guide for Ubuntu 64. The actual 2.0 guide is here.

And you may be interested in this forum thread about getlibs.
More aboutInstalling 32-bit software's libraries in 64 bit Ubuntu

Eat More - Lose Weight

Diposkan oleh Unknown on Wednesday, March 5, 2008

Eating breakfast helps teens lose weight, says US study - Health News, Health &Wellbeing - Independent.co.uk

Another study backs up the ethos that you should breakfast like a king as it is the most important meal of the day.

Nutrition expert Yvonne Bishop-Weston from Foods for Life Nutritionists London said today " It's good to see more research that vindicates our successfull weight management methods. Often you have to eat more not less to lose weight, up to five times a day. Breakfast really is the most crucial meal of the day to ensure you are relying on fuel rather than hormones to kickstart your day and balance your metabolism"

The study showed that those who tuck in to a healthy breakfast – and therefore end up with a higher calorie intake – still tend to have a lower body mass index than those who skip the first meal of the day.

The research was conducted at the University of Minnesota and published in the Paediatrics journal.

Dr Mark Pereira, who led the research, admitted the study could paint a confusing picture for those who believe that the less you eat the less you weigh.

"It may seem counterintuitive," he said. "But while they ate more calories, they did more to burn those off, and that may be because those who ate breakfast did not feel so lethargic."

Dr Peraira added that even cooked breakfasts were better than missing out on food altogether. "While it's best to go for a healthy option – a wholegrain cereal for instance – the evidence does seem to suggest that eating anything is better than eating nothing."

The research is one of a number of recent studies that give credence to the theory that breakfast is not only a crucial component of a healthy diet but also encourages the body to stay toned.

A recent French study found that men and women who ate breakfast at least 10 out of 12 days tended to have lower waist to hip ratios than those that who did not. And a study of nearly 7,000 middle-aged adults in Norfolk revealed that those who ate the most in the morning put the least amount of weight on overall.

Anna Denny, a nutritional scientist at the British Nutrition Foundation, said: "There have been quite a few studies now that show eating breakfast is a crucial part of keeping a healthy weight. The key concept is those who eat breakfast tend to be less likely to snack on high-fat foods before the lunch period and therefore have a much healthier diet."

Dr Pereira said: "This study clearly supports what other studies have shown: kids who skip breakfast tend to gain more weight, and therefore would be at a higher risk for obesity."
More aboutEat More - Lose Weight