I am using the MadWiFi wireless networking drivers on a Mandrake system using KDE. I wrote a small file that will run all of the commands needed to enable the drivers:
Code:
#!/bin/bash
# Bring up MadWiFi
modprobe wlan
modprobe ath_pci
modprobe ath_hal
iwconfig ath0 ESSID wlanhome
ifup ath0
This file works just fine when I run it from the terminal as root. What I would like to do, though, is make an icon on the KDE desktop that will run this script. I added a new "Link to Application" and pointed it to the right file and set it to run as another user (in the advanced properties) and set that user to "root". When I doubleclick the link, it asks for the root pasword, then gives the following:
Quote:
Password:
/home/m_a_b/madwifi_up_home: line 4: modprobe: command not found
/home/m_a_b/madwifi_up_home: line 5: modprobe: command not found
/home/m_a_b/madwifi_up_home: line 6: modprobe: command not found
/home/m_a_b/madwifi_up_home: line 7: iwconfig: command not found
/home/m_a_b/madwifi_up_home: line 8: ifup: command not found
|
These are the same errors I get if I try to run the script in the terminal from anything but the root user. Does anyone know what I'm doing wrong? Ideally, when I doubleclick the file, it would prompt for the root password then run the script properly - enabling my wireless connection.