2

Raspbian Jessie on Pi 3 headless with VNC on laptop. I use /LXEsession/autostart to have application puredata running after boot. In Terminal with top 2 instances of puredata show up!!

How come?

Anybody an idea about this?

pi@murf:~ $ ps aux | grep puredata  
pi        1120  1.4  0.6  12632  6056 ?        S    13:52   0:01 puredata  
pi        1121  1.4  0.6  12632  5916 ?        S    13:52   0:01 puredata  
pi        1149  0.0  0.0   1912   372 ?        S    13:52   0:00 sh -c TCL_LIBRARY="/usr/lib/puredata/lib/tcl/library" TK_LIBRARY="/usr/lib/puredata/lib/tk/library"   wish "/usr/lib/puredata/tcl//pd-gui.tcl" 5400   
pi        1150  0.0  0.0   1912   364 ?        S    13:52   0:00 sh -c /usr/lib/puredata/bin/pd-watchdog  
pi        1151  0.7  1.3  26416 12676 ?        Sl   13:52   0:01 wish /usr/lib/puredata/tcl//pd-gui.tcl 5400  
pi        1152  0.0  0.0   1840   424 ?        S    13:52   0:00 /usr/lib/puredata/bin/pd-watchdog  
pi        1153  0.0  0.0   1912   364 ?        S    13:52   0:00 sh -c TCL_LIBRARY="/usr/lib/puredata/lib/tcl/library" TK_LIBRARY="/usr/lib/puredata/lib/tk/library"   wish "/usr/lib/puredata/tcl//pd-gui.tcl" 5401   
pi        1154  0.0  0.0   1912   388 ?        S    13:52   0:00 sh -c /usr/lib/puredata/bin/pd-watchdog  
pi        1155  0.0  0.0   1840   380 ?        S    13:52   0:00 /usr/lib/puredata/bin/pd-watchdog  
pi        1156  0.6  1.3  26536 12748 ?        Sl   13:52   0:00 wish /usr/lib/puredata/tcl//pd-gui.tcl 5401  
pi        1420  0.0  0.2   4280  2016 pts/0    S+   13:54   0:00 grep --color=auto puredata  

pi@murf:~ $ ps -o pid,ppid,cmd -p 1087 1088
  PID  PPID CMD
 1087   962 puredata
 1088   913 puredata
pi@murf:~ $ pstree -p 962
lxsession(962)─┬─lxpanel(1083)─┬─{gdbus}(1126)
               │               ├─{gmain}(1129)
               │               └─{menu-cache-io}(1244)
               ├─lxpolkit(1080)───{gdbus}(1092)
               ├─openbox(1075)
               ├─pcmanfm(1086)─┬─{gdbus}(1127)
               │               └─{gmain}(1131)
               ├─puredata(1087)─┬─sh(1116)───wish(1119)───{wish}(1133)
               │                └─sh(1117)───pd-watchdog(1118)
               ├─ssh-agent(987)
               ├─{gdbus}(1028)
               └─{gmain}(1065)
pi@murf:~ $ pstree -p 913
lxsession(913)─┬─lxpanel(1084)─┬─{gdbus}(1128)
               │               ├─{gmain}(1135)
               │               └─{menu-cache-io}(1242)
               ├─lxpolkit(1079)───{gdbus}(1091)
               ├─openbox(1074)
               ├─pcmanfm(1085)─┬─{gdbus}(1132)
               │               └─{gmain}(1142)
               ├─puredata(1088)─┬─sh(1120)───wish(1124)───{wish}(1134)
               │                └─sh(1121)───pd-watchdog(1123)
               ├─ssh-agent(953)
               ├─{gdbus}(1025)
               └─{gmain}(1066)
  • Please edit your question and include the output of ps aux | grep puredata. – Steve Robillard Aug 25 '16 at 10:58
  • 2
    The parent process ID would be useful here too unless an actual puredata user comes along to clarify whether this is normal (it certainly isn't unusual for a background application to fork into multiple processes). Add the output from ps -o pid,ppid,cmd -p 1120 1121. I'll bet the second column is 1 (or something corresponding to the lxde) and 1120. – goldilocks Aug 25 '16 at 12:49
  • @goldilocks PID PPID CMD 1097 1008 puredata 1098 919 puredata – rolf meesters Aug 25 '16 at 13:10
  • Well, I'm at least partially wrong. You could check pstree -p 1008 and pstree -p 919 to see what started them and if there is any overlap in the trees (although that output seems a bit odd if you asked for 1120 and 1121 yet neither of them are mentioned -- but presumably you didn't do that and used the actual current pids). If you haven't used pstree before the man page and just plain pstree should clarify what that is about. – goldilocks Aug 25 '16 at 13:53
  • 1
    There's a little mountain icon in the edit interface (edit below the question) for uploading images. However, if you can cut n' paste the output instead, then highlight it all and use the code formatter (the { } icon), it should appear correctly. – goldilocks Aug 25 '16 at 14:17
0

Using X11VNC there's indeed no second instance of my app. Another solution seems to be: booting the headless Pi in CLI mode. Then with Tightvncserver there's not a second instance of my app either.

With the little experience i have, i prefer Tightvncserver because with X11VNC the connection too often got unresponsive, making a reboot necessary.

thanks for the assistance rolf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.