Run Daemon on start-up ?
Hey, the process im trying to run is "tpb" its an OSD for think pad buttons on linux.
http://www.thinkwiki.org/wiki/Tpb https://wiki.archlinux.org/index.php/ThinkPad_OSD http://rc98.net/x31install However, all those guides are old and are not for linux mint (13). Im trying to make the program Run on my PC so I get an OSD whenever I change my volume (which doesnt happen for some reason) However, it doesnt work unless I sudo it. http://i.imgur.com/n3nYm.png Code:
XXXX@XXXX-ThinkPad-X60 ~ $ tpb |
Which part did you think might muck up your kernel? ArchWiki is generally very well maintained (and indeed up-to-date!), and nor does its article mention altering the kernel...
However, if 'sudo tpb' works as you want it to, then you don't even need to do the nvram part of the setup. As for starting tpb, I believe Linux Mint uses Upstart, in which case you want to put the following into /etc/init/tpb.conf Code:
description "ThinkPad OSD" I used https://wiki.frugalware.org/index.php/Upstart_Job_HOWTO and http://upstart.ubuntu.com/cookbook/, which both seem to be good sources if you're interested in how things work. Hope this helps, |
The guide which got me paranoid about messing about with my kernel after setting up tpb was:
http://rc98.net/x31install I tried following your comment, but the file at Code:
/etc/init/tpb.conf ---------EDIT: I mentioned that the file doesnt exist, should I make the file, with the sole contents being what youve got quoted ? ------------- Is there any script or command that I can run, using the "Startup Applications Preferences" screen ? Either by an terminal command, or by pointing to a script which runs "sudo tpb" ? http://i.imgur.com/ZKDZr.png?1 Thanks for your prompt reply though. |
I meant to make the file, but if there's a "Startup Applications Preferences" screen then that's probably an easier way to do it. What you'll need to do is click "Add" and then I'm guessing it will let you enter a command - choose "sudo tpb". You'll then need to allow yourself to run "sudo tpb" without entering your password, so add the following to you sudoers file:
Code:
steak1987 ALL= NOPASSWD: /bin/tpb Hope this helps, |
maybe this way is easier :
put your command in /etc/rc.local you don't need to put "sudo" on that file because command in there execute as root. and put your command before "exit 0" line. https://wiki.archlinux.org/index.php...etc.2Frc.local you can also using your gui to do it . if you're using gnome theres "startup application" in its system setting that let you do this. |
Quote:
Code:
#!/bin/sh -e Unfortunately, upon reboot, nothing happened. To avoid any issues and out of paranoia, I reverted back to the original file after that. _________________ Quote:
http://www.linuxscrew.com/2007/08/29...ry-is-located/ http://www.garron.me/linux/visudo-co...lt-editor.html Code:
XXXXXX@XXXXXX-ThinkPad-X60 ~ $ visudo ---------EDIT: Apparently, I need to run visudo as root. So I need to sudo visudo. Anyways, doing that opened up an text editor in terminal (which I would need to figure out how to work, doesnt seem too hard). Now the issue remains, what program location do I need to use ? |
put sudo before 'visudo'.
$ sudo visudo try putting its full path in rc.local: /usr/bin/tpb |
Cheers, it all works perfectly now.
I used Snark1994's method, and I derived the full path from your post (even though I didnt use the rc.local method). So thanks to both of you, for helping me out. |
Glad you got it sorted :) as you guessed, you need 'sudo' to run 'visudo'. Also:
Code:
$ whereis tpb Code:
$ which tpb |
All times are GMT -5. The time now is 09:59 AM. |