disable network/wireless options from command line

Asked by Spinnekopje

I've been looking for an answer on this for a couple of days now, but I can't find anything useful. Maybe I missed something obvious but here is what I would like to do:

When I enable/disable wireless with the switch on my laptop it takes a long time before nm_applet seems to notice the different state. Certainly when I want to reconnect to a wireless network, that's very annoying.
Now I use the right click menu to enable/disable my wireless adapter, which makes the system disconnect/connect very quickly.
If I could use a script that calls nm_applet to disable or enable wireless (or the network completely) I can make it much more responsive and still use the switch on my laptop (which is much more practical to use).
Are there any command line options? Something like (just an idea) 'nm-applet --disable-wireless'

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
libby (lizmacli) said :
#1

hi i dont know whther you would want this or not but could you not run the application from a run application with root or sudo as the password

Revision history for this message
libby (lizmacli) said :
#2

what have you tried to do first?
what are you running windows /dual boot or ubuntu gnome what are you running
are you used to a newer speed adsl? have you tried this
then can you go into your preferred applications and desginate a command and put in what you said is it nm - applet

sorry im not much help but i thought if we knew more about the system youre running etc we could all help you, i know ive read a lot lately with ubuntu 8.04 about problems with wifi

let us know more ok

for a web browser

Revision history for this message
Ero-sennin (jasmin-mahmutovic) said :
#3

Hey hey...

Fairly new Ubuntu- and Linux-user here also... couple of months now or somethin'

anyway!

Spinnekopje:
I've had the same problem you have (had?) with shutting down or rebooting when network manager was still running. It took way too long for Ubuntu to perform either.

Then I actually had an idea to make a little script. Like you did.
I rightclicked with my cursor on my desktop and what do you know?
Create Launcher.

In the "Create Launcher" screen I chose "application in terminal" as the type of launcher I wanted to create.

Name should be the type of launcher you're creating obviously.
I have one for rebooting.

so I typed in the command: sudo reboot

comment ain't necessary..

and that works fine for me.
Actually.. I was googling to enhance that script and came across this thread. Like adding that close networkmanager.. and perhaps even the command so i dont need my password every time i click the launcher.

Anyway...! This will help a lot. I think the command for shutting nm_applet isn't even needed, because rebooting is a sinch with this launcher... It goes fast.
Perhaps I should ask how to add the command for automatic password approval in a new post. I'll keep an eye out for this one for now, I guess.

Anyway...
Too bad nobody decided to give you the commands and info for making that script... but this will definitely help you if you are still in need of it... or anyone else who might have ended up here in a similar fashion like I have.

Cyazzzz

Can you help with this problem?

Provide an answer of your own, or ask Spinnekopje for more information if necessary.

To post a message you must log in.