Quantcast

running sclang on startup (rpi)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

running sclang on startup (rpi)

madamdata
Hi everyone,

I'm trying to get SC to start up as soon as i power my rpi3 on. I'm
running Raspbian Jessie Lite, headless - I wrote a bash script and put
a line to execute it in /etc/rc.local - the script works fine when I
run it manually via ssh, but it doesn't work when I boot.

also, aggravatingly, I can't log the output of "sclang
/home/pi/my/file.scd" because "sclang /home/pi/my/file.scd &" or
"sclang /home/pi/my/file.scd >/myLogFile" don't work. So I can't
figure out what's wrong, except that the script is definitely being
executed. It might have something to do with users?

any help would be appreciated. Thanks!

Ada

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: running sclang on startup (rpi)

Raffael Seyfried-2
Hi,

in this guide there is a short section on starting sclang on startup
which worked fine for me:

http://supercollider.github.io/development/building-raspberrypi

Maybe this helps some if the problem is with the bash script.


Am 02.01.17 um 08:39 schrieb a. adhiyatma:

> Hi everyone,
>
> I'm trying to get SC to start up as soon as i power my rpi3 on. I'm
> running Raspbian Jessie Lite, headless - I wrote a bash script and put
> a line to execute it in /etc/rc.local - the script works fine when I
> run it manually via ssh, but it doesn't work when I boot.
>
> also, aggravatingly, I can't log the output of "sclang
> /home/pi/my/file.scd" because "sclang /home/pi/my/file.scd &" or
> "sclang /home/pi/my/file.scd >/myLogFile" don't work. So I can't
> figure out what's wrong, except that the script is definitely being
> executed. It might have something to do with users?
>
> any help would be appreciated. Thanks!
>
> Ada
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: running sclang on startup (rpi)

Fredrik Olofsson
and here's another way (also using crontab but no need for sudo)...
https://github.com/redFrik/supercolliderStandaloneRPI2#autostart

>/myLogFile

try using an absolute path to your home directory here instead.  like > /pi/home/myLogFile
probably you're not allowed to create a file in root (or where ever your rc.local script is running from)

so for my scstandalone build a headless autostart.sh bash script with logging looks like this...

#!/bin/bash
/usr/bin/jackd -P75 -dalsa -dhw:1 -p1024 -n3 -s &
./sclang -a -l sclang.yaml mycode.scd > /home/pi/log.txt

make sure you have xvfb installed and then set up the script to run at reboot (crontab -e and add the following line)...
@reboot cd /home/pi/supercolliderStandaloneRPI2 && xvfb-run ./autostart.sh

to see what jack and alsa are up to you can also put a write-to-file thingie in the cronscript...
@reboot cd /home/pi/supercolliderStandaloneRPI2 && xvfb-run ./autostart.sh > /home/pi/log2.txt
again, make sure to use absolute path to a directory that your login user have write access to.

good luck,
_f

2 jan 2017 kl. 10:19 skrev Raffael Seyfried <[hidden email]>:

Hi,

in this guide there is a short section on starting sclang on startup which worked fine for me:

http://supercollider.github.io/development/building-raspberrypi

Maybe this helps some if the problem is with the bash script.


Am 02.01.17 um 08:39 schrieb a. adhiyatma:
Hi everyone,

I'm trying to get SC to start up as soon as i power my rpi3 on. I'm
running Raspbian Jessie Lite, headless - I wrote a bash script and put
a line to execute it in /etc/rc.local - the script works fine when I
run it manually via ssh, but it doesn't work when I boot.

also, aggravatingly, I can't log the output of "sclang
/home/pi/my/file.scd" because "sclang /home/pi/my/file.scd &" or
"sclang /home/pi/my/file.scd >/myLogFile" don't work. So I can't
figure out what's wrong, except that the script is definitely being
executed. It might have something to do with users?

any help would be appreciated. Thanks!

Ada


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: running sclang on startup (rpi)

madamdata
In reply to this post by Raffael Seyfried-2
I KNEW i'd seen the instructions before .. thank you! Will report soon
if it works.

<  3

Ada

On Mon, Jan 2, 2017 at 4:19 AM, Raffael Seyfried
<[hidden email]> wrote:

> Hi,
>
> in this guide there is a short section on starting sclang on startup which
> worked fine for me:
>
> http://supercollider.github.io/development/building-raspberrypi
>
> Maybe this helps some if the problem is with the bash script.
>
>
> Am 02.01.17 um 08:39 schrieb a. adhiyatma:
>>
>> Hi everyone,
>>
>> I'm trying to get SC to start up as soon as i power my rpi3 on. I'm
>> running Raspbian Jessie Lite, headless - I wrote a bash script and put
>> a line to execute it in /etc/rc.local - the script works fine when I
>> run it manually via ssh, but it doesn't work when I boot.
>>
>> also, aggravatingly, I can't log the output of "sclang
>> /home/pi/my/file.scd" because "sclang /home/pi/my/file.scd &" or
>> "sclang /home/pi/my/file.scd >/myLogFile" don't work. So I can't
>> figure out what's wrong, except that the script is definitely being
>> executed. It might have something to do with users?
>>
>> any help would be appreciated. Thanks!
>>
>> Ada
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.):
>> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
>> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
>
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.):
> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Loading...