nixpkgs/pkgs/applications/display-managers/sddm/cmake_paths.patch
2015-03-05 20:49:26 +03:00

56 lines
2.5 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d6e0a9..df4ad28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,7 +77,9 @@ find_package(Qt5LinguistTools REQUIRED)
# find qt5 imports dir
get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
-exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" RETURN_VALUE return_code OUTPUT_VARIABLE QT_IMPORTS_DIR)
+if(NOT QT_IMPORTS_DIR)
+ exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" RETURN_VALUE return_code OUTPUT_VARIABLE QT_IMPORTS_DIR)
+endif()
# Set components version
set(COMPONENTS_VERSION 2.0)
diff --git a/data/man/sddm.conf.rst.in b/data/man/sddm.conf.rst.in
index 6a28224..798bc5c 100644
--- a/data/man/sddm.conf.rst.in
+++ b/data/man/sddm.conf.rst.in
@@ -65,6 +65,10 @@ OPTIONS
Path of the X server.
Default value is "/usr/bin/X".
+`XephyrPath=`
+ Path of the Xephyr.
+ Default value is "/usr/bin/Xephyr".
+
`XauthPath=`
Path of the Xauth.
Default value is "/usr/bin/xauth".
diff --git a/src/common/Configuration.h b/src/common/Configuration.h
index 72aa6f4..854cc22 100644
--- a/src/common/Configuration.h
+++ b/src/common/Configuration.h
@@ -54,6 +54,7 @@ namespace SDDM {
// TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal
Section(XDisplay,
Entry(ServerPath, QString, _S("/usr/bin/X"), _S("X server path"));
+ Entry(XephyrPath, QString, _S("/usr/bin/Xephyr"), _S("Xephyr path"));
Entry(XauthPath, QString, _S("/usr/bin/xauth"), _S("Xauth path"));
Entry(SessionDir, QString, _S("/usr/share/xsessions"), _S("Session description directory"));
Entry(SessionCommand, QString, _S(SESSION_COMMAND), _S("Xsession script path\n"
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
index f10ad82..cb9de3f 100644
--- a/src/daemon/XorgDisplayServer.cpp
+++ b/src/daemon/XorgDisplayServer.cpp
@@ -136,7 +136,7 @@ namespace SDDM {
if (daemonApp->testing()) {
QStringList args;
args << m_display << "-ac" << "-br" << "-noreset" << "-screen" << "800x600";
- process->start("/usr/bin/Xephyr", args);
+ process->start(mainConfig.XDisplay.XephyrPath.get(), args);
} else {
// set process environment
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();