# Sonic Pi run from the command line

**URL:** <https://in-thread.sonic-pi.net/t/sonic-pi-run-from-the-command-line/2760>\
**Category:** Support, Help & Resources\
**Created:** [September 27, 2019, 12:11am UTC](https://in-thread.sonic-pi.net/t/sonic-pi-run-from-the-command-line/2760 "2019-09-27T00:11:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanoak](https://avatars.discourse-cdn.com/v4/letter/v/5f8ce5/32.png) [@vanoak](https://in-thread.sonic-pi.net/u/vanoak)\
**Post date:** [September 27, 2019, 12:11am UTC](https://in-thread.sonic-pi.net/t/sonic-pi-run-from-the-command-line/2760/1 "2019-09-27T00:11:32Z")

</div>

Hello,

I’m a university teacher and I’m using sonic pi on the raspberry pi on a course that focus on tangible multimedia. The pipeline I was hoping to implement for my students is to boot exclusively to the command line, without loading the desktop, for resource optimisation. In that regard I abandoned Processing for Pi and went instead with Pygame and OMXPlayer that run fine from the command line.

So I was wondering if it there is a way to use sonic pi in the same manner. I think the easiest solution would be to run scsynth server as a background process on boot but my reasoning is that would just enable supercollider and not sonic pi.

So, is it possible? Where can I find more info about this?

Thank you.

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [September 27, 2019, 9:10am UTC](https://in-thread.sonic-pi.net/t/sonic-pi-run-from-the-command-line/2760/2 "2019-09-27T09:10:25Z")

</div>

Don’t know [if this is useful to you](http://in-thread.sonic-pi.net/t/sonic-pi-for-standalone-installations/225/4).  
You can run SP with a virtual desktop and I have used this in several projects.

---

<div class="post-metadata">

**Author:** ![vanoak](https://avatars.discourse-cdn.com/v4/letter/v/5f8ce5/32.png) [@vanoak](https://in-thread.sonic-pi.net/u/vanoak)\
**Post date:** [September 28, 2019, 3:11pm UTC](https://in-thread.sonic-pi.net/t/sonic-pi-run-from-the-command-line/2760/3 "2019-09-28T15:11:28Z")

</div>

Hi robin.newman,

Thank you for the link.  
I will try it this weekend.

The only problem I foresee is if xvfb has support to enable/expose the necessary api for psonic (which I think is OSC?).

I’ll post the results.

Thanks again

---

<div class="post-metadata">

**Author:** ![vanoak](https://avatars.discourse-cdn.com/v4/letter/v/5f8ce5/32.png) [@vanoak](https://in-thread.sonic-pi.net/u/vanoak)\
**Post date:** [October 24, 2019, 12:36am UTC](https://in-thread.sonic-pi.net/t/sonic-pi-run-from-the-command-line/2760/4 "2019-10-24T00:36:15Z")

</div>

Hi robin.newman,

Very useful. It worked as expected and also as I needed.

But I still would be very interested in the idea of a headless sonic pi, mainly for my research projects (Godot + sonic pi).
