alsaproblems (want it for voicecommand)
|
21st Jan, 2014, 09:23 PM
Post: #16
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
Sorry, didn't see your post until now...
If you are still interested, here's a template: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/ My setup: Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless |
|||
22nd Jan, 2014, 03:13 AM
Post: #17
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(21st Jan, 2014 09:23 PM)josch Wrote: Sorry, didn't see your post until now... Okay, thanks a lot but I don't understand the script (still A kinda a noob) Can you help me adjust it ? |
|||
22nd Jan, 2014, 11:07 PM
Post: #18
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
Here you go, I made a small startscript extra for you that is using screen to keep voicecommand running.
You need 'screen' installed to use it. If it's not, just run: Terminal sudo apt-get install screen Then, to create the script just run: Terminal sudo nano /etc/init.d/voicecommand Then paste in: Code: #!/bin/sh Finally run: Terminal sudo chmod +x /etc/init.d/voicecommand sudo update-rc.d voicecommand defaults That's it. Reboot and voicecommand should autostart and keep running. My setup: Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless |
|||
22nd Jan, 2014, 11:10 PM
Post: #19
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(22nd Jan, 2014 11:07 PM)josch Wrote: Here you go, I made a small startscript extra for you that is using screen to keep voicecommand running. How do you mean keep it running, I got a system witch kills it and restart it with a drifrent flag, so it won't interrupt with that? |
|||
23rd Jan, 2014, 02:41 AM
Post: #20
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
I solely mean that it will autostart when booting. Of course you can kill it.
Terminal sudo service voicecommand stop Terminal screen -S voicecommand -X quit But why there is something running that will kill and restart it with different flags? When does this happen? Why don't just start it with the right flags? Let me know and I can help you. My setup: Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless |
|||
23rd Jan, 2014, 02:54 AM
Post: #21
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(23rd Jan, 2014 02:41 AM)josch Wrote: I solely mean that it will autostart when booting. Of course you can kill it.thanks a lot : the reson why is : -f means diffrent VOC (voicecommand ) config file, so i can make a menu. for example i need to enter an vocal authorization code for shutdown. in the main file i put shutdown==sudo killall voicecommand && sudo voicecommand -f/root/.shutdown.conf in the conf i put autorization code==sudo halt see? |
|||
23rd Jan, 2014, 05:14 AM
Post: #22
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
So instead of sudo killall voicecommand you have to run sudo screen -S voicecommand -X quit if it's running in it's own screen session. (like from my startscript)
But one question: When your script ist just calling sudo voicecommand -f/root/.shutdown.conf, will it run in the background? If so, there is no need for screen. I used it, because you said that you have to keep the terminal open to keep it running. Anyhow, if you want to do exactly the same what you are doing now but within screen, just do: shutdown==sudo screen -S voicecommand -X quit && sudo screen -dmS voicecommand voicecommand -f/root/.shutdown.conf instead of shutdown==sudo killall voicecommand && sudo voicecommand -f/root/.shutdown.conf My setup: Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless |
|||
23rd Jan, 2014, 05:34 AM
Post: #23
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(23rd Jan, 2014 05:14 AM)josch Wrote: So instead of sudo killall voicecommand you have to run sudo screen -S voicecommand -X quit if it's running in it's own screen session. (like from my startscript)What is the -dmS? And the sudo nohup voicecommand keeps it in background |
|||
23rd Jan, 2014, 08:33 PM
Post: #24
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(23rd Jan, 2014 05:34 AM)lukeg01 Wrote: What is the -dmS? Terminal xbian@xbian ~ $ screen -h Use: screen [-opts] [cmd [args]] or: screen -r [host.tty] Options: [...] -dmS name Start as daemon: Screen session in detached mode. [...] (23rd Jan, 2014 05:34 AM)lukeg01 Wrote: And the sudo nohup voicecommand keeps it in background Okay, so just use screen instead of nohup. That way you can use my startscript and you're able to get into the running session whenever you want with: Terminal sudo screen -r voicecommand As it seems that you want to run voicecommand as root, remember to change the USER var in the startscript to root. Of course, you could even just delete the USER var and replace screen -dmS $APP su -c $APP $USER with screen -dmS $APP $APP And here again your commands to kill and start again with other configuration: kill Terminal sudo screen -S voicecommand -X quit Terminal sudo screen -dmS voicecommand voicecommand -f /your/custom/configfile My setup: Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless |
|||
26th Jan, 2014, 03:58 AM
Post: #25
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(23rd Jan, 2014 08:33 PM)josch Wrote:(23rd Jan, 2014 05:34 AM)lukeg01 Wrote: What is the -dmS? |
|||
26th Jan, 2014, 05:33 AM
Post: #26
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
The problem with killall is, that it will kill die voicecommand running in the screen session but it won't kill the screen session itself.
So better kill the whole screen session if you don't need it anymore. But yes - if you are going to start voicecommand in the same screen session again anyway, you can use killall. But then you have to start voicecommand that way: Terminal screen -S voicecommand -X stuff 'voicecommand'`echo -ne '\015'` My setup: Software: XBian version: 1.0RC3 | XBMC version: 13.2 (Gotham) | Overclock settings: High Hardware: RPi model: B | Power: DUB-H7 | SD: Tanscend Class 10 | Network: Wireless |
|||
26th Jan, 2014, 05:41 AM
Post: #27
|
|||
|
|||
RE: alsaproblems (want it for voicecommand)
(26th Jan, 2014 05:33 AM)josch Wrote: The problem with killall is, that it will kill die voicecommand running in the screen session but it won't kill the screen session itself. Well than I'll keep it at kill all sins there is always a active instance of voicecontrol |
|||
« Next Oldest | Next Newest »
|