Hi, my wireless wasn’t working because the button to turn it on doesn’t work in SUSE.
I followed this post in a thread
My results were good but now how do I add this to start up so I don’t have to manually do this every time I boot?
Thanks
Hi, my wireless wasn’t working because the button to turn it on doesn’t work in SUSE.
I followed this post in a thread
My results were good but now how do I add this to start up so I don’t have to manually do this every time I boot?
Thanks
You could create a file /etc/init.d/after.local with all those statements in it. It will be executed at the end of the boot process (when you reach your default runlevel).
Thanks but being a total linux noob I don’t know how to do that and searching isn’t helping me either. I did try to edit the file they talked about in that thread but it asked where I wanted to save it and that it can’t make a backup copy.
Thanks
If I understood you correct, you have a sequence of statements that do what you want. Create a plain text file with those statements in it (I more or less assume you have that allready). When a line starts with sudo, remove that word, because when we are ready it will be executed by root automagicaly. Let us assume tha name of the file is myrfkill.
Then open a terminal and use the cd command to go to the directory where myrfkill sits. Then type:
sudo cp myrfkill /etc/init.d/after.local
It will ask for the root password.
Do a reboot and check if it does what you want.
Not really, as indicated by its name, /etc/init.d/after.local will be executed after the runlevel has been reached, which does not make sense here, as you want to activate the device before any networking service is started.
For NWM this -most likely- won’t be a big problem but for ifup this would be deadly.
Either boot.local (which would be my choice as it already exists) or before.local make much more sense.
Ok made the file, terminal does not let me get to home, documents where I saved it… says no such file or directory. I need baby steps lol.
OK I got it but can’t remember where I found the file to edit but seems like it was in my home somewhere LOL.
OK think it was root, kevin (my profile), documents, boot.local
@Akoelh. I choose for after.local because I guessed that NWM is used. And boot.local could be to early. I wanted to see if it helped the OP and then eventualy change to other possibilities.
@kbz1960. When you want us to understand what you are doing or getting please do not tell cryptic language, but copy/paste your terminal session. And do not forget to post it between CODE tags: Posting in Code Tags - A Guide.
Sorry, I didn’t use terminal to do it. I edited that file with a word processor and reboot and wireless works now at startup.
Us total linux noobs don’t know these things. Guess maybe I just got lucky that it worked?
You should use an editor, not a word processor. You did not tell if you use KDE or Gnome (in fact you did not tell very much at all), but both have their editor.
You should also be very carefull using root. You do not say so, but I hope you did not use that wordprocessor as root, that would be a major sin and could be disastrious.
Please go to New User How To/FAQ (read only) and read tthe new users information. There are links there to more new users information. As long as you can not even use a terminal your changes to survive as system administrator are not good.
Well then when someone says that they are a total noob maybe the people that reply should give more than, Add it to this file. I didn’t use the word processor as root, I don’t think anyway and it’s working. Do I need to change it and do it differently?
When it works it will be allright. Do not touch it.
Many people say they are noobs or total noobs. As there is no defined scale for this and we do not run exams it is still difficult for other people to know what that means. I allready gave a lot of steps. I could have gone down in a few mor posts to: “hit the key on the keyboard that has the symbol S on it short but but not to soft …”. But I must admit that talking to someone who even does not know how to start a terminal is new to me.
I know how to start a terminal but I don’t know lunux commands. In dos to get to where I saved the file that
Default Re: How to add rfkill to startup
If I understood you correct, you have a sequence of statements that do what you want. Create a plain text file with those statements in it (I more or less assume you have that allready). When a line starts with sudo, remove that word, because when we are ready it will be executed by root automagicaly. Let us assume tha name of the file is myrfkill. Then open a terminal and use the cd command to go to the directory where myrfkill sits. Then type: Code:
sudo cp myrfkill /etc/init.d/after.local
It will ask for the root password.
Do a reboot and check if it does what you want
I would type c:\cd \root\home\kevin to get to the folder/directory that I saved the file in. Terminal kept saying didn’t exist or something simular I could not cd to that path. I have to learn and being a system admin for myself is no problem, if I mess it up it’s no big deal esp. if I learn something after all it’s all new to me and I know nothing about it. I do know computers and windows systems as I help all of my family and friends with their computer (windows) problems and fix them for them. I also use teamviewer to support them remotely.
Anyway thanks for you help and I will be reading the link you attached.
No, /etc/init.d/boot.local is the best place for such commands.
Will be executed directly after the bootup scripts (/etc/init.d/boot.whatever), so all basic setup is done but no runlevel specific stuff has been called yet
Will only be executed on startup and not on every change of runlevel
As said before, using after.local with ifup you will have a problem for sure and with NWM it might work but only due to the delay created by logging in.
First, \ is not a character that separates directories as you seem to believe, it is /.
Second, when you start the terminal from your GUI session as kevin, you are automaticaly in the home directory of kevin (most probably* /home/kevin*).
Third, when you stored the file in that home directory (and not in a subdirectory of it) you are allready in the correct place.
Fourth, there is no need to “know” what you should type there because I spelled it out for you and you do not even need to type it, but copy/past from my post would let you use it without any typo from your side.
Wishing you success.
Yes I figured out that for linux it is / but what you typed was cd to the directory where you saved the file so I could not just copy and paste as you said because you had no idea where I copied it. But thanks again for your help. Now if akoelth would like to tell me in detail how to fix this I just might learn something again.
What do I use to edit the file with?
Is an editor a terminal? As my language os cryptic you, yours is cryptic to me.
For the record, udev as an alternative, such low-level stuff is the perfect job for udev IMHO:
ACTION=="add", SUBSYSTEM=="rfkill", ATTR{name}=="phy?*", ATTR{type}=="wlan", RUN+="/usr/sbin/rfkill unblock wlan"
See
http://reactivated.net/writing_udev_rules.html
for a general reference on writing udev rules.
P.S.
Some of the information of that link is slightly outdated, i.e. “udevinfo” should be replaced by “udevadm info”, but the basic principles still apply.
//Edit:
ACTION=="add", SUBSYSTEM=="rfkill", ATTR{name}=="phy?*", ATTR{type}=="wlan", ENV{RFKILL_STATE}=="0", RUN+="/bin/sh -c 'echo 1 > /sys/$env{DEVPATH}/state'"
This rule looks better as it does not even rely on package rfkill to be installed.