Commit 1c1f654b authored by Róbert Bagdán's avatar Róbert Bagdán Committed by Tobias C. Berner

sddm-kcm: don't hardcode session file location.

Summary:
The sddm-kcm uses /usr/share/xsessions and /usr/share/wayland-sessions pathes, but in FreeBSD the correct path is /usr/local/share/*.

This cause, that in sddm page of systemsettings, in the part of automatic login, the sessions are empty.

See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232356

Reviewers: #freebsd, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D16339
parent 7ee6fa1e
set(SDDM_CONFIG_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sddm.conf" CACHE PATH "Path of the sddm config file")
set(SDDM_CONFIG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sddm.conf.d" CACHE PATH "Path of the sddm config directory")
set(SDDM_SYSTEM_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/sddm/sddm.conf.d" CACHE PATH "Path of the system sddm config directory")
set(XSESSIONS_DIR "${CMAKE_INSTALL_PREFIX}/share/xsessions" CACHE PATH "Path of the xsessions")
set(WAYLAND_SESSIONS_DIR "${CMAKE_INSTALL_PREFIX}/share/wayland-sessions" CACHE PATH "Path of the wayland sessions")
configure_file(config.h.in config.h IMMEDIATE @ONLY)
# add_subdirectory(configwidgets)
......
......@@ -4,5 +4,7 @@
#define SDDM_CONFIG_FILE "@SDDM_CONFIG_FILE@"
#define SDDM_CONFIG_DIR "@SDDM_CONFIG_DIR@"
#define SDDM_SYSTEM_CONFIG_DIR "@SDDM_SYSTEM_CONFIG_DIR@"
#define XSESSIONS_DIR "@XSESSIONS_DIR@"
#define WAYLAND_SESSIONS_DIR "@WAYLAND_SESSIONS_DIR@"
#endif //CONFIG_H
......@@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
***************************************************************************/
#include "config.h"
#include "sessionmodel.h"
#include <QDir>
......@@ -46,8 +47,8 @@ public:
};
SessionModel::SessionModel(QObject *parent) : QAbstractListModel(parent), d(new SessionModelPrivate()) {
loadDir(QStringLiteral("/usr/share/xsessions"), SessionTypeX);
loadDir(QStringLiteral("/usr/share/wayland-sessions"), SessionTypeWayland);
loadDir(QStringLiteral(XSESSIONS_DIR), SessionTypeX);
loadDir(QStringLiteral(WAYLAND_SESSIONS_DIR), SessionTypeWayland);
}
SessionModel::~SessionModel() {
......
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