I was writing code to execute system command, using GDM3 an logged in as root (just commented line #auth required pam_succeed_if.so user != root quiet_success , in /etc/pam.d/gdm3).
When i execute:
Code: Select all
void criarWindowsDialog::on_pushButton_2_clicked()
{
ui->commandTextEdit->append("Processo iniciado ...");
QProcess processo;
QString comando;
QStringList args;
QString fullCommand;
QString stdOut;
QString stdError;
//comando 1 - limpar a pasta
comando = "rm";
args.clear();
args<<"-f"<<"/home/srp/imagens/windows/*";
fullCommand = comando;
for(int i = 0; i < args.count(); i++)
fullCommand += " " + args.at(i);
processo.start(comando,args,QIODevice::ReadOnly);
processo.waitForFinished();
stdOut = processo.readAllStandardOutput();
stdError = processo.readAllStandardError();
ui->commandTextEdit->append(fullCommand);
ui->stdOutTextEdit->append(stdOut);
ui->stdErrorTextEdit->append(stdError);
...
What changes to the TERM variable, if so, do i need to do?
Thanks
Note: no security issues needed.