Write command on shell automatically using sketch for ARDUINO YUN

Goodmorning everyone,
I'm implementing the lwm2m client on arduino yun based on this project:

my problem is that after having correctly established the connection with the server I cannot change the values ​​related to the sensors. the code is as follows:

 Process p; 
  int temp = 0; 
 void setup() { 
 while (!SerialUSB);    
 SerialUSB.println("Init  bridge lib...\n");        
 String conn = "/root/./lwm2mclient -h leshan.eclipse.org -n arduino_yun_client -4";    


 void loop() {   
  temp = 0;
   changeResource("/1024/0/10", temp); 

 void changeResource(String resource, int value){ 
    String conn = "change "+resource+" "+value;    

n particular, the changeResource method is not executed, which allows the values ​​related to the sensors to be changed. Or rather, the method is executed but actually p.println (conn) and p.flush () do not send any commands.

N.B. running the client (./lwm2mclient -h leshan.eclipse.org -n arduino_yun_client -4) and then entering the command change / 1024/0/10 5
from arduino, through ssh it works perfectly.