PDA

View Full Version : Add services to the SERVICES applet?



radiojef
September 14th, 2006, 02:27 PM
Is it possible to add services to the services applet? Here is why I ask...

I have a Wireless adapter that I have to use 'ndiswrapper' on everytime I reboot. I setup 'ndiswrapper' for the correct driver and device, so when I restart I open a terminal and type:
sudo modprobe ndiswrapper
Not a big deal, but part of the fun of Linux is figuring out how to automate your system details, right? I tried to write a script and add it to the sessions > startup programs manager...the script looked like this
#! /bin/bash
modprobe ndiswrapper
This didnt work. Not sure why. Anybody got any ideas?

ComplexNumber
September 14th, 2006, 02:31 PM
add it to the file: /etc/rc.d/rc.local
mine looks like this now:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

/sbin/modprobe ndiswrapper

radiojef
September 14th, 2006, 02:44 PM
Thanks!
Can you explain what the 'touch' line is actually doing?

Appreciate it.

ComplexNumber
September 14th, 2006, 02:48 PM
Can you explain what the 'touch' line is actually doing? don't worry about that. just add '/sbin/modprobe ndiswrapper' to the file. i'm running fedora and the 'touch' statement was in there since i first installed it.

John.Michael.Kane
September 14th, 2006, 02:57 PM
Heres some info in reguards to the touch command http://www.bellevuelinux.org/touch.html

Ramses de Norre
September 14th, 2006, 04:52 PM
All modules in /etc/modules are loaded when you boot, so this line will automate the loading through an inbuilt and secure method:

echo "ndiswrapper"|sudo tee -a /etc/modules

jdong
September 14th, 2006, 06:23 PM
1. There is /etc/rc.local, which is a script executed at the end of every bootup

2. For modules, you should really be using /etc/modules.

3. For ndiswrapper, using sudo ndiswrapper -m should set this up for you automatically.

radiojef
September 14th, 2006, 10:03 PM
In other words, I should add "sudo ndiswrapper -m" at the end of the modules file in /etc/?

ComplexNumber
September 14th, 2006, 10:07 PM
In other words, I should add "sudo ndiswrapper -m" at the end of the modules file in /etc/?
either there or in /etc/rc.d/rd.local. thats where i've put mine and i've been connected wirelessly for the past month or so.

jdong
September 14th, 2006, 10:13 PM
sudo ndiswrapper -m is a command you issue at the command line. It will do the /etc/modules work for you.

radiojef
September 15th, 2006, 07:09 PM
It worked when I used sudo ndiswrapper -m in the terminal. But ComplexNumber...I dont have the directory you specified. See the attachment.

NoTiG
September 15th, 2006, 07:30 PM
Speaking of which........ If i do ndiswrapper -m and write it to my modules.d directory...... it will cause my gnome login to take about 5 minutes... whereas if i just wait till gnome loads and them type sudo modprobe ndiswrapper in the terminal... it works instantly. im not sure why it is doing this... i filed a bug on launchpad. but it would be nice to try a different way and maybe use the rc.d thing.... but i dont have an rc.d directory. i have rc0.d and rc1.d etc...........

radiojef
September 15th, 2006, 07:39 PM
Speaking of which........ If i do ndiswrapper -m and write it to my modules.d directory...... it will cause my gnome login to take about 5 minutes... whereas if i just wait till gnome loads and them type sudo modprobe ndiswrapper in the terminal... it works instantly. im not sure why it is doing this... i filed a bug on launchpad. but it would be nice to try a different way and maybe use the rc.d thing.... but i dont have an rc.d directory. i have rc0.d and rc1.d etc...........

That is odd. Adding it to modules caused no noticable lag in the GNOME bootup for me. Anybody?

ComplexNumber
September 15th, 2006, 08:05 PM
But ComplexNumber...I dont have the directory you specified. See the attachment.
if you look about 5/6 of the way down, you will see that you do have rc.local file.

radiojef
September 15th, 2006, 08:11 PM
Oh yeah, but its not in the /rc.d/ directory. Are the two the same?

ComplexNumber
September 15th, 2006, 08:15 PM
Oh yeah, but its not in the /rc.d/ directory. Are the two the same?
they are like peas in a pod - ie exactly the same.

radiojef
September 15th, 2006, 08:16 PM
10-4 buddy. Thanks.

maniacmusician
September 15th, 2006, 08:21 PM
the correct procedure to get ndiswrapper to start at boot is this:

sudo ndiswrapper -m

sudo kate /etc/modules ---> add ndiswrapper to the list of modules.

save the file you can replace kate with the editor of your choice. hehe you dont have to make it so complicated.

ComplexNumber
September 15th, 2006, 08:34 PM
the correct procedure to get ndiswrapper to start at boot is this:

sudo ndiswrapper -m

sudo kate /etc/modules ---> add ndiswrapper to the list of modules.

save the file you can replace kate with the editor of your choice. hehe you dont have to make it so complicated. thats the first i've heard.