[PD] raspberry after boot 2 instances of Pd

Roman Haefeli reduzent at gmail.com
Mon Aug 29 20:47:49 CEST 2016


On Mon, 2016-08-29 at 19:37 +0200, patrice colet wrote:
> good to know, I was wondering if the problem mainly come from
> systemd.

I believe when you start tightvncserver, you're actually starting a
second desktop session (on a different DISPLAY). That means, when you
use the auto start infrastructure from your DE (desktop environment)for
auto-starting Pd, it is started twice, because you're running two
desktop sessions, one on DISPLAY=:0 (Raspbian is pre-configured to
auto-login at start) and the one started from tightvncserver. 

x11vnc doesn't start another session, but captures the already running
session on DISPLAY=:0. That's why you don't see two instances of Pd,
when running x11vnc.

Alternatively, you could disable auto-login, so that in the session on
DISPLAY=:0 nothing gets auto-started (unless user 'pi' logs in). But
that also means, you need to login into your tightvncserver session.

Alternatively, you could also start your Pd by cron (which is not
attached to any desktop session and thus starts things only once). If
you don't need a Pd GUI, that is probably the easiest solution. If you
need a Pd GUI, you need to tell Pd in which DISPLAY to show the GUI,
since cron doesn't have any notion of desktop sessions. This is what I
sometimes do to auto-start Pd with GUI in it's own session:

Run 'crontab -e' to edit current user's crontab file. Then add a line
like:
 
@reboot         /usr/bin/vncserver :4 -name pure-data -geometry 1000x800 -dpi 80; sleep 5; DISPLAY=:4 /usr/bin/pd -open mypatch.pd

save it and reboot. At next boot, this will launch a vncserver on
DISPLAY :4 and then start Pd with its GUI in said vnc session. 

Roman

> Le 28/08/2016 à 12:01, rolfm at dds.nl a écrit :
> > 
> > 
> >  patrice colet wrote:
> > 
> > > 
> > >  From what I understand about what triggers this bug it's
> > > tightvnc that
> > > is running twice puredata, some has resolved this by using
> > > x11vnc 
> > > instead
> > > 
> > > src:
> > > 
> > > https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=59285
> > > 
> > thanks patrice for the helpfull link.
> > it had nothing to do with puredata.
> > 
> > FYI:
> > using x11vnc did indeed work.
> > another method which seems to solve it is to start the headless Pi
> > in 
> > CLI mode;
> > then with tightvncserver there's also just 1 instance of puredata 
> > running.
> > 
> > rolf
> > 
> > > 
> > > 
> > > Le 25/08/2016 à 13:39, rolfm at dds.nl a écrit :
> > > > 
> > > > hello,
> > > > 
> > > > (for me) strange problem of double instances of Pd.
> > > > 
> > > > raspbian jessie Pi-3, headless, VNC on laptop.
> > > > 
> > > > in /.config/LXEsession/autostart:
> > > > @lxpanel --profile LXDE-pi
> > > > @pcmanfm --desktop --profile LXDE-pi
> > > > @puredata
> > > > 
> > > > after boot in Terminal command 'top':
> > > > 
> > > >   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM TIME+
> > > > COMMAND
> > > >  1105 pi        -7   0   12632   5992   5292 S   1.7  0.6
> > > > 0:00.57
> > > > puredata
> > > >  1106 pi        -7   0   12632   6104   5404 S   1.7  0.6
> > > > 0:00.57
> > > > puredata
> > > >   938 pi        20   0   12544   8224   3428 S   1.0  0.9
> > > > 0:00.63
> > > > Xtightvnc
> > > >  1399 pi        20   0    5112   2544   2140 R   0.7  0.3
> > > > 0:00.10 top
> > > >   903 root      20   0   98104  25936  18128 S   0.3  2.7
> > > > 0:00.47 Xorg
> > > >  1100 pi        20   0   94364  24608  20920 S   0.3  2.6
> > > > 0:00.59 
> > > > lxpanel
> > > >  1101 pi        20   0   94188  24776  20972 S   0.3  2.6
> > > > 0:00.68 
> > > > lxpanel
> > > > ......
> > > > 
> > > > 
> > > > there are 2 instances of puredata (and also 2 lxpanels)!
> > > > and only one GUI visible on screen.
> > > > 
> > > > when i close the GUI, 1 Pd instance disappears, 1 remains (and
> > > > a WISH).
> > > > 
> > > > without puredata in autostart there's only 1 lxpanel.
> > > > 
> > > > anybody experience with this?
> > > > 
> > > > is there better way to get Pd automatically started at boot?
> > > > 
> > > > rolf
> > > > 
> > > > _______________________________________________
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160829/b3d243ba/attachment.sig>


More information about the Pd-list mailing list