Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

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.

share|improve this question

marked as duplicate by KasiyA, Richard, mikewhatever, LnxSlck, bcbc Oct 16 at 20:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
it doesn't work if u put on startup program list? –  Geo Jul 22 at 23:50
    
sudo is not expected or required in rc.local. –  chili555 Jul 22 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 –  Tatakai Wasumi Jul 23 at 0:12
    
to run a command as root after login, this is an option: askubuntu.com/a/486304/72216 –  Jacob Vlijm Jul 23 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
share|improve this answer
    
Is there a way to make this command run seamlessly without any user interaction once it's set? –  Tatakai Wasumi Jul 23 at 21:02
up vote -1 down vote accepted

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.

share|improve this answer
    
This shouldn't be the accepted answer, cause it doesn't answer the question at all –  rubo77 Oct 14 at 19:50

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