diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
index cd01c16eb7bca7ddaa54982725cd66bdd26d05c3..c3685e56bc62f48aca8f1202f31d867c22f79fd9 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
@@ -227,9 +227,9 @@ void MaemoDeployStep::stop()
 
     if (remoteProcessRunning) {
         const QByteArray programToKill
-            = m_currentDeviceDeployAction ? "cp" : "dpkg";
-        const QByteArray cmdLine = "pkill -x " + programToKill
-            + "; sleep 1; pkill -x -9 " + programToKill;
+            = m_currentDeviceDeployAction ? "/bin/cp" : "/usr/bin/dpkg";
+        const QByteArray cmdLine = "pkill " + programToKill
+            + "; sleep 1; pkill -9 " + programToKill;
         SshRemoteProcess::Ptr killProc
             = m_connection->createRemoteProcess(cmdLine);
         killProc->start();
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
index b1e7ac8c13cf8f05f20365d41756e04f373401fd..8a1ee88a6c788d7ef318c53106f9144bf8967f4e 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
@@ -48,8 +48,8 @@ QString MaemoGlobal::remoteSudo()
 
 QString MaemoGlobal::remoteCommandPrefix(const QString &commandFilePath)
 {
-    return QString::fromLocal8Bit("%1 chmod a+x %2 && source /etc/profile && DISPLAY=:0.0 ")
-        .arg(remoteSudo()).arg(commandFilePath);
+    return QString::fromLocal8Bit("%1 chmod a+x %2 && source /etc/profile; "
+        "source /home/user/.profile; ").arg(remoteSudo(), commandFilePath);
 }
 
 QString MaemoGlobal::remoteEnvironment(const QList<ProjectExplorer::EnvironmentItem> &list)
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp
index bd9f61ccb0377d486eba18063d474ae77c43ceef..a53c41f3c14104b26477ca422ac80c8c1b7dffba 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp
@@ -144,8 +144,8 @@ void MaemoSshRunner::cleanup(bool initialCleanup)
     QString niceKill;
     QString brutalKill;
     foreach (const QString &proc, m_procsToKill) {
-        niceKill += QString::fromLocal8Bit("pkill -x %1;").arg(proc);
-        brutalKill += QString::fromLocal8Bit("pkill -x -9 %1;").arg(proc);
+        niceKill += QString::fromLocal8Bit("pkill %1\\$;").arg(proc);
+        brutalKill += QString::fromLocal8Bit("pkill -9 %1\\$;").arg(proc);
     }
     QString remoteCall = niceKill + QLatin1String("sleep 1; ") + brutalKill;
     remoteCall.remove(remoteCall.count() - 1, 1); // Get rid of trailing semicolon.