Dear Christian,<br><br><div class="gmail_quote">2012/7/30 Christian Larsson <span dir="ltr"><<a href="mailto:larsson@odus.se" target="_blank">larsson@odus.se</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/7/30 stefanozanobini <span dir="ltr"><<a href="mailto:stezano@gmail.com" target="_blank">stezano@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Due to problems with nm-applet (network manager tray icon), I should start it as root.<br>Is it possible to start as root a programm with autostart.sh?<br>Something like "sudo nm-applet" (but without password request!)<br>
<br>thanks<br>ste<br>
<br></blockquote></div><br>Something like this in /etc/sudoers should do it:<br><br><span style="color:rgb(51,51,51)">user ALL=(ALL) NOPASSWD: /usr/bin/nm-applet, PASSWD:ALL
</span><br>
<br></blockquote><div class="im">should I write something like this in "autostart.sh":<br>
(sleep 4s && sudo nm-applet --sm-disable) &<br>
or shall I write the command without "sudo"?
<br><br>Dear Johan,<br>
<br>
</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You probably aso need to COMMENT the line<br>
<br>
Defaults requiretty<br><br></blockquote><div>I've found no "requiretty"<br>there are these "defaults" lines in my sudoers file:<br><br>Defaults env_reset<br>Defaults mail_badpass<br>Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"<br>
<br>What do you mean?<br></div></div><br>And at least, Dear Ian,<br><br><blockquote>
You can easily configure sudo to not ask for passwords in specific<br>
circumstances, such as when executed by a specific user.<br><br>
A much thornier problem in this situation is going to be the transfer of<br>
your X11 authentication token to the root account. Read "man xauth" for<br>
that. It is doable but tricky enough (in combination with a program<br>
such as sudo) then for a long time I bypassed all this by running a ssh<br>
daemon and executing something like<br><br>
ssh -o ForwardX11 root@localhost nm-applet<br><br>
which takes care of the X11 details.<br><br>
I don't do this anymore because I have no use for rooty X programs.<br style="color:rgb(0,0,0)"></blockquote>
<span class="HOEnZb"><font color="#888888"><span style="color:rgb(0,0,0)">I'm to newbie to understand what I should do.</span><br></font></span><br>