Remote Patching (using X11)

is there something in .47-1 related to remote patching? has anyone tried .48? I’d like to see what that dynamic start stop gui is all about…

sorry - my question was just a basic one - I was downloading the latest pd (I’m afraid after many years of PD use I defected to Max when they had a subscription model :slight_smile: ) - just seeing if that version was ok

oh cool, Pd on the Organelle is .46 so anything after that should be fine.

1 Like

@junklight Organelle is running 0.46, but your probably going to be fine running 0.47 etc.
to use ssh, yes, you need to do it over a wifi dongle, or I guess a usb ethernet dongle (I don’t have one to test) …

(unfortunately organelle doesn’t have a usb device port (only host), so its not possible to tether with RNDIS)

I recently found, unfortunately, you’ll need to connect organelle to a display to do this… as I cannot script it… as the root user needs a password set, and for security reasons this cant be done running from a script (using chpasswd, at least it didn’t work for me when I tried)
the rest of the setup we can probably script, and the same for the X11 setup… i’ll look at this for a release.

@oweno yeah, that’s interesting… as they explicitly say its in the api, I guess its only available to externals, but simple enough to write one to expose it. is it possible to change the audio buffer size via the api? (we’d need that too)
… also, I noticed that whilst they say 0.48 is available for testing on the MP website he has listed it as stable, so I guess its release is 'imminent ? might be good to upgrade to 48.0 when released… or wait a while for bugs to be fixed.

EDIT: perhaps better to have a discussion on 0.48 in a separate topic, so I created on
http://forum.critterandguitari.com/t/pure-data-0-48-released?source_topic_id=1457

1 Like

hmm - did all these things but no display! checked and double checked - all seems right and no clues either so not quite sure what to try next

do you need to do startx on the organelle? I did try that on the off chance but that did give me a load of errors (mostly complaining about no process called pd)

no you don’t need to startx on organelle, as its going to use a remote xserver automatically when you start an X application.

Ive just released 22.b9 which should now include everything required to get remote X11 working.

once this is installed what you need to do is:

on mac:

  • run terminal , enter:
  • xhost + (this will also start Xquartz)
  • ssh -x root@organelle , (password is now organelle)
  • export DISPLAY=192.168.1.57:0.0 (substitute 192.168.1.57 for your macs IP address)
  • ~/scripts/restart-mother.sh
  • on organelle, launch a patch, and PD will automatically start on your mac screen

when you start the patch, you should see in the mac terminal something like:
Checking for Patch File: /sdcard/Patches/Critter/Drums/Drummy/main.pd
X server found…
starting in GMainMenu mode

if its starts in non-gui mode, then either display is not correct, or you have not done xhost + so it doesn’t have permissions.

you can also test the X11 setup by running

  • xprop -root

this will either given an error, or a bunch of details about the X11 display.

hmm - I didn’t do that restart mother stage

anyway thank you and I’ll give it a go later on

oops, sorry missed that step… I’ll update
I restart mother so frequently for dev purposes, i kind of do it on autopilot
its needed so that it can inherit the DISPLAY variable

if you always use the same computer, with a fixed IP , you could put this in your .bashrc or bashprofile,
then you wont need to set display or restart mother, as it will already be there from booting.
(dont worry, it wont start the remote X, unless your mac has an xserver running)

yep that was the missing step!

thank you for all your help - all set to go now

1 Like

Hi guys,

I am having some difficulties here.

If I try to set up the display as described here then all I get is the dreaded “couldn’t connect to display error”

So I set up X11 forwarding on the organelle so it uses the default "localhost:10.0’ and I can start xterm and pd on the organelle and everything works fine on the Mac.

Until that is I select a patch from the organelle, the current pd window is closed but the loaded one is not started.

Anyone any ideas?

Cheers

Andy

with 3.0 you should not need to do any of this anymore, so i suggest you reinstall that…

then all you need to do is to set DISPLAY correctly, and restart mother

(localhost is not correct, you need your ip/hostname of your mac)

Hi Mark,

thanks for the reply, I am on 3.0

If I set DISPLAY correctly:

DISPLAY=macipaddress:0.0

And restart mother it was not working, nothing on the mac.

Also when sshing with -Y or -X from the mac and say trying to run xterm then that was also not working.

Only enabling X11 forwarding could I get any Xwindows stuff working from the organelle.

hmm, i thought this was already enabled… i’ll double check on a ‘clean organelle’, perhaps ive forgotten something that’s enabled on my ‘dev’ machine…

on the mac, you will also need to have xquartz installed , and then type
xhost +

(can you double check you have followed my instructions in the first post, I’m pretty sure I walked this thru to check it… but it was a long time ago ;))

Hi Mark,

Thanks for the reply.

Yep i have host going and quartz running.

I have just created a new card from the original 3.0 img I saved away before I started messing around, just about to give it a try…

Ok, this is with the 3.0 image. WIFI set from usb stick:

Last login: Wed Dec 27 20:04:59 on ttys000
You have mail.
MP12:~ andrewcapon$ ping mp12.local
PING mp12.local (192.168.1.98): 56 data bytes
64 bytes from 192.168.1.98: icmp_seq=0 ttl=64 time=0.046 ms
64 bytes from 192.168.1.98: icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from 192.168.1.98: icmp_seq=2 ttl=64 time=0.048 ms
^C
— mp12.local ping statistics —
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.046/0.047/0.048/0.001 ms
MP12:~ andrewcapon$ xhost +
access control disabled, clients can connect from any host
MP12:~ andrewcapon$ ssh -X root@organelle
root@organelle’s password:
Last login: Sat Oct 17 01:07:26 2015
/usr/bin/xauth: file /tmp/Xauthority-root does not exist
Welcome to Organelle.
[root@organelle ~]# export DISPLAY=192.168.1.98:0.0
[root@organelle ~]# ~/scripts/restart-mother.sh
pd: no process found
cat: /tmp/pids/.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
pd: no process found
cat: /tmp/pids/
.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
rm: cannot remove ‘/tmp/pids/*.pid’: No such file or directory
cat: /tmp/webserver.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
cat: /tmp/webserver.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
mother: no process found
mother: no process found

pd: no process found
cat: /tmp/pids/.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
pd: no process found
cat: /tmp/pids/
.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
rm: cannot remove ‘/tmp/pids/.pid’: No such file or directory
cat: /tmp/webserver.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
cat: /tmp/webserver.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
mother: no process found
mother: no process found
Simple mixer control ‘PCM’,0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 192
Mono:
Front Left: Playback 0 [0%]
Front Right: Playback 0 [0%]
Simple mixer control ‘PCM’,0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 192
Mono:
Front Left: Playback 170 [89%]
Front Right: Playback 170 [89%]
Simple mixer control ‘Headphone’,0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 0 [0%] [-51.50dB]
Front Right: Playback 0 [0%] [-51.50dB]
Simple mixer control ‘Headphone’,0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [12.00dB]
Front Right: Playback 127 [100%] [12.00dB]
Simple mixer control ‘Capture Mux’,0
Capabilities: enum
Items: ‘MIC_IN’ 'LINE_IN’
Item0: 'LINE_IN’
found USB drive, using /dev/sda1
/dev/sda1 is already mounted
using USER_DIR: /usbdrive
running /root/mother with scripts /root/scripts
[root@organelle ~]# opening serial …
opened serial, setting up…
done opening serial
build date Dec 15 2017 16:54:24/n._Analog Style
._Arpeggio Sampler
._Arpeggio Synth
._Basic Poly
._Basic Sampler
._Beats and Pieces
._Children of Sample
._Chords Roll
._Countdown Timer
._Distributor
._Drone 1
._Dropper
.Drummy
.
.DS_Store
.DS_Store
._Genny 1
._Granular Freezer
._Guitar2ARP
._Guitar2Synth
._h Rando
._I Take Up
._Jeraphy
._Metronome
._Midi File Sampler
._Midi File Synth
._Nice Surprises
._Nice Surprises Poly
._Nori Grains
._Nori Sampler
._Nori Sampler Mono
._Overloop
._Phase Vocoder
._Polybeats DRG32V
._Pow Pow’s Polybeats
._Punchy
._Quad Delay
._Recorder
._Rhodey
._Rhythm Delay Dist
._Sampler Style
._Sampler Style Delay
._Sampler Style REC
._SC_Install.zop
._SimplePoly.sc
._Sine Surprises
._Steppy Delay
._Stereo Rhythmicon
._Test
._Thery Scary
._Tuned Delay
._UpdateOS-3.0
._Update-OS-v2.1
._Vocoder RL
._Waterfall Down
._Waterfall Up
._Wepa!
patch[0]
patch[1] Shutdown
patch[2] Storage
patch[3] Settings
patch[4] Extra
patch[5]
patch[6] Analog Style
patch[7] Arpeggio Sampler
patch[8] Arpeggio Synth
patch[9] Basic Poly
patch[10] Basic Sampler
patch[11] Beats and Pieces
patch[12] Children of Sample
patch[13] Chords Roll
patch[14] Countdown Timer
patch[15] Distributor
patch[16] Drone 1
patch[17] Dropper
patch[18] Drummy
patch[19] Genny 1
patch[20] Granular Freezer
patch[21] Guitar2ARP
patch[22] Guitar2Synth
patch[23] h Rando
patch[24] I Take Up
patch[25] Jeraphy
patch[26] Metronome
patch[27] Midi File Sampler
patch[28] Midi File Synth
patch[29] Nice Surprises
patch[30] Nice Surprises Poly
patch[31] Nori Grains
patch[32] Nori Sampler
patch[33] Nori Sampler Mono
patch[34] Overloop
patch[35] Phase Vocoder
patch[36] Polybeats DRG32V
patch[37] Pow Pow’s Polybeats
patch[38] Punchy
patch[39] Quad Delay
patch[40] Recorder
patch[41] Rhodey
patch[42] Rhythm Delay Dist
patch[43] Sampler Style
patch[44] Sampler Style Delay
patch[45] Sampler Style REC
patch[46] ._SC_Install.zop
patch[47] SimplePoly.sc
patch[48] Sine Surprises
patch[49] Steppy Delay
patch[50] Stereo Rhythmicon
patch[51] Test
patch[52] Thery Scary
patch[53] Tuned Delay
patch[54] Update-OS-v2.1
patch[55] Vocoder RL
patch[56] Waterfall Down
patch[57] Waterfall Up
patch[58] Wepa!
num patches 53
patch menu offset 6
Menu Selection: 6:Analog Style
Checking for patch Files : /usbdrive/Patches/Analog Style
pd: no process found
cat: /tmp/pids/
.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
pd: no process found
cat: /tmp/pids/.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
rm: cannot remove '/tmp/pids/
.pid’: No such file or directory
rm: cannot remove ‘/tmp/patch’: No such file or directory
X server not found…
starting Pure Data : ( cd /tmp/patch ; /usr/bin/pd -rt -nogui -audiobuf 4 -path /usbdrive/PdExtraLibs “/root/mother.pd” main.pd )&
tb_peakcomp~ v1.0 2013 Two Big Ears
udpsend: connecting to port 4001
opened 0 MIDI input device(s) and 0 MIDI output device(s).
error: /tmp/patch/knobs.txt: can’t open
error: /tmp/patch/knobs.txt: read failed
verbose(4): … you might be able to track this down from the Find menu.

[root@organelle ~]# xprop -root
xprop: unable to open display ‘192.168.1.98:0.0’

[root@organelle ~]# ping 192.168.1.98
PING 192.168.1.98 (192.168.1.98) 56(84) bytes of data.
64 bytes from 192.168.1.98: icmp_seq=1 ttl=64 time=4.37 ms
64 bytes from 192.168.1.98: icmp_seq=2 ttl=64 time=3.88 ms
^C
— 192.168.1.98 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 3.881/4.129/4.378/0.256 ms

P.s. I have XWindows working to other boxes from the mac.

ok, so Ive just check with my clean 2.1 image, upgraded to 3.0
I can find no issue…
all i had to do was

on organelle
start wifi from wifi setup (already had setup the wifi text file)

on mac

xhost +
ssh -x root@organelle (password organelle) 

then from that ssh session

export DISPLAY=export DISPLAY=192.168.1.40:0.0
~/scripts/restart-mother.sh

then as soon as I started a patch , ping PD comes up

on my mac, Ive simply have

$ cat .ssh/config 
Protocol 2
ForwardX11 yes
ForwardX11Trusted yes
CheckHostIP no
StrictHostKeyChecking no 
UserKnownHostsFile=/dev/null

so its only the mac, that you might have to alter, the Organelle is already configured…

(its a while since i set this up, so ive added various things on the mac side, i think mostly for convenience )

EDIT: to be ‘complete’ , Ive used the above on both macOS 10.12 and 10.13… it was similar before, but think i was on 10.12 by the time i got my organelle.

Thanks for checking for me, I’ll have a look at the ssh config on the mac in the morning…

mmm, still getting the same issue here with the a local .ssh/config file exactly like yours on the mac.

I’m going to download the 2.1 image onto a clean scared and update to 3.0 and try again…

Is there anywhere on the c&g servers to download a 2.1 image, I only seem to be able to find it here: http://thepeacetreaty.org/organelle/diskimages/ and I am not sure of how trustworthy that img is.