Go to file
Abdurrahman AVCI 41a9603058 Port to Qt5.
To compile for Qt5, pass -DUSE_QT5=true to cmake.
2013-01-27 15:31:31 +00:00
cmake Initial commit. 2013-01-18 00:46:14 +00:00
src Port to Qt5. 2013-01-27 15:31:31 +00:00
themes/Default Remove psd file from theme. 2013-01-26 16:31:35 +00:00
.gitignore Initial commit. 2013-01-18 00:46:14 +00:00
ChangeLog Initial commit. 2013-01-18 00:46:14 +00:00
CMakeLists.txt Port to Qt5. 2013-01-27 15:31:31 +00:00
COPYING Initial commit. 2013-01-18 00:46:14 +00:00
INSTALL Initial commit. 2013-01-18 00:46:14 +00:00
PKGBUILD Fix PKGBUILD and rename it to sddm-git. 2013-01-20 12:03:38 +00:00
README.md Port to Qt5. 2013-01-27 15:31:31 +00:00
sddm.conf Implement auto login. 2013-01-20 23:56:09 +00:00
sddm.pam Initial commit. 2013-01-18 00:46:14 +00:00
sddm.service Initial commit. 2013-01-18 00:46:14 +00:00
TODO Update TODO, theme documentation is in the README. 2013-01-21 05:51:43 +00:00
Xsession Add support for a session start up script. 2013-01-20 11:45:59 +00:00

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 interfacecentric 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's code base is tiny: under 1000 lines of code.

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 .. && make

SDDM by default compiles for Qt4 but supports compiling for Qt5 too. If you want to use Qt5, USE_QT5 arguments must be given to cmake:

mkdir build && cd build && cmake .. -DUSE_QT5=true && make

Qt4 based themes and Qt5 based ones are incompatible, so if you select Qt5 during compilation, either use a Qt5 based theme, or change

import QtQuick 1.1

lines to

import QtQuick 2.0

in the qml files.

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

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 the main qml file for the theme must have the name "Main.qml".

There are several functions provided by SDDM to the theme to enable authorization/shutdown/reboot. These functions are available to the theme through a context property named sessionManager. Session manager provides following:

Properties

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 }

sessions: This property is list of strings corresponding to the names of the desktop xsessions available in the system. This session list comes from 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. You can use this property to show a user a list of available sessions to select from.

lastSession: Similar to the lastUser, this property holds position of the last session used, in the sessions list. This property can have a value of 0 to sessions.size - 1.

Functions

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

Signals

fail: This signal is emitted when authentication fails. Can be used to show an error message.

success: This signal is emitted when authentication succeeds.

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.

Screenshots

sample screenshot