File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,7 @@ namespace SDDM {
7777 };
7878
7979 inline QDataStream &operator <<(QDataStream &stream, const Session &session) {
80- const quint32 type = static_cast <quint32>(session.type ());
81- stream << type << session.fileName ();
80+ stream << quint32 (session.type ()) << session.fileName ();
8281 return stream;
8382 }
8483
Original file line number Diff line number Diff line change @@ -41,13 +41,20 @@ namespace SDDM {
4141 bool UserSession::start () {
4242 QProcessEnvironment env = qobject_cast<HelperApp*>(parent ())->session ()->processEnvironment ();
4343
44- if (env.value (" XDG_SESSION_CLASS" ) == " greeter" )
44+ if (env.value (" XDG_SESSION_CLASS" ) == QStringLiteral ( " greeter" )) {
4545 QProcess::start (m_path);
46- else {
46+ } else if (env. value ( " XDG_SESSION_TYPE " ) == QStringLiteral ( " x11 " )) {
4747 qDebug () << " Starting:" << mainConfig.XDisplay .SessionCommand .get ()
4848 << m_path;
4949 QProcess::start (mainConfig.XDisplay .SessionCommand .get (),
5050 QStringList () << m_path);
51+ } else if (env.value (" XDG_SESSION_TYPE" ) == QStringLiteral (" wayland" )) {
52+ qDebug () << " Starting:" << mainConfig.WaylandDisplay .SessionCommand .get ()
53+ << m_path;
54+ QProcess::start (mainConfig.WaylandDisplay .SessionCommand .get (),
55+ QStringList () << m_path);
56+ } else {
57+ qCritical () << " Unable to run user session: unknown session type" ;
5158 }
5259
5360 return waitForStarted ();
You can’t perform that action at this time.
0 commit comments