Supercollider issue: "Could not connect to any X display"

Hi there, Having some trouble running supercollider when I ssh in from my PC, here’s what pops up:

compiling class library…
Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.
terminate called without an active exception
Aborted

Any thoughts on a workaround?

Hi, you have to first set up some X11 variables in your ssh session so it knows which virtual display to use:

export XAUTHORITY=/home/patch/.Xauthority
export DISPLAY=:0

It should then be able to start and show up on Raspberry Pi’s monitor.

Hi Giedrius,

I tried that, no dice. I should clarify that I don’t have any display connected to the pi, just an audio device and an adafruit VEML7700 light sensor

Do you have ‘desktop autologin’ option selected in patchbox boot submenu, or sudo raspi-config, boot submenu?

Otherwise, you have to start SC in a special way, see here:

Other information there may be useful too.

this did the trick! and will turn out to be a very handy repo, thanks!

1 Like

Good to hear you got it working!

What solution did you use in the end? Using the build and the command line from the linked repository?

So, all I did was clone the directory into the root folder, then used the code under the “headless” section. I ended up making some aliases to speed up the process, but it works like a charm!

1 Like