Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a new asus 1215n and I need to digit commands to enable multitouch. No problem: I've made a script. Since this netbook also need manual activation of the wifi driver the complete script is:

#!/bin/bash
#
# list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4
# list  current synaptics device properties: xinput list-props '"SynPS/2 Synaptics TouchPad"'
#
sleep 5 #added delay...
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9         #  Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels
xinput --set-prop --type=int --format=8  "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 1 1 0       #  vertical, horizontal, corner - values: 0=disable  1=enable
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 250 #  stabilize 2 finger actions - value=pad-pixels
#xinput --set-prop --type=int --format=8  "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 0 0 0 1 2 3   # pad corners rt rb lt lb tap fingers 1 2 3 (can't simulate more then 2 tap fingers AFAIK) - values: 0=disable 1=left 2=middle 3=right etc. (in FF 8=back 9=forward)
xinput --set-prop --type=int --format=8  "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0   #  vertical scrolling, horizontal scrolling - values: 0=disable 1=enable
#xinput --set-prop --type=int --format=8  "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling" 1
#xinput --set-prop --type=int --format=8  "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling Trigger" 3

sudo modprobe lib80211
sudo insmod /home/pitto/Drivers/broadcom/wl.ko


exit

I've saved the script, then put it in my home, then

chmod +x scriptname

and then added it to startup applications.

Then I did: sudo visudo and added this row:

myusername   ALL=(ALL) NOPASSWD: /home/scriptname

rebooted and...

Multitouch works but wifi not. When I manually launch the script it asks for sudo password so I thought it was because of modprobe and insmod commands and I've added those commands to sudo visudo. Nothing.

What am I doing wrong?

share|improve this question
    
The modprobe / insmod commands should be placed into /etc/rc.local without sudo (rc.local is invoked during startup, with root). –  João Pinto Jan 4 '11 at 20:46
    
Did you check dmesg for any errors regarding wifi? –  danizmax Jan 4 '11 at 20:47
    
Thank you mates... /etc/rc.local did the trick! Absolutely no error regarding wifi: if I insert the sudo password it works great but I would like it to work without inserting password –  Pitto Jan 4 '11 at 21:04
    
Thanks Stefano for editing! If you teach me the right tag to send scripts I'll do better next time :) –  Pitto Jan 4 '11 at 21:08
    
If you use the ``` character before and after a piece of text, it will be formatted as code. For longer code snippet, simply make sure they're indented with at least four spaces. For more information have a look at the editing help. @Pitto –  oKtosiTe Jan 6 '11 at 20:00

1 Answer 1

up vote 2 down vote accepted

The right /etc/sudoers configuration to prevent prompting for password is:

myusername ALL = NOPASSWD: /home/scriptname, /sbin/modprobe lib80211, /sbin/insmod /home/pitto/Drivers/broadcom/wl.ko

share|improve this answer
    
I've corrected it but it keeps asking me the password :/ –  Pitto Jan 6 '11 at 18:11
    
You have to add the /sbin/modprobe and /sbin/insmod applications to the NOPASSWD line in /etc/sudoers too. It would be a security risk otherwise. –  Raphael B. Jan 6 '11 at 19:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.