[openbox] "root command" in autostart.sh

stefanozanobini stezano at gmail.com
Wed Aug 1 17:17:23 EDT 2012

Dear Christian,

2012/7/30 Christian Larsson <larsson at odus.se>

> 2012/7/30 stefanozanobini <stezano at gmail.com>
>> Due to problems with nm-applet (network manager tray icon), I should
>> start it as root.
>> Is it possible to start as root a programm with autostart.sh?
>> Something like "sudo nm-applet" (but without password request!)
>> thanks
>> ste
> Something like this in /etc/sudoers should do it:
> user ALL=(ALL) NOPASSWD: /usr/bin/nm-applet, PASSWD:ALL
> should I write something like this in "autostart.sh":
(sleep 4s && sudo nm-applet --sm-disable) &
or shall I write the command without "sudo"?

Dear Johan,

You probably aso need to COMMENT the line
>   Defaults    requiretty
> I've found no "requiretty"
there are these "defaults" lines in my sudoers file:

Defaults    env_reset
Defaults    mail_badpass

What do you mean?

And at least, Dear Ian,

You can easily configure sudo to not ask for passwords in specific
circumstances, such as when executed by a specific user.

A much thornier problem in this situation is going to be the transfer of
your X11 authentication token to the root account.  Read "man xauth" for
that.  It is doable but tricky enough (in combination with a program
such as sudo) then for a long time I bypassed all this by running a ssh
daemon and executing something like

ssh -o ForwardX11 root at localhost nm-applet

which takes care of the X11 details.

I don't do this anymore because I have no use for rooty X programs.

I'm to newbie to understand what I should do.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20120801/16819a62/attachment.htm>

More information about the openbox mailing list