diff --git a/app/src/desktopthemes/kdetheme.cpp b/app/src/desktopthemes/kdetheme.cpp
index 023fae9ae6d98ff68606215e4ad8bde210855fea..3c6f43bb15289830aa06bfcbd4370bf5ca3b3b33 100644
--- a/app/src/desktopthemes/kdetheme.cpp
+++ b/app/src/desktopthemes/kdetheme.cpp
@@ -59,6 +59,8 @@ bool KdeTheme::applyAsCursor() const
         << "c.writeEntry('cursorTheme', '" + themeName_ + "');";
 
     if (evaluateScript(script)) {
+        QProcess::startDetached("sh -c \"echo 'Xcursor.theme: " + themeName_ + "' | xrdb -merge\"");
+
         auto setLaunchEnv = QDBusMessage::createMethodCall("org.kde.klauncher5", "/KLauncher", "org.kde.KLauncher", "setLaunchEnv");
         setLaunchEnv.setArguments(QVariantList() << QVariant(QString("XCURSOR_THEME")) << QVariant(themeName_));
         QDBusConnection::sessionBus().call(setLaunchEnv);
@@ -67,6 +69,10 @@ bool KdeTheme::applyAsCursor() const
         notifyChange.setArguments(QVariantList() << QVariant(qint32(5)) << QVariant(qint32(0)));
         QDBusConnection::sessionBus().send(notifyChange);
 
+        QProcess::startDetached("kwin --replace");
+        QProcess::startDetached("kquitapp5 plasmashell");
+        QProcess::startDetached("sh -c \"XCURSOR_THEME='" + themeName_ + "' kstart5 plasmashell\"");
+
         return true;
     }
     return false;
diff --git a/scripts/package.sh b/scripts/package.sh
index c61261c85e68fcb86cb4dc1510ad7ebd87e54a5e..6df36ab7c87d982caf833a331b40f99acfb2a986 100644
--- a/scripts/package.sh
+++ b/scripts/package.sh
@@ -2,9 +2,9 @@
 
 PKGNAME='ocs-manager'
 
-USER='pkgbuilder'
+PKGUSER='pkgbuilder'
 
-SCRIPT="${0}"
+PKGSCRIPT="${0}"
 
 PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
 
@@ -12,27 +12,25 @@ BUILDDIR="${PROJDIR}/build_${PKGNAME}"
 
 ci_appimage() { # docker-image: ubuntu:14.04
     apt update -qq
-    apt -y install software-properties-common
     apt -y install curl git
     #apt -y install build-essential qt5-default libqt5websockets5-dev
-    #apt -y install cmake libssl-dev libcurl4-gnutls-dev libxpm-dev
-    apt -y install libssl1.0.0 zlib1g
-    apt -y install unzip p7zip
+    #apt -y install cmake libssl-dev libcurl3 libcurl3-gnutls libcurl4-gnutls-dev libxpm-dev
+    apt -y install libssl1.0.0 zlib1g unzip p7zip
 
+    apt -y install software-properties-common
     add-apt-repository -y ppa:beineri/opt-qt593-trusty
     echo 'deb http://download.opensuse.org/repositories/home:/TheAssassin:/AppImageLibraries/xUbuntu_14.04/ /' > /etc/apt/sources.list.d/curl-httponly.list
     curl -fsSL https://download.opensuse.org/repositories/home:TheAssassin:AppImageLibraries/xUbuntu_14.04/Release.key | apt-key add -
     apt update -qq
 
-    apt -y install build-essential libgl1-mesa-dev qt59base qt59websockets
-
+    apt -y install build-essential libfontconfig1 mesa-common-dev libglu1-mesa-dev qt59base qt59websockets
     curl -fsSL https://cmake.org/files/v3.10/cmake-3.10.0-rc5-Linux-x86_64.tar.gz | tar -xz --strip-components=1 -C /
     apt -y install libssl-dev libcurl3 libcurl3-gnutls libcurl4-gnutls-dev libxpm-dev
 
-    useradd -m ${USER}
-    chown -R ${USER} "${PROJDIR}"
+    useradd -m ${PKGUSER}
+    chown -R ${PKGUSER} "${PROJDIR}"
 
-    su -c "export HOME=/home/${USER} && source /opt/qt59/bin/qt59-env.sh && sh "${SCRIPT}" build_appimage" ${USER}
+    su -c "export HOME=/home/${PKGUSER} && source /opt/qt59/bin/qt59-env.sh && sh "${PKGSCRIPT}" build_appimage" ${PKGUSER}
 
     transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.AppImage")"
 }