Hi,
I was writing a small piece of code to execute some system commands.
I'm using Debian, i changed GDM3 to allow root access (no security issues needed in this case) and the code is:
Qt Code:
  1. void criarWindowsDialog::on_pushButton_2_clicked()
  2. {
  3. ui->commandTextEdit->append("Processo iniciado ...");
  4. QProcess processo;
  5. QString comando;
  6. QString fullCommand;
  7. QString stdOut;
  8. QString stdError;
  9.  
  10. //comando 1 - limpar a pasta
  11. comando = "rm";
  12. args.clear();
  13. args<<"-f"<<"/home/srp/imagens/windows/*";
  14. fullCommand = comando;
  15. for(int i = 0; i < args.count(); i++)
  16. fullCommand += " " + args.at(i);
  17. processo.start(comando,args,QIODevice::ReadOnly);
  18. processo.waitForFinished();
  19. stdOut = processo.readAllStandardOutput();
  20. stdError = processo.readAllStandardError();
  21. ui->commandTextEdit->append(fullCommand);
  22. ui->stdOutTextEdit->append(stdOut);
  23. ui->stdErrorTextEdit->append(stdError);
To copy to clipboard, switch view to plain text mode 

When i check the message from "stdError" i get:
Qt Code:
  1. Failed to open terminal.TERM environment variable needs set.
To copy to clipboard, switch view to plain text mode 

This is a simple command to delete files inside a folder.
Is the problem related to configuration in debian?