2010年12月29日 星期三

Let some command without input password

1) execute visudo to edit the script of sudoer
sudo visudo

2) add below text in editor, hit ctrl-x and 'Y' to save it
wnc ALL= NOPASSWD: /sbin/shutdown


2010年12月24日 星期五

Update Linux shared library

cp libxxx.so /usr/local/lib
ldconfig -v -n /usr/local/lib

2010年12月8日 星期三

touchscreen calibration


From: Tias 
There is now a generic touchscreen calibration utility that can 
calibrate evtouch, as well as evdev (the now preferred upstream driver 
for touchscreens) and others.

I've uploaded it to mentors and mailed:
http://lists.debian.org/debian-mentors/2010/08/msg00066.html

You can download a binary deb package on the website:
http://github.com/tias/xinput_calibrator/downloads

More info on the homepage:
http://www.freedesktop.org/wiki/Software/xinput_calibrator



2010年1月26日 星期二

to enable wifi driver and WPA_supplicant

#!/bin/sh
# load wifi driver
insmod sdio.ko
insmod tiwlan_drv.ko
tiwlan_loader
ifconfig tiwlan0 up

#
# the content of /data/misc/wifi/wpa_supplicant.conf
#
# ctrl_interface=/var/run/wpa_supplicant
# ap_scan=1
# update_config=1
#
# #any AP
# network={
# key_mgmt=NONE
# }
#
# #WEP key
# network={
# ssid="xwlan"
# key_mgmt=NONE
# wep_key0="12345"
# wep_key1=31323334353536383930313233
# wep_tx_keyidx=0
# }
#
# #WPA or WPA2
# network={
# ssid="xwlan"
# key_mgmt=WPA-PSK
# psk="hellohello"
# }
#

#make sure /var/run folder is existence
#mkdir /var; mkdir /var/run

# execute wpa_supplicant
wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd &

# wpa_cli is a CLI application
#wpa_cli -p/var/run/wpa_supplicant

# dispatch ip address
#ifconfig tiwlan0 192.168.5.11 netmask 255.255.255.0 up
/system/bin/dhcpcd -BKL -d tiwlan0 &

# telnetd
#/data/bin/busybox telnetd -l /system/bin/sh