Commit 4bdbd44f authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Make startplasma more flexible so it can be leveraged by plasma mobile

Allows specifying the shell through an environment variable.
Allows forwarding command line arguments to kwin_wayland, since the arguments we
use on plasma phone are slightly different.

Test Plan: Builds, still starts

Reviewers: #plasma, bshah, mart, davidedmundson

Reviewed By: #plasma, bshah, mart, davidedmundson

Subscribers: broulik, mart, alexeymin, plasma-devel

Tags: #plasma

Differential Revision:
parent fe0a4e3c
......@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
KSharedConfig::Ptr startupConf = KSharedConfig::openConfig(QStringLiteral("plasmashellrc"));
KConfigGroup startupConfGroup(startupConf, "Shell");
const QString defaultShell = startupConfGroup.readEntry("ShellPackage", "org.kde.plasma.desktop");
const QString defaultShell = startupConfGroup.readEntry("ShellPackage", qEnvironmentVariable("PLASMA_DEFAULT_SHELL", "org.kde.plasma.desktop"));
bool replace = false;
......@@ -23,7 +23,7 @@
#include <QDBusConnection>
#include <QDBusInterface>
int main(int /*argc*/, char** /*argv*/)
int main(int argc, char** argv)
......@@ -82,7 +82,16 @@ int main(int /*argc*/, char** /*argv*/)
return 1;
runSync(QStringLiteral(KWIN_WAYLAND_BIN_PATH), { QStringLiteral("--xwayland"), QStringLiteral("--libinput"), QStringLiteral("--exit-with-session=" CMAKE_INSTALL_FULL_LIBEXECDIR "/startplasma-waylandsession") });
QStringList args;
if (argc > 1) {
for (int i = 1; i < argc; ++i) {
args << QString::fromLocal8Bit(argv[i]);
} else {
args = QStringList { QStringLiteral("--xwayland"), QStringLiteral("--libinput"), QStringLiteral("--exit-with-session=" CMAKE_INSTALL_FULL_LIBEXECDIR "/startplasma-waylandsession") };
runSync(QStringLiteral(KWIN_WAYLAND_BIN_PATH), args);
out << "startplasmacompositor: Shutting down...\n";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment