I’m trying to add BTNX to autostart but due to the fact that i needs root privileges to run i am kinda stuck. I figured that if i can make it run as a normal user things should go smooth from there. So i edited /etc/sudoers to do :
%users ALL = (myusername)NOPASSWD: /etc/init.d/btnx
However, running btnx on terminal as a normal user still pops up
Absolute path to 'btnx' is '/usr/sbin/btnx', so running it may require superuser privileges (eg. root).
OpenSuse 12.3, KDE. BTNX was installed from software.opensuse.org (both btnx and btnx-config). And BTNX is working as intended if i start it from root, keybind work in games via wine, no delay.
On 03/26/2013 06:06 PM, rbarsoianu wrote:
> both btnx and btnx-config
then i would have to assume* it runs as a service, like other
daemons–so i’d expect if you opened YaST > System > System Services and
-click on “Expert Mode” (you are an expert, right?)
-scroll down to BTNX
-click to start up in runlevel 2, 3 and 5
-click the Start/Stop/Refresh button and select “Start now”
-click the “Ok” button
(i assume* because i have not installed it just so i can find and
read the docs to see how they say to set it up–maybe what i write is
not possible, but i think it should be if it is correctly installed
by a well working one-click)
Thx for the reply, DD’s solutions seems rlly nice. And btw i’m not an expert :). However in System Services i cannot select the runlevel, maybe it’s a bug, therefore the service cannot autostart. Any ideeas ?
I know what i have to run in order to start it, however i want it to autostart, without asking me for a password. That’s why i thought sudoers might come in handy. However DD’s solution seems rlly nice, it’s just that the runlevels don’t show up for some reason, check the print here : View image: yast2 000
hmmmm…maybe this has something to do with this new systemD
thing…in your image i can see a button named “Help” can you learn
something in there? i would hope you can!!
or, if you first push the “Start/Stop/Refresh” button…and if you
selected to “Start now” maybe it will then either let you pick some
runlevels or just ask something like “Start on boot every time” or
something…
or or maybe the Help button explains what that box next to that B is
for, and maybe if you click it you house burns down, or something
more smile producing–i do NOT know, so see the sig caveat before
pushing anything other than that Help button!!
or or or maybe if you push the “Set/Reset” button you can select to
enable the service…and, maybe once you do that it will
automatically always be enabled on every boot…like magic…and
you don’t even have to decide which runlevels to pick!!
The b i think it’s the argument it passes to btnx, for example it i run btnx -b (as su) it runs process as a background daemon. The start, restart and everything else, do start the process and it works, however it still dosn’t solve my problem, since it dosn’t autostart. I tried all, restarted the os, btnx is still not running. None of the other services lets me select the runlevel, that’s why i thought it’s a bug in the gui, since i think that in older versions it was there. Any other ideea how i can manually start it ?
On 03/28/2013 02:06 PM, rbarsoianu wrote:
> Any other ideea how i can manually start it ?
i guess you are saying that there was no help available from the
“Help” button, right?
if that is the case you need one of two things: 1) read enough to
learn how to start services during boot in a systemd system, or 2)
wait until someone finds your question and gives you the answer…
> I know what i have to run in order to start it, however i want it to
> autostart, without asking me for a password. That’s why i thought
> sudoers might come in handy. However DD’s solution seems rlly nice, it’s
> just that the runlevels don’t show up for some reason, check the print
> here : ‘View image: yast2 000’ (http://postimg.org/image/po7jlxuvv/)
I should not be surprised… YaST is broken. Systemd has come, Yast
developers are a scarce resource, and modules are not working any more
as a result :-/
I understand that you have to use “systemadm” now.
I red the forum you linked, glad to know i’m not the only one with this problem :). However this is not the only way to go in order to solve this issue. I have TS3 and NOIP2 started up by using KDE Autostart. The only difference between those 2 and BTNX is that those 2 do not require root priviledges to run. So, comming back to my initial ideea, let’s run btnx from normal user by modifiying sudoers. I did do that, and it still dosn’t work, so most likely i didn’t do it correctly. On a locate BTNX i get
%users ALL = (here_goes_my_username)NOPASSWD: /etc/init.d/btnx
And it dosn’t work when i try to run btnx in terminal as a normal user. If i manage to do that, i can create a script to launch it and add it to KDE Autostart just as i did with the other 2. So, any1 knows what i’m doing wrong in sudoers ?
On 03/28/2013 06:26 PM, rbarsoianu wrote:
> So, comming back to my initial ideea, let’s run
> btnx from normal user by modifiying sudoers. I did do that, and it still
> dosn’t work, so most likely i didn’t do it correctly.
i guess you put a copy of the btnx executable in ~/.kde4/autostart ?
or is that a bash script pointing to the executable in /usr/sbin/btnx
if the latter, that bash script has to figure out a way to provoke
root powers…and, i don’t know to do that…
but i actually didn’t know there was an /etc/init.d tree in systemd,
but if there is, is there a /etc/init.d/after.local ??
if so, just try listing /usr/sbin/btnx therein…since you execute
everything in ~/.kde4/autostart and root executes everything in
/etc/init.d it should work…i think.
btw, you never did say if the “Help” button helped.
> And it dosn’t work when i try to run btnx in terminal as a normal user.
> If i manage to do that, i can create a script to launch it and add it to
> KDE Autostart just as i did with the other 2. So, any1 knows what i’m
> doing wrong in sudoers ?
Thq for the input, i wasn’t calling the command using sudo at start. Now that i do sudo btnx from my normal user account it works without asking me for a password, so adding it to startup shouldn’t be a problem. Thanks again.
On 03/29/2013 08:06 PM, rbarsoianu wrote:
> so adding it to startup shouldn’t be a
> problem. Thanks again.
once you use sudo at a CLI it recognizes you as having used the root
password for five minutes (default) so second and subsequent uses of
sudo will not need the root pass again…
however, that five minutes won’t survive overnight, or even through a
shutdown, so i predict that sudo in a bash scrip in the
~/.kde4/autostart won’t work…
On 2013-03-29 21:48, dd wrote:
> so i predict that sudo in a bash scrip in the ~/.kde4/autostart won’t
> work…
You are right, it can’t work. There is no terminal where you can input
the password, you need a graphical sudo. Ubuntu uses one, but there is
no such thing on openSUSE that I can recall.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)