I have a wireless adapter that used to work in ubuntu 13.10 (dwa 171) after installing drivers for it. Now it won't work the same way anymore since I upgraded to ubuntu 14.04.

I've found the only way to make it work properly is to run the command sudo service network-manager restart I already tried putting this command in rc.local, rc2.local and rc3.local with no real luck. I want this command to run automatically right after login in with startup application program. Please tell me how to.

  • it doesn't work if u put on startup program list?
    – Geo
    Jul 22, 2014 at 23:50
  • sudo is not expected or required in rc.local.
    – chili555
    Jul 22, 2014 at 23:51
  • I didn't put sudo in rc.local and no it doesn't work on startup program list because it has sudo I think Jul 23, 2014 at 0:12
  • to run a command as root after login, this is an option: askubuntu.com/a/486304/72216 Jul 23, 2014 at 6:43

2 Answers 2


The sudo command expects you to enter your password via a command prompt. Use gksudo instead, and you will be shown a GUI prompt to type your password in.

So the command to add to your startup applications would be:

gksu service network-manager restart

You might also want to delay that command from running right away, to give your desktop a chance to load:

sleep 15s; gksu service network-manager restart
  • Is there a way to make this command run seamlessly without any user interaction once it's set? Jul 23, 2014 at 21:02

Hi everyone thanks for trying to answer my question. I have found a permanent fix for my network adapter that the newer release of ubuntu broke. My solution involved getting this ppa: deb http://ppa.launchpad.net/mathieu-tl/nm/ubuntu saucy main it has Ubuntu's 13.10 network manager package and wpasupplicant package. I went to synaptic and downgraded only the wpasupplicant package. I never have to run the command sudo service network-manager restart again.

  • This shouldn't be the accepted answer, cause it doesn't answer the question at all
    – rubo77
    Oct 14, 2014 at 19:50
  • It does answer the question because my initial problem was that my network adapter stopped working after upgrading to a newer release of ubuntu. Now it's fixed thanks to this. I advise you to read the description. Jan 11, 2015 at 2:38

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