diff --git a/src/plugins/remotelinux/maemodebugsupport.cpp b/src/plugins/remotelinux/maemodebugsupport.cpp
index d8e78578195f72e4db0f63fd16d6b56dd08ad97e..1341a5b16265536395c0cf5cb9049675d1e89e3b 100644
--- a/src/plugins/remotelinux/maemodebugsupport.cpp
+++ b/src/plugins/remotelinux/maemodebugsupport.cpp
@@ -75,11 +75,7 @@ RunControl *MaemoDebugSupport::createDebugRunControl(RemoteLinuxRunConfiguration
         if (runConfig->useRemoteGdb()) {
             params.startMode = StartRemoteGdb;
             params.executable = runConfig->remoteExecutableFilePath();
-            params.debuggerCommand = MaemoGlobal::remoteCommandPrefix(runConfig->deviceConfig()->osVersion(),
-                runConfig->deviceConfig()->sshParameters().userName,
-                runConfig->remoteExecutableFilePath())
-                + MaemoGlobal::remoteEnvironment(runConfig->userEnvironmentChanges())
-                + QLatin1String(" /usr/bin/gdb");
+            params.debuggerCommand = runConfig->commandPrefix() + QLatin1String(" /usr/bin/gdb");
             params.connParams = devConf->sshParameters();
             params.localMountDir = runConfig->localDirToMountForRemoteGdb();
             params.remoteMountPoint
@@ -127,7 +123,6 @@ MaemoDebugSupport::MaemoDebugSupport(RemoteLinuxRunConfiguration *runConfig,
       m_deviceConfig(m_runConfig->deviceConfig()),
       m_runner(new MaemoSshRunner(this, runConfig, true)),
       m_debuggingType(runConfig->debuggingType()),
-      m_userEnvChanges(runConfig->userEnvironmentChanges()),
       m_state(Inactive), m_gdbServerPort(-1), m_qmlPort(-1),
       m_useGdb(useGdb)
 {
@@ -205,9 +200,6 @@ void MaemoDebugSupport::startExecution()
             SLOT(handleRemoteProcessStarted()));
     }
     const QString &remoteExe = m_runner->remoteExecutable();
-    const QString cmdPrefix = MaemoGlobal::remoteCommandPrefix(m_deviceConfig->osVersion(),
-        m_deviceConfig->sshParameters().userName, remoteExe);
-    const QString env = MaemoGlobal::remoteEnvironment(m_userEnvChanges);
     QString args = m_runner->arguments();
     if (m_debuggingType != RemoteLinuxRunConfiguration::DebugCppOnly) {
         args += QString(QLatin1String(" -qmljsdebugger=port:%1,block"))
@@ -215,11 +207,9 @@ void MaemoDebugSupport::startExecution()
     }
 
     const QString remoteCommandLine = m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly
-        ? QString::fromLocal8Bit("%1 %2 %3 %4").arg(cmdPrefix).arg(env)
-            .arg(remoteExe).arg(args)
-        : QString::fromLocal8Bit("%1 %2 gdbserver :%3 %4 %5")
-            .arg(cmdPrefix).arg(env).arg(m_gdbServerPort)
-            .arg(remoteExe).arg(args);
+        ? QString::fromLocal8Bit("%1 %2 %3").arg(m_runner->commandPrefix()).arg(remoteExe).arg(args)
+        : QString::fromLocal8Bit("%1 gdbserver :%2 %3 %4").arg(m_runner->commandPrefix())
+              .arg(m_gdbServerPort).arg(remoteExe).arg(args);
     connect(m_runner, SIGNAL(remoteProcessFinished(qint64)),
         SLOT(handleRemoteProcessFinished(qint64)));
     m_runner->startExecution(remoteCommandLine.toUtf8());
diff --git a/src/plugins/remotelinux/maemodebugsupport.h b/src/plugins/remotelinux/maemodebugsupport.h
index a899207de5381989f40ffcaff364852047861bf6..77903694ffaf3d703b3b6a50a9e66ea46198db41 100644
--- a/src/plugins/remotelinux/maemodebugsupport.h
+++ b/src/plugins/remotelinux/maemodebugsupport.h
@@ -34,8 +34,6 @@
 
 #include "remotelinuxrunconfiguration.h"
 
-#include <utils/environment.h>
-
 #include <QtCore/QObject>
 #include <QtCore/QPointer>
 #include <QtCore/QSharedPointer>
@@ -90,7 +88,6 @@ private:
     const QSharedPointer<const LinuxDeviceConfiguration> m_deviceConfig;
     MaemoSshRunner * const m_runner;
     const RemoteLinuxRunConfiguration::DebuggingType m_debuggingType;
-    const QList<Utils::EnvironmentItem> m_userEnvChanges;
 
     QByteArray m_gdbserverOutput;
     State m_state;
diff --git a/src/plugins/remotelinux/maemoruncontrol.cpp b/src/plugins/remotelinux/maemoruncontrol.cpp
index c469bee9a804a013a524028445c50097b8e5e606..487e17b60fc25bb2027a146984939a80c401b939 100644
--- a/src/plugins/remotelinux/maemoruncontrol.cpp
+++ b/src/plugins/remotelinux/maemoruncontrol.cpp
@@ -96,11 +96,8 @@ void MaemoRunControl::handleSshError(const QString &error)
 void MaemoRunControl::startExecution()
 {
     appendMessage(tr("Starting remote process ...\n"), Utils::NormalMessageFormat);
-    m_runner->startExecution(QString::fromLocal8Bit("%1 %2 %3 %4")
-        .arg(MaemoGlobal::remoteCommandPrefix(m_runner->devConfig()->osVersion(),
-            m_runner->connection()->connectionParameters().userName,
-            m_runner->remoteExecutable()))
-        .arg(MaemoGlobal::remoteEnvironment(m_runner->userEnvChanges()))
+    m_runner->startExecution(QString::fromLocal8Bit("%1 %2 %3")
+        .arg(m_runner->commandPrefix())
         .arg(m_runner->remoteExecutable())
         .arg(m_runner->arguments()).toUtf8());
 }
diff --git a/src/plugins/remotelinux/maemosshrunner.cpp b/src/plugins/remotelinux/maemosshrunner.cpp
index c2aa0a0810cfedd7126daacb41a6758bc702feb7..ea26a250d9bc00f5ff68c0ad3b681ff055e25128 100644
--- a/src/plugins/remotelinux/maemosshrunner.cpp
+++ b/src/plugins/remotelinux/maemosshrunner.cpp
@@ -62,7 +62,7 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent,
       m_devConfig(runConfig->deviceConfig()),
       m_remoteExecutable(runConfig->remoteExecutableFilePath()),
       m_appArguments(runConfig->arguments()),
-      m_userEnvChanges(runConfig->userEnvironmentChanges()),
+      m_commandPrefix(runConfig->commandPrefix()),
       m_initialFreePorts(runConfig->freePorts()),
       m_mountSpecs(runConfig->remoteMounts()->mountSpecs()),
       m_state(Inactive)
diff --git a/src/plugins/remotelinux/maemosshrunner.h b/src/plugins/remotelinux/maemosshrunner.h
index 687e6073cac02da3d9ec1f160cdaea98a4703043..f1c7d0a55e9f4d30dafd7a8c9c72245f264cf201 100644
--- a/src/plugins/remotelinux/maemosshrunner.h
+++ b/src/plugins/remotelinux/maemosshrunner.h
@@ -35,8 +35,6 @@
 #include "linuxdeviceconfiguration.h"
 #include "maemomountspecification.h"
 
-#include <utils/environment.h>
-
 #include <QtCore/QObject>
 #include <QtCore/QSharedPointer>
 #include <QtCore/QStringList>
@@ -71,7 +69,7 @@ public:
     PortList *freePorts() { return &m_freePorts; }
     QString remoteExecutable() const { return m_remoteExecutable; }
     QString arguments() const { return m_appArguments; }
-    QList<Utils::EnvironmentItem> userEnvChanges() const { return m_userEnvChanges; }
+    QString commandPrefix() const { return m_commandPrefix; }
     const QSharedPointer<const LinuxDeviceConfiguration> devConfig() const { return m_devConfig; }
 
     static const qint64 InvalidExitCode;
@@ -116,7 +114,7 @@ private:
     const QSharedPointer<const LinuxDeviceConfiguration> m_devConfig;
     const QString m_remoteExecutable;
     const QString m_appArguments;
-    const QList<Utils::EnvironmentItem> m_userEnvChanges;
+    const QString m_commandPrefix;
     const PortList m_initialFreePorts;
     QList<MaemoMountSpecification> m_mountSpecs;
 
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index 839aa588c8e03f0b0d295aeae791ee43a5868476..7baf2e9b76a4128b2ca306327606dae31ef8ef6a 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -292,18 +292,20 @@ AbstractLinuxDeviceDeployStep *RemoteLinuxRunConfiguration::deployStep() const
     return MaemoGlobal::earlierBuildStep<AbstractLinuxDeviceDeployStep>(deployConfig(), 0);
 }
 
-QString RemoteLinuxRunConfiguration::targetRoot() const
+QString RemoteLinuxRunConfiguration::arguments() const
 {
-    QTC_ASSERT(activeQt4BuildConfiguration(), return QString());
-    QtSupport::BaseQtVersion *v = activeQt4BuildConfiguration()->qtVersion();
-    if (!v)
-        return QString();
-    return MaemoGlobal::targetRoot(v->qmakeCommand());
+    return m_d->arguments;
 }
 
-QString RemoteLinuxRunConfiguration::arguments() const
+QString RemoteLinuxRunConfiguration::commandPrefix() const
 {
-    return m_d->arguments;
+    if (!deviceConfig())
+        return QString();
+
+    return QString::fromLocal8Bit("%1 %2")
+        .arg(MaemoGlobal::remoteCommandPrefix(deviceConfig()->osVersion(),
+             deviceConfig()->sshParameters().userName, remoteExecutableFilePath()))
+        .arg(MaemoGlobal::remoteEnvironment(userEnvironmentChanges()));
 }
 
 QString RemoteLinuxRunConfiguration::localDirToMountForRemoteGdb() const
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.h b/src/plugins/remotelinux/remotelinuxrunconfiguration.h
index d0bad258cb0d67f7d6b4cd6757d013e8b890e461..ba50b85091de25f74b66b93230838d9ca468a2d8 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.h
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.h
@@ -96,8 +96,8 @@ public:
 
     QString localExecutableFilePath() const;
     QString remoteExecutableFilePath() const;
-    QString targetRoot() const;
     QString arguments() const;
+    QString commandPrefix() const;
     QSharedPointer<const LinuxDeviceConfiguration> deviceConfig() const;
     PortList freePorts() const;
     bool useRemoteGdb() const;