[sddm] 0.2.0-0.13.20130914git50ca5b20
Rex Dieter
rdieter at fedoraproject.org
Mon Oct 14 18:45:44 UTC 2013
commit 092f0324d25901b10b3017ee0ee6eb4c657c426b
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Mon Oct 14 13:45:42 2013 -0500
0.2.0-0.13.20130914git50ca5b20
- include standard theme/config here, Obsoletes: kde-settings-sddm
- sddm.conf: SessionCommand=/etc/X11/xinit/Xsession
fedora-Main.qml | 207 +++++++++++++++++++++++++++++++++++++++++++++++
fedora-metadata.desktop | 15 ++++
fedora-theme.conf | 2 +
sddm.conf | 25 ++++++
sddm.spec | 53 ++++++++++--
tmpfiles-sddm.conf | 1 +
6 files changed, 294 insertions(+), 9 deletions(-)
---
diff --git a/fedora-Main.qml b/fedora-Main.qml
new file mode 100644
index 0000000..fcdf0bc
--- /dev/null
+++ b/fedora-Main.qml
@@ -0,0 +1,207 @@
+/***************************************************************************
+* Copyright (c) 2013 Martin Bříza <mbriza at redhat.com>
+*
+* Permission is hereby granted, free of charge, to any person
+* obtaining a copy of this software and associated documentation
+* files (the "Software"), to deal in the Software without restriction,
+* including without limitation the rights to use, copy, modify, merge,
+* publish, distribute, sublicense, and/or sell copies of the Software,
+* and to permit persons to whom the Software is furnished to do so,
+* subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+* OR OTHER DEALINGS IN THE SOFTWARE.
+*
+***************************************************************************/
+
+
+import QtQuick 1.1
+import SddmComponents 1.1
+
+Rectangle {
+ Connections {
+ target: sddm
+
+ onLoginSucceeded: {
+ errorMessage.color = "green"
+ errorMessage.text = qsTr("Login succeeded.")
+ }
+ onLoginFailed: {
+ errorMessage.color = "red"
+ errorMessage.text = qsTr("Login failed.")
+ }
+ }
+
+ Repeater {
+ model: screenModel
+ Item {
+ Background {
+ x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height
+ source: config.background
+ fillMode: Image.Stretch
+ }
+ Image {
+ id: plymouthLogo
+ x: geometry.width / 2 - width / 2
+ y: geometry.height / 2 - height / 2
+ source: "/usr/share/pixmaps/system-logo-white.png"
+ }
+ }
+ }
+
+ Rectangle {
+ property variant geometry: screenModel.geometry(screenModel.primary)
+ x: geometry.x
+ y: geometry.y
+ width: geometry.width
+ height: geometry.height
+ color: "transparent"
+
+ Row {
+ x: parent.x + 4
+ y: parent.y + 4
+ spacing: 4
+ width: parent.width - 8
+ z: 100
+
+ Row {
+ spacing: 4
+ width: parent.width/2
+ ComboBox {
+ id: session
+ width: 250
+ height: 24
+ font.pixelSize: 14
+
+ model: sessionModel
+ index: sessionModel.lastIndex
+
+ KeyNavigation.backtab: password; KeyNavigation.tab: layoutBox
+ }
+
+ LayoutBox {
+ id: layoutBox; height: 24
+ font.pixelSize: 14
+
+ KeyNavigation.backtab: session; KeyNavigation.tab: loginButton
+ }
+ }
+
+ Row {
+ anchors.right: parent.right
+ spacing: 4
+
+ Button {
+ id: rebootButton
+ text: qsTr("Reboot")
+ height: 24
+
+ onClicked: sddm.reboot()
+
+ KeyNavigation.backtab: shutdownButton; KeyNavigation.tab: name
+ }
+
+ Button {
+ id: shutdownButton
+ text: qsTr("Shutdown")
+ height: 24
+
+ onClicked: sddm.powerOff()
+
+ KeyNavigation.backtab: loginButton; KeyNavigation.tab: rebootButton
+ }
+ }
+ }
+
+ Rectangle {
+ x: parent.x
+ y: parent.y + parent.height/2
+ width: parent.width
+ height: parent.height/2
+ color: "transparent"
+ Column {
+ width: 260
+ anchors.centerIn: parent
+ spacing: 18
+
+ Row {
+ width: parent.width
+ TextBox {
+ id: name
+ width: parent.width
+ height: 30
+ text: userModel.lastUser
+ font.pixelSize: 14
+
+ KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password
+
+ Keys.onPressed: {
+ if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
+ sddm.login(name.text, password.text, session.index)
+ event.accepted = true
+ }
+ }
+ }
+ }
+
+ Row {
+ width: parent.width
+ PasswordBox {
+ id: password
+ width: parent.width * 0.9
+ height: 30
+ font.pixelSize: 14
+ tooltipBG: "lightgrey"
+
+ KeyNavigation.backtab: name; KeyNavigation.tab: session
+
+ Keys.onPressed: {
+ if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
+ sddm.login(name.text, password.text, session.index)
+ event.accepted = true
+ }
+ }
+ }
+
+ Button {
+ width: parent.width * 0.1
+ height: 31
+ id: loginButton
+ text: qsTr(">")
+
+ onClicked: sddm.login(name.text, password.text, session.index)
+
+ KeyNavigation.backtab: layoutBox; KeyNavigation.tab: shutdownButton
+ }
+ }
+
+
+ Column {
+ width: parent.width
+ Text {
+ id: errorMessage
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Enter your user name and password.")
+ font.pixelSize: 10
+ color: "white"
+ }
+ }
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ if (name.text === "")
+ name.focus = true
+ else
+ password.focus = true
+ }
+}
diff --git a/fedora-metadata.desktop b/fedora-metadata.desktop
new file mode 100644
index 0000000..b01744a
--- /dev/null
+++ b/fedora-metadata.desktop
@@ -0,0 +1,15 @@
+[SddmGreeterTheme]
+Name=Fedora
+Description=Fedora SDDM Theme
+Author=Martin Bříza
+Copyright=(c) 2013, Martin Bříza
+License=CC-BY-SA
+Type=sddm-theme
+Version=0.1
+Website=https://github.com/sddm/sddm
+Screenshot=screenshot.jpg
+MainScript=Main.qml
+ConfigFile=theme.conf
+Email=mbriza at redhat.com
+Theme-Id=fedora
+Theme-API=1.1
diff --git a/fedora-theme.conf b/fedora-theme.conf
new file mode 100644
index 0000000..2e9498e
--- /dev/null
+++ b/fedora-theme.conf
@@ -0,0 +1,2 @@
+[General]
+background=/usr/share/backgrounds/background.png
diff --git a/sddm.conf b/sddm.conf
new file mode 100644
index 0000000..609f761
--- /dev/null
+++ b/sddm.conf
@@ -0,0 +1,25 @@
+[General]
+DefaultPath=/bin:/usr/bin:/usr/local/bin
+CursorTheme=
+ServerPath=/usr/bin/X
+XauthPath=/usr/bin/xauth
+AuthDir=/var/run/sddm
+HaltCommand=/usr/bin/systemctl poweroff
+RebootCommand=/usr/bin/systemctl reboot
+SessionsDir=/usr/share/xsessions/
+LastSession=kde-plasma.desktop
+RememberLastSession=true
+SessionCommand=/etc/X11/xinit/Xsession
+FacesDir=/usr/share/apps/sddm/faces/
+ThemesDir=/usr/share/apps/sddm/themes/
+CurrentTheme=heisenbug
+MinimumUid=1000
+MaximumUid=65000
+LastUser=
+RememberLastUser=false
+AutoUser=
+HideUsers=
+HideShells=
+AutoRelogin=false
+MinimumVT=1
+Numlock=on
diff --git a/sddm.spec b/sddm.spec
index 099f233..fc87bda 100644
--- a/sddm.spec
+++ b/sddm.spec
@@ -3,16 +3,27 @@
Name: sddm
Version: 0.2.0
-Release: 0.12.20130914git%(echo %{sddm_commit} | cut -c-8)%{?dist}
-License: GPLv2+
+Release: 0.13.20130914git%(echo %{sddm_commit} | cut -c-8)%{?dist}
+# code GPLv2+, fedora theme CC-BY-SA
+License: GPLv2+ and CC-BY-SA
Summary: QML based X11 desktop manager
Url: https://github.com/sddm/sddm
Source0: https://github.com/MartinBriza/sddm/archive/%{sddm_commit}.tar.gz
+
+# fedora standard sddm.conf
+Source10: sddm.conf
# Originally kdm config, shamelessly stolen from gdm
-Source1: sddm.pam
+Source11: sddm.pam
# We need to ship our own service file to handle Fedora-specific cases
-Source2: sddm.service
+Source12: sddm.service
+# systesmd tmpfiles support for /var/run/sddm
+Source13: tmpfiles-sddm.conf
+
+# fedora theme files
+Source21: fedora-Main.qml
+Source22: fedora-metadata.desktop
+Source23: fedora-theme.conf
# Patch setting a better order of the xsessions and hiding the custom one
Patch2: sddm-git.e707e229-session-list.patch
@@ -27,8 +38,14 @@ BuildRequires: libxcb-devel
BuildRequires: qt4-devel
BuildRequires: pkgconfig
-Requires: kde-settings-sddm
+Obsoletes: kde-settings-sddm < 20-5
+
+# for /usr/share/backgrounds/default.png
+Requires: desktop-backgrounds-compat
+# for /usr/share/pixmaps/system-logo-white.png
+Requires: system-logos
Requires: systemd
+Requires: xorg-x11-xinit
Requires: xorg-x11-server-Xorg
%{?systemd_requires}
@@ -49,6 +66,7 @@ A collection of sddm themes, including: circles, elarun, maldives, maui.
%prep
%setup -q -n %{name}-%{sddm_commit}
+
%patch2 -p1 -b .session-list
# get rid of the architecture flag
@@ -63,12 +81,20 @@ popd
make %{?_smp_mflags} -C %{_target_platform}
+
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
-install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/sddm
-install -Dpm 644 %{SOURCE2} %{buildroot}%{_unitdir}/sddm.service
-# moved to kde-settings-sddm
-rm -fv %{buildroot}%{_sysconfdir}/sddm.conf
+
+install -Dpm 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sddm.conf
+install -Dpm 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/pam.d/sddm
+install -Dpm 644 %{SOURCE12} %{buildroot}%{_unitdir}/sddm.service
+install -Dpm 644 %{SOURCE13} %{buildroot}%{_tmpfilesdir}/sddm.conf
+mkdir -p %{buildroot}%{_localstatedir}/run/sddm
+
+# install fedora theme
+install -Dpm 644 %{SOURCE21} %{buildroot}%{_datadir}/apps/sddm/themes/fedora/Main.qml
+install -Dpm 644 %{SOURCE22} %{buildroot}%{_datadir}/apps/sddm/themes/fedora/metadata.desktop
+install -Dpm 644 %{SOURCE23} %{buildroot}%{_datadir}/apps/sddm/themes/fedora/theme.conf
%post
@@ -82,10 +108,13 @@ rm -fv %{buildroot}%{_sysconfdir}/sddm.conf
%files
%doc COPYING README.md CONTRIBUTORS
+%config %{_sysconfdir}/sddm.conf
%config(noreplace) %{_sysconfdir}/pam.d/sddm
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf
%{_bindir}/sddm
%{_bindir}/sddm-greeter
+%{_tmpfilesdir}/sddm.conf
+%attr(0711,root,root) %dir %{_localstatedir}/run/sddm
%{_unitdir}/sddm.service
%{_qt4_importdir}/SddmComponents/
# or add Requires: kde-filesystem -- rex
@@ -96,6 +125,8 @@ rm -fv %{buildroot}%{_sysconfdir}/sddm.conf
%{_datadir}/apps/sddm/scripts/
%{_datadir}/apps/sddm/sddm.conf.sample
%dir %{_datadir}/apps/sddm/themes/
+# default fedora theme
+%{_datadir}/apps/sddm/themes/fedora/
# %%lang'ify ? -- rex
%{_datadir}/apps/sddm/translations/
@@ -106,6 +137,10 @@ rm -fv %{buildroot}%{_sysconfdir}/sddm.conf
%{_datadir}/apps/sddm/themes/maui/
%changelog
+* Mon Oct 14 2013 Rex Dieter <rdieter at fedoraproject.org> - 0.2.0-0.13.20130914git50ca5b20
+- include standard theme/config here, Obsoletes: kde-settings-sddm
+- sddm.conf: SessionCommand=/etc/X11/xinit/Xsession
+
* Mon Oct 14 2013 Rex Dieter <rdieter at fedoraproject.org> - 0.2.0-0.12.20130914git50ca5b20
- -themes: Obsoletes: sddm ... for upgrade path
diff --git a/tmpfiles-sddm.conf b/tmpfiles-sddm.conf
new file mode 100644
index 0000000..7165d41
--- /dev/null
+++ b/tmpfiles-sddm.conf
@@ -0,0 +1 @@
+d /var/run/sddm 0711 root root -
More information about the scm-commits
mailing list