cmake | ||
components | ||
data | ||
dist/arch | ||
services | ||
src | ||
.gitignore | ||
ChangeLog | ||
cmake_uninstall.cmake.in | ||
CMakeLists.txt | ||
CONTRIBUTORS | ||
COPYING | ||
INSTALL | ||
README.md | ||
sddm.conf.cmake | ||
TODO |
INTRODUCTION
SDDM is a new lightweight display manager for X11 aiming to be fast, simple and beatiful.
One of the distinctive features of SDDM is the ability to use QML for user interface creation. QML is a JavaScript-based, declarative language for designing user interface–centric applications. It is designed to provide highly customizable user interfaces with fluid animations. It supports images, gradients, color/size/opacity/property animations, hardware acceleration and lots of other stuff needed to create beatiful interfaces by today's standards.
SDDM has a small, simple and hackable codebase.
DEPENDENCIES
SDDM depends on PAM for authorization. SDDM uses a PAM service named "sddm" to authorize user. PAM services are created using simple config files installed into PAM config directory (e.g /etc/pam.d). A sample service file named "sddm.pam" is provided. You should copy this file into your PAM config directory and rename it to "sddm". Since the authorization procedure and available PAM modules may change depending on your distribution or your setup, we strongly advise reviewing this service file to see if it fits your needs.
SDDM depends on Xlib for communicating to the X server. Also we depend on Qt for loading the user interface and event loop management, apart from other things.
COMPILATION
SDDM uses CMake for compile configuration. Typical compilation procedure for a cmake-based project is:
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
There are several flags that can be used to modify compilation:
-
To build with Qt5 instead of Qt4 use
-DUSE_QT5=true
-
To enable systemd support use
-DUSE_SYSTEMD=true
-
To enable upower support use
-DUSE_UPOWER=true
Note that in order to have working suspend and hibernate, you need to have either systemd or upower support built. If both options are given systemd is preferred.
Also note that if any of systemd or upower support has been built, HaltCommand and RebootCommand config entries have no effect. Instead systemd or upower is called to carry out the command.
To install simply callsudo make install
.
CONFIGURATION
SDDM configuration is done using a simple ini-style text file. Config file usually resides in /etc/sddm.conf. Location of the config file can be changed when compiling the project. You can use a different configuration file at runtime using the "-c" parameter.
sddm -c /etc/sddm-alternative.conf
Configuration file is self documented. See the comments in the file for available options.
THEMES
SDDM themes are a collection of qml files and needed resources residing in a directory. There is almost no restrictions internal structure or layout of the files. But every theme must have a metadata.desktop file in the theme directory. This file contains the metadata of the theme, e.g authors, entry point etc.
SESSION MANAGER
This class contains several functions useful for the themes and can be accessed through a context property named sessionManager within the themes.
hostName: Host name of the computer SDDM running on. You can use this property, for example for a welcome message.
Text { text: qsTr("Welcome to ") + sessionManager.hostName }
lastUser: This property holds the last user successfully logged into the system through SDDM. You can use this, for example to preselect a user from a list or put into the user name field as default.
TextBox { id: name; text: sessionManager.lastUser }
login(string username, string password, int sessionIndex): This functions tries to authenticate using given username and password. If authentication fails, fail signal is emitted. If authentication is successfull session manager emits success signal, closes the user interface and executes session command for the session with the index sessionIndex.
shuthdown(): Shutdowns the computer.
reboot(): Reboots the computer
fail: This signal is emitted when authentication fails. Can be used to show an error message.
success: This signal is emitted when authentication succeeds.
SESSION MODEL
This class is a list model containing available x-sessions on the system. Session list is created using the desktop files installed into the xsessions directory (e.g /usr/share/xsessions). The desktop files are generally installed along with a desktop environment like KDE or XFCE.
Session model with QML views directly. This class also contains index of the last session used through property lastIndex.
USER MODEL
This class is a list model containing available users on the system. User list is created by parsing the /etc/passwd file. Like session model this model also can be used with QML views directly.
TESTING
To test your themes use the "-t" commandline parameter.
sddm -t /path/to/your/theme
LICENSING
Source code of SDDM is licensed under GNU GPL version 2 or later (at your opinion). Scripts and configuration files are public domain. QML files are MIT licensed and images are CC BY 3.0.
RESOURCES
Git Repository: https://github.com/sddm/sddm
Mailing List: https://groups.google.com/group/sde-devel
Bug Reports: https://github.com/sddm/sddm/issues
Wiki: https://github.com/sddm/sddm/wiki
Screenshots