Hello<br><br>We're currently upgrading our linux workstations from centos 5 to centos 6.<br><br>In centos 6 I experience some strange behaviour of konsole compared to the one in centos 5<br><br>Centos 6 version informations<br>
<div style="margin-left:40px">$ konsole -v<br>Qt: 4.6.2<br>KDE: 4.3.4 (KDE 4.3.4)<br>Konsole: 2.3.3<br></div><br>Centos 5 version informations<br><div style="margin-left:40px">$ konsole -v<br>Qt: 3.3.6<br>KDE: 3.5.4-25.el5.centos.1 Red Hat<br>
Konsole: 1.6.4<br></div><br>Following a simple reproduction of my problem with centos 6 (KDE 4.3.4):<br><br>Case A:<br>KDE-App-Launcher <br> -> starts simple PyQt-App (see below)<br> start "konsole -e --noclose /bin/env" with specific environment<br>
start "konsole -e --noclose /bin/env" with changed env variable<br><br>then the changed env-variable will not be transmitted to the second konsole-call<br>On the other hand:<br><br>Case B:<br>start konsole<br>
-> start simple PyQt-App (see below)<br>
start "konsole -e --noclose /bin/env" with specific environment<br>
start "konsole -e --noclose /bin/env" with changed env variable<br><br>then everything works as I expected <br><br>I think this might be due to the isatty-call of the following function in the main.cpp:<br>
bool shouldUseNewProcess()<br>respectively<br>bool forceNewProcess() in older versions<br clear="all"><br>in case A there is only one konsole-process<br>in case B there are two different konsole-processes<br><br>Is there a way to tell konsole to always start a new process (and environment) for every call. What we need is the environment-behaviour as in case B without the need of the initial konsole-call.<br>
<br>
I don't know weather this is as intended or if this is a bug. Could you explain me, what the behaviour of case A is as described?<br><br>Many thanks in advance and kind regards,<br>thomas<br><br>--<br>simple qt-app:<br>
<br><br><div style="margin-left:40px">from PyQt4.QtGui import QDialog, QApplication, QPushButton<br>from PyQt4 import QtCore<br>import sys<br> <br>from subprocess import Popen, PIPE<br>import os<br><br>class TestDialog(QDialog):<br>
def __init__(self, parent = None):<br> super(TestDialog, self).__init__(parent)<br> self.setupGui()<br> self.counter = 1000<br> <br> def setupGui(self):<br> button = QPushButton("test", self)<br>
self.connect(button, QtCore.SIGNAL("clicked()"), self.buttonClicked)<br> <br> def buttonClicked(self):<br> myenv = os.environ<br> self.counter = self.counter * 2<br> myenv["ZZZZZZZZZZZZ"] = "counter: % 6d" % self.counter<br>
p = Popen("/usr/bin/konsole --noclose -e /bin/env", env=myenv, shell=True)<br><br>def main():<br> app = QApplication(sys.argv)<br> myapp = TestDialog()<br> myapp.show() <br> sys.exit(app.exec_()) <br>
<br>if __name__ == "__main__":<br> main()<br></div>