Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We want to support Xorg user session and keep running it as root as an option, so we don't break the workflow of some users. As a matter of fact, when we run the X11 server as sddm user, we also start the display start and stop scripts as user. Scripts that need root privileges won't work. To support both modes, we move the code to sddm-x11-helper and either run it as root or sddm user using sddm-helper. Closes: sddm#246
- Loading branch information
Showing
11 changed files
with
773 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*************************************************************************** | ||
* Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the | ||
* Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
***************************************************************************/ | ||
|
||
#ifndef SDDM_X11HELPERPROTOCOL_H | ||
#define SDDM_X11HELPERPROTOCOL_H | ||
|
||
#include <QDataStream> | ||
|
||
namespace SDDM { | ||
|
||
enum class X11HelperMessage { | ||
Unknown, | ||
Started, | ||
Last | ||
}; | ||
|
||
inline QDataStream &operator>>(QDataStream &s, X11HelperMessage &m) | ||
{ | ||
qint32 what; | ||
s >> what; | ||
if (what < qint32(X11HelperMessage::Unknown) || what >= qint32(X11HelperMessage::Last)) { | ||
s.setStatus(QDataStream::ReadCorruptData); | ||
return s; | ||
} | ||
m = X11HelperMessage(what); | ||
return s; | ||
} | ||
|
||
inline QDataStream &operator<<(QDataStream &s, const X11HelperMessage &m) | ||
{ | ||
s << qint32(m); | ||
return s; | ||
} | ||
|
||
} // namespace SDDM | ||
|
||
#endif // SDDM_X11HELPERPROTOCOL_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.