move sddm
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import cmaketools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
def setup():
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DUSE_QT5=ON \
|
||||
-DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \
|
||||
-DUSE_WAYLAND=ON \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/sddm \
|
||||
-DBUILD_MAN_PAGES=ON", sourceDir=".." )
|
||||
|
||||
def build():
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.make()
|
||||
|
||||
def install():
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.install()
|
||||
|
||||
pisitools.dodoc("../LICENSE")
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os, re
|
||||
import shutil
|
||||
|
||||
OUR_ID = 65
|
||||
OUR_NAME = "sddm"
|
||||
OUR_DESC = "sddm"
|
||||
|
||||
DATADIR = "/var/lib/sddm"
|
||||
DATADIRMODE = 0755
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
|
||||
# On first install...
|
||||
if not os.path.exists(DATADIR):
|
||||
os.makedirs(DATADIR, DATADIRMODE)
|
||||
|
||||
try:
|
||||
os.system ("groupadd -g %d %s" % (OUR_ID, OUR_NAME))
|
||||
os.system ("useradd -m -d /var/lib/sddm -r -s /bin/false -u %d -g %d %s -c %s" % (OUR_ID, OUR_ID, OUR_NAME, OUR_DESC))
|
||||
os.system ("passwd -l sddm > /dev/null")
|
||||
os.system("/bin/chown -R sddm:sddm %s" % DATADIR)
|
||||
except:
|
||||
pass
|
||||
|
||||
# os.system ("groupadd --system %s" % (OUR_NAME))
|
||||
# os.system ("useradd -c 'sddm' --system -d /var/lib/sddm -s /sbin/nologin -g %s %s" % (OUR_NAME, OUR_DESC))
|
||||
|
||||
|
||||
|
||||
# os.system("/bin/chown -R sddm:sddm /var/log/sddm.log")
|
||||
|
||||
|
||||
|
||||
def postRemove():
|
||||
try:
|
||||
os.system ("userdel %s" % OUR_NAME)
|
||||
os.system ("groupdel %s" % OUR_NAME)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from comar.service import *
|
||||
import os
|
||||
|
||||
serviceType="server"
|
||||
serviceDesc=_({"en": "sddm Server",
|
||||
"tr": "sddm Sunucusu"})
|
||||
serviceDefault="on"
|
||||
PIDFILE="/run/sddm/sddm.pid"
|
||||
DAEMON="/usr/bin/sddm"
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startService(command=DAEMON,
|
||||
pidfile=PIDFILE,
|
||||
detach=True,
|
||||
donotify=True)
|
||||
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile=PIDFILE,
|
||||
donotify=True)
|
||||
|
||||
try:
|
||||
os.unlink(PIDFILE)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def status():
|
||||
return isServiceRunning(PIDFILE)
|
||||
@@ -0,0 +1,12 @@
|
||||
polkit.addRule(function(action, subject) {
|
||||
|
||||
if (action.id.indexOf("org.kde.powerdevil.backlighthelper.") == 0 &&
|
||||
|
||||
subject.isInGroup("users")) {
|
||||
|
||||
return polkit.Result.YES;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From ecb903e48822bd90650bdd64fe80754e3e9664cb Mon Sep 17 00:00:00 2001
|
||||
From: Bastian Beischer <bastian.beischer@gmail.com>
|
||||
Date: Fri, 2 Sep 2016 13:05:18 +0200
|
||||
Subject: [PATCH] Fix display of user avatars. (#684)
|
||||
|
||||
QFile::exists("...") does not understand file:// URLs, at least in Qt
|
||||
5.7.0 and Qt 4.8.7.
|
||||
---
|
||||
src/greeter/UserModel.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp
|
||||
index 41a9f10..94c492d 100644
|
||||
--- a/src/greeter/UserModel.cpp
|
||||
+++ b/src/greeter/UserModel.cpp
|
||||
@@ -107,13 +107,13 @@ namespace SDDM {
|
||||
d->lastIndex = i;
|
||||
|
||||
if (avatarsEnabled) {
|
||||
- const QString userFace = QStringLiteral("file://%1/.face.icon").arg(user->homeDir);
|
||||
- const QString systemFace = QStringLiteral("file://%1/%2.face.icon").arg(facesDir).arg(user->name);
|
||||
+ const QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir);
|
||||
+ const QString systemFace = QStringLiteral("%1/%2.face.icon").arg(facesDir).arg(user->name);
|
||||
|
||||
if (QFile::exists(userFace))
|
||||
- user->icon = userFace;
|
||||
+ user->icon = QStringLiteral("file://%1").arg(userFace);
|
||||
else if (QFile::exists(systemFace))
|
||||
- user->icon = systemFace;
|
||||
+ user->icon = QStringLiteral("file://%1").arg(systemFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#%PAM-1.0
|
||||
|
||||
auth include system-auth
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
session include system-auth
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -u -r sddm-0.9.0.orig/src/daemon/PowerManager.cpp sddm-0.9.0/src/daemon/PowerManager.cpp
|
||||
--- sddm-0.9.0.orig/src/daemon/PowerManager.cpp 2014-10-01 18:40:37.402683578 +0200
|
||||
+++ sddm-0.9.0/src/daemon/PowerManager.cpp 2014-10-01 18:40:43.502618164 +0200
|
||||
@@ -197,7 +197,7 @@
|
||||
m_backends << new Login1Backend();
|
||||
|
||||
// check if upower interface exists
|
||||
- if (interface->isServiceRegistered(UPOWER_SERVICE))
|
||||
+// if (interface->isServiceRegistered(UPOWER_SERVICE))
|
||||
m_backends << new UPowerBackend();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/data/scripts/Xsession b/data/scripts/Xsession
|
||||
index a5d270d..4b48524 100755
|
||||
--- a/data/scripts/Xsession
|
||||
+++ b/data/scripts/Xsession
|
||||
@@ -74,7 +74,7 @@ case $session in
|
||||
exec xterm -geometry 80x24-0-0
|
||||
;;
|
||||
*)
|
||||
- eval exec "$session"
|
||||
+ eval exec ck-launch-session "$session"
|
||||
;;
|
||||
esac
|
||||
exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop."
|
||||
@@ -0,0 +1,46 @@
|
||||
From 4ab6ab1b78617c51a6d9db4d03be2b3d75e7acc5 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Sitter <sitter@kde.org>
|
||||
Date: Tue, 14 Apr 2015 10:50:00 +0200
|
||||
Subject: [PATCH] allow changing the dbus config file name
|
||||
|
||||
on some distributions the generic name of the dbus config might be provided
|
||||
by more than one display manager, so always installing with the generic
|
||||
name would require distributions to hard-patch the cmake code.
|
||||
allowing to change it through a cmake cache variable enables distributions
|
||||
to simply parameterize in their cmake call.
|
||||
|
||||
this for example affects Ubuntu where the config would be provided by both
|
||||
SDDM and LightDM.
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
data/CMakeLists.txt | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7ceed6e..cf21dc9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -141,6 +141,7 @@ set(SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/Xsession"
|
||||
|
||||
set(CONFIG_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sddm.conf" CACHE PATH "Path of the sddm config file")
|
||||
set(LOG_FILE "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/sddm.log" CACHE PATH "Path of the sddm log file")
|
||||
+set(DBUS_CONFIG_FILENAME "org.freedesktop.DisplayManager.conf" CACHE STRING "Name of the sddm config file")
|
||||
set(COMPONENTS_TRANSLATION_DIR "${DATA_INSTALL_DIR}/translations" CACHE PATH "Components translations directory")
|
||||
|
||||
# Add subdirectories
|
||||
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
|
||||
index 918892f..335f4e7 100644
|
||||
--- a/data/CMakeLists.txt
|
||||
+++ b/data/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
install(DIRECTORY "faces" DESTINATION "${DATA_INSTALL_DIR}")
|
||||
install(DIRECTORY "flags" DESTINATION "${DATA_INSTALL_DIR}")
|
||||
|
||||
-install(FILES "org.freedesktop.DisplayManager.conf" DESTINATION "${DBUS_CONFIG_DIR}")
|
||||
+install(FILES "org.freedesktop.DisplayManager.conf" DESTINATION "${DBUS_CONFIG_DIR}" RENAME ${DBUS_CONFIG_FILENAME})
|
||||
|
||||
install(FILES "scripts/Xsession" "scripts/Xsetup" "scripts/Xstop" DESTINATION "${DATA_INSTALL_DIR}/scripts"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
--
|
||||
2.3.6
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
--- a/data/scripts/Xsession 2016-08-28 14:52:04.910181422 +0200
|
||||
+++ b/data/scripts/Xsession 2016-08-28 14:53:07.157184480 +0200
|
||||
@@ -91,5 +91,5 @@
|
||||
if [ -z "$@" ]; then
|
||||
exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
|
||||
else
|
||||
- exec $@
|
||||
+ exec ck-launch-session $@
|
||||
fi
|
||||
@@ -0,0 +1,18 @@
|
||||
#%PAM-1.0
|
||||
auth requisite pam_nologin.so
|
||||
auth required pam_env.so
|
||||
|
||||
auth required pam_permit.so
|
||||
|
||||
auth sufficient pam_succeed_if.so uid >= 1000 quiet
|
||||
auth required pam_deny.so
|
||||
|
||||
account required pam_access.so
|
||||
account required pam_time.so
|
||||
|
||||
password required pam_deny.so
|
||||
|
||||
session required pam_limits.so
|
||||
session required pam_loginuid.so
|
||||
session optional pam_keyinit.so revoke
|
||||
session required pam_limits.so
|
||||
@@ -0,0 +1,17 @@
|
||||
#%PAM-1.0
|
||||
|
||||
# Load environment from /etc/environment and ~/.pam_environment
|
||||
auth required pam_env.so
|
||||
|
||||
# Always let the greeter start without authentication
|
||||
auth required pam_permit.so
|
||||
|
||||
# No action required for account management
|
||||
account required pam_permit.so
|
||||
|
||||
# Can't change password
|
||||
password required pam_deny.so
|
||||
|
||||
# Setup session
|
||||
session required pam_unix.so
|
||||
-session optional pam_systemd.so
|
||||
@@ -0,0 +1,26 @@
|
||||
diff -u CMakeLists.txt CMakeLists.txt
|
||||
--- CMakeLists.txt 2015-09-05 22:40:50.000000000 +0200
|
||||
+++ CMakeLists.txt 2015-09-07 12:15:33.419530808 +0200
|
||||
@@ -35,22 +35,6 @@
|
||||
# Definitions
|
||||
add_definitions(-Wall -std=c++11 -DQT_NO_CAST_FROM_ASCII)
|
||||
|
||||
-# Default build type
|
||||
-if(NOT CMAKE_BUILD_TYPE)
|
||||
- set(CMAKE_BUILD_TYPE Release)
|
||||
-endif()
|
||||
-
|
||||
-# Handle build type
|
||||
-if(CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
|
||||
- message(STATUS "Debug build")
|
||||
- add_definitions(-DDEBUG)
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
|
||||
-else()
|
||||
- message(STATUS "Release build")
|
||||
- add_definitions(-DNDEBUG)
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||
-endif()
|
||||
-
|
||||
# Default absolute paths
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "/etc")
|
||||
@@ -0,0 +1,84 @@
|
||||
[Autologin]
|
||||
# Autologin again on session exit
|
||||
Relogin=false
|
||||
|
||||
# Autologin session
|
||||
Session=plasma.desktop
|
||||
|
||||
# Autologin user
|
||||
User=
|
||||
|
||||
|
||||
[General]
|
||||
# Halt command
|
||||
HaltCommand=/sbin/shutdown -h -P now
|
||||
|
||||
# Initial NumLock state
|
||||
# Valid values: on|off|none
|
||||
# If property is set to none, numlock won't be changed
|
||||
Numlock=none
|
||||
|
||||
# Reboot command
|
||||
RebootCommand=/sbin/shutdown -r now
|
||||
|
||||
|
||||
[Theme]
|
||||
# Current theme name
|
||||
Current=maia
|
||||
|
||||
# Cursor theme
|
||||
CursorTheme=breeze
|
||||
|
||||
# Face icon directory
|
||||
# The files should be in username.face.icon format
|
||||
FacesDir=/usr/share/sddm/faces
|
||||
|
||||
# Theme directory path
|
||||
ThemeDir=/usr/share/sddm/themes
|
||||
|
||||
|
||||
[Users]
|
||||
# Default $PATH
|
||||
DefaultPath=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
|
||||
|
||||
# Hidden shells
|
||||
# Users with these shells as their default won't be listed
|
||||
HideShells=
|
||||
|
||||
# Hidden users
|
||||
HideUsers=git,sddm
|
||||
|
||||
# Maximum user id for displayed users
|
||||
MaximumUid=65000
|
||||
|
||||
# Minimum user id for displayed users
|
||||
MinimumUid=1000
|
||||
|
||||
# Remember the session of the last successfully logged in user
|
||||
RememberLastSession=true
|
||||
|
||||
# Remember the last successfully logged in user
|
||||
RememberLastUser=true
|
||||
|
||||
|
||||
[XDisplay]
|
||||
# Xsetup script path
|
||||
# A script to execute when starting the display server
|
||||
DisplayCommand=/usr/share/sddm/scripts/Xsetup
|
||||
|
||||
# Minimum VT
|
||||
# The lowest virtual terminal number that will be used.
|
||||
MinimumVT=7
|
||||
|
||||
# X server path
|
||||
ServerPath=/usr/bin/X
|
||||
|
||||
# Xsession script path
|
||||
# A script to execute when starting the desktop session
|
||||
SessionCommand=/usr/share/sddm/scripts/Xsession
|
||||
|
||||
# Session description directory
|
||||
SessionDir=/usr/share/xsessions
|
||||
|
||||
# Xauth path
|
||||
XauthPath=/usr/bin/xauth
|
||||
@@ -0,0 +1,746 @@
|
||||
diff -Nuar sddm-0.11.0/ChangeLog sddm-master/ChangeLog
|
||||
--- sddm-0.11.0/ChangeLog 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/ChangeLog 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -4,6 +4,10 @@
|
||||
- Bug fixes
|
||||
* Others
|
||||
|
||||
+## 0.12.0 - XXXX-XX-XX
|
||||
+----------------------
|
||||
+ * Add Arabic translation by Safa Alfulaij.
|
||||
+
|
||||
## 0.11.0 - 2014-11-20
|
||||
----------------------
|
||||
+ Reload the configuration every time we start a new session
|
||||
@@ -15,7 +19,6 @@
|
||||
|
||||
## 0.10.0 - 2014-10-16
|
||||
----------------------
|
||||
-
|
||||
+ Set default icon theme from greeter theme configuration.
|
||||
+ Set cursor theme according to greeter theme configuration.
|
||||
- Never permit a login as the sddm user (CVE-2014-7271)
|
||||
diff -Nuar sddm-0.11.0/CMakeLists.txt sddm-master/CMakeLists.txt
|
||||
--- sddm-0.11.0/CMakeLists.txt 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/CMakeLists.txt 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -77,7 +77,9 @@
|
||||
|
||||
# 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)
|
||||
@@ -98,7 +100,12 @@
|
||||
add_definitions(-DHAVE_SYSTEMD)
|
||||
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_SYSTEMD)
|
||||
|
||||
- pkg_check_modules(JOURNALD "libsystemd-journal")
|
||||
+ # libsystemd-journal was merged into libsystemd in 209
|
||||
+ if(${SYSTEMD_VERSION} VERSION_LESS 209)
|
||||
+ pkg_check_modules(JOURNALD "libsystemd-journal")
|
||||
+ else()
|
||||
+ pkg_check_modules(JOURNALD "libsystemd")
|
||||
+ endif()
|
||||
|
||||
if(ENABLE_JOURNALD)
|
||||
if(JOURNALD_FOUND)
|
||||
@@ -109,8 +116,11 @@
|
||||
endif()
|
||||
endif()
|
||||
|
||||
- execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=systemdsystemunitdir systemd OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_DIR)
|
||||
- string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_DIR ${SYSTEMD_SYSTEM_UNIT_DIR})
|
||||
+ if (NOT DEFINED SYSTEMD_SYSTEM_UNIT_DIR)
|
||||
+ execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=systemdsystemunitdir systemd OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_DIR)
|
||||
+ string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_DIR ${SYSTEMD_SYSTEM_UNIT_DIR})
|
||||
+ endif()
|
||||
+
|
||||
set(MINIMUM_VT 1)
|
||||
set(HALT_COMMAND "/usr/bin/systemctl poweroff")
|
||||
set(REBOOT_COMMAND "/usr/bin/systemctl reboot")
|
||||
diff -Nuar sddm-0.11.0/CONTRIBUTORS sddm-master/CONTRIBUTORS
|
||||
--- sddm-0.11.0/CONTRIBUTORS 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/CONTRIBUTORS 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -43,3 +43,4 @@
|
||||
a.k.a. Harvey <teknocratdefunct@riseup.net>
|
||||
raffarti <raffarti@zoho.com>
|
||||
w41l <walecha99@gmail.com>
|
||||
+Sérgio Marques <smarquespt@gmail.com>
|
||||
diff -Nuar sddm-0.11.0/data/man/sddm.conf.rst.in sddm-master/data/man/sddm.conf.rst.in
|
||||
--- sddm-0.11.0/data/man/sddm.conf.rst.in 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/man/sddm.conf.rst.in 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -65,6 +65,10 @@
|
||||
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".
|
||||
@@ -104,11 +108,11 @@
|
||||
Default value is 65000.
|
||||
|
||||
`HideUsers=`
|
||||
- Users that shouldn't show up in the user list.
|
||||
+ Comma-separated list of Users that shouldn't show up in the user list.
|
||||
Default value is empty.
|
||||
|
||||
`HideShells=`
|
||||
- Shells of users that shouldn't show up in the user list.
|
||||
+ Comma-separated list of Shells of users that shouldn't show up in the user list.
|
||||
Default value is empty.
|
||||
|
||||
`RememberLastUser=`
|
||||
diff -Nuar sddm-0.11.0/data/man/sddm.rst.in sddm-master/data/man/sddm.rst.in
|
||||
--- sddm-0.11.0/data/man/sddm.rst.in 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/man/sddm.rst.in 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -25,9 +25,9 @@
|
||||
easily create pleasant, modern looking interfaces for sddm.
|
||||
|
||||
sddm runs the greeter as a system user named **sddm**
|
||||
-whose home directory need to be set to **/var/lib/sddm**.
|
||||
+whose home directory needs to be set to **/var/lib/sddm**.
|
||||
|
||||
-If pam and systemd are available, the greeter will go through logind
|
||||
+If pam and systemd are available, the greeter will go through logind,
|
||||
which will give it access to drm devices.
|
||||
|
||||
Distributions without pam and systemd will need to put the **sddm** user
|
||||
diff -Nuar sddm-0.11.0/data/scripts/Xsession sddm-master/data/scripts/Xsession
|
||||
--- sddm-0.11.0/data/scripts/Xsession 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/scripts/Xsession 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -20,9 +20,8 @@
|
||||
. $HOME/.profile
|
||||
fi
|
||||
;;
|
||||
- */zsh)
|
||||
+*/zsh)
|
||||
[ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
|
||||
- emulate -R sh
|
||||
[ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
|
||||
zhome=${ZDOTDIR:-$HOME}
|
||||
# zshenv is always sourced automatically.
|
||||
@@ -30,6 +29,7 @@
|
||||
[ -f $zhome/.zprofile ] && . $zhome/.zprofile
|
||||
[ -f $zdir/zlogin ] && . $zdir/zlogin
|
||||
[ -f $zhome/.zlogin ] && . $zhome/.zlogin
|
||||
+ emulate -R sh
|
||||
;;
|
||||
*/csh|*/tcsh)
|
||||
# [t]cshrc is always sourced automatically.
|
||||
diff -Nuar sddm-0.11.0/data/translations/ar.ts sddm-master/data/translations/ar.ts
|
||||
--- sddm-0.11.0/data/translations/ar.ts 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ sddm-master/data/translations/ar.ts 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -0,0 +1,59 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!DOCTYPE TS>
|
||||
+<TS version="2.1" language="ar">
|
||||
+<context>
|
||||
+ <name>TextConstants</name>
|
||||
+ <message>
|
||||
+ <source>Welcome to %1</source>
|
||||
+ <translation>مرحبًا في %1</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Warning, Caps Lock is ON!</source>
|
||||
+ <translation>تحذير، مفتاح Caps Lock ممكّن!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Layout</source>
|
||||
+ <translation>التّخطيط</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Login</source>
|
||||
+ <translation>لِج</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Login failed</source>
|
||||
+ <translation>فشل الولوج</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Login succeeded</source>
|
||||
+ <translation>نجح الولوج</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Password</source>
|
||||
+ <translation>كلمة المرور</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Enter your username and password</source>
|
||||
+ <translation>أدخِل اسم المستخدم وكلمة مروره</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Reboot</source>
|
||||
+ <translation>أعد الإقلاع</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Session</source>
|
||||
+ <translation>الجلسة</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Shutdown</source>
|
||||
+ <translation>أطفئ</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>User name</source>
|
||||
+ <translation>اسم المستخدم</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Select your user and enter password</source>
|
||||
+ <translation>اختر مستخدمًا وأدخِل كلمة مروره</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+</TS>
|
||||
diff -Nuar sddm-0.11.0/data/translations/CMakeLists.txt sddm-master/data/translations/CMakeLists.txt
|
||||
--- sddm-0.11.0/data/translations/CMakeLists.txt 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/translations/CMakeLists.txt 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -1,9 +1,11 @@
|
||||
set(TRANSLATION_FILES
|
||||
+ ar.ts
|
||||
cs.ts
|
||||
de.ts
|
||||
et.ts
|
||||
fi.ts
|
||||
fr.ts
|
||||
+ hu.ts
|
||||
it.ts
|
||||
ja.ts
|
||||
pl.ts
|
||||
diff -Nuar sddm-0.11.0/data/translations/hu.ts sddm-master/data/translations/hu.ts
|
||||
--- sddm-0.11.0/data/translations/hu.ts 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ sddm-master/data/translations/hu.ts 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -0,0 +1,59 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!DOCTYPE TS>
|
||||
+<TS version="2.1" language="hu">
|
||||
+<context>
|
||||
+ <name>TextConstants</name>
|
||||
+ <message>
|
||||
+ <source>Welcome to %1</source>
|
||||
+ <translation>Üdvözöljük - %1</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Warning, Caps Lock is ON!</source>
|
||||
+ <translation>Figyelem: a Caps Lock BE van kapcsolva!</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Layout</source>
|
||||
+ <translation>Nézet</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Login</source>
|
||||
+ <translation>Bejelentkezés</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Login failed</source>
|
||||
+ <translation>Bejelentkezés sikertelen</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Login succeeded</source>
|
||||
+ <translation>Sikeres bejelentkezés</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Password</source>
|
||||
+ <translation>Jelszó</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Enter your username and password</source>
|
||||
+ <translation>Írja be a felhasználónevét és a jelszavát</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Reboot</source>
|
||||
+ <translation>Újraindítás</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Session</source>
|
||||
+ <translation>Munkamenet</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Shutdown</source>
|
||||
+ <translation>Leállítás</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>User name</source>
|
||||
+ <translation>Felhasználónév</translation>
|
||||
+ </message>
|
||||
+ <message>
|
||||
+ <source>Select your user and enter password</source>
|
||||
+ <translation>Válassza ki a felhasználónevét és írja be a jelszavát</translation>
|
||||
+ </message>
|
||||
+</context>
|
||||
+</TS>
|
||||
diff -Nuar sddm-0.11.0/data/translations/it.ts sddm-master/data/translations/it.ts
|
||||
--- sddm-0.11.0/data/translations/it.ts 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/translations/it.ts 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Login failed</source>
|
||||
- <translation>Accesso fallito</translation>
|
||||
+ <translation>Accesso non riuscito</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Login succeeded</source>
|
||||
diff -Nuar sddm-0.11.0/data/translations/pt_PT.ts sddm-master/data/translations/pt_PT.ts
|
||||
--- sddm-0.11.0/data/translations/pt_PT.ts 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/translations/pt_PT.ts 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -5,11 +5,11 @@
|
||||
<name>TextConstants</name>
|
||||
<message>
|
||||
<source>Welcome to %1</source>
|
||||
- <translation>Bem-vindo a %1</translation>
|
||||
+ <translation>Bem-vindo ao %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning, Caps Lock is ON!</source>
|
||||
- <translation>Atenção, Caps Lock está ligada!</translation>
|
||||
+ <translation>Atenção, Caps Lock está ativo!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Layout</source>
|
||||
@@ -17,15 +17,15 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Login</source>
|
||||
- <translation>Sessão</translation>
|
||||
+ <translation>Autenticação</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Login failed</source>
|
||||
- <translation>A autenticação falhou</translation>
|
||||
+ <translation>Falha de autenticação</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Login succeeded</source>
|
||||
- <translation>Autentificação com sucesso</translation>
|
||||
+ <translation>Autenticação efetuada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Password</source>
|
||||
@@ -33,7 +33,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter your username and password</source>
|
||||
- <translation>Escreva o seu nome de utilizador e senha</translation>
|
||||
+ <translation>Escreva o seu nome de utilizador e a senha</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reboot</source>
|
||||
diff -Nuar sddm-0.11.0/data/translations/tr.ts sddm-master/data/translations/tr.ts
|
||||
--- sddm-0.11.0/data/translations/tr.ts 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/data/translations/tr.ts 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
<name>TextConstants</name>
|
||||
<message>
|
||||
<source>Welcome to %1</source>
|
||||
- <translation>Hoşgeldiniz (%1)</translation>
|
||||
+ <translation>Hoş Geldiniz (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Warning, Caps Lock is ON!</source>
|
||||
@@ -29,11 +29,11 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Password</source>
|
||||
- <translation>Şifre</translation>
|
||||
+ <translation>Parola</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter your username and password</source>
|
||||
- <translation>Kullanıcı adınızı ve şifrenizi giriniz</translation>
|
||||
+ <translation>Kullanıcı adınızı ve parolanızı giriniz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reboot</source>
|
||||
@@ -53,7 +53,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>Select your user and enter password</source>
|
||||
- <translation>Kullanıcınızı seçiniz ve şifrenizi giriniz</translation>
|
||||
+ <translation>Kullanıcınızı seçiniz ve parolanızı giriniz</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
diff -Nuar sddm-0.11.0/README.md sddm-master/README.md
|
||||
--- sddm-0.11.0/README.md 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/README.md 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[](https://travis-ci.org/sddm/sddm)
|
||||
|
||||
-SDDM is a modern display manager for X11 aiming to be fast, simple and beatiful. It uses modern technologies like QtQuick, which in turn gives the designer the ability to create smooth, animated user interfaces.
|
||||
+SDDM is a modern display manager for X11 aiming to be fast, simple and beautiful. It uses modern technologies like QtQuick, which in turn gives the designer the ability to create smooth, animated user interfaces.
|
||||
|
||||
SDDM is extremely themeable. We put no restrictions on the user interface design, it is completely up to the designer. We simply provide a few callbacks to the user interface which can be used for authentication, suspend etc. To further ease theme creation we provide some premade components like a textbox, a combox etc.
|
||||
|
||||
diff -Nuar sddm-0.11.0/src/common/Configuration.h sddm-master/src/common/Configuration.h
|
||||
--- sddm-0.11.0/src/common/Configuration.h 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/common/Configuration.h 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -54,6 +54,7 @@
|
||||
// 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 -Nuar sddm-0.11.0/src/daemon/Display.cpp sddm-master/src/daemon/Display.cpp
|
||||
--- sddm-0.11.0/src/daemon/Display.cpp 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/Display.cpp 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -40,8 +40,8 @@
|
||||
#include <unistd.h>
|
||||
|
||||
namespace SDDM {
|
||||
- Display::Display(const int displayId, const int terminalId, Seat *parent) : QObject(parent),
|
||||
- m_displayId(displayId), m_terminalId(terminalId),
|
||||
+ Display::Display(const int terminalId, Seat *parent) : QObject(parent),
|
||||
+ m_terminalId(terminalId),
|
||||
m_auth(new Auth(this)),
|
||||
m_displayServer(new XorgDisplayServer(this)),
|
||||
m_seat(parent),
|
||||
@@ -73,8 +73,8 @@
|
||||
stop();
|
||||
}
|
||||
|
||||
- const int Display::displayId() const {
|
||||
- return m_displayId;
|
||||
+ QString Display::displayId() const {
|
||||
+ return m_displayServer->display();
|
||||
}
|
||||
|
||||
const int Display::terminalId() const {
|
||||
diff -Nuar sddm-0.11.0/src/daemon/Display.h sddm-master/src/daemon/Display.h
|
||||
--- sddm-0.11.0/src/daemon/Display.h 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/Display.h 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -39,10 +39,10 @@
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Display)
|
||||
public:
|
||||
- explicit Display(const int displayId, const int terminalId, Seat *parent);
|
||||
+ explicit Display(int terminalId, Seat *parent);
|
||||
~Display();
|
||||
|
||||
- const int displayId() const;
|
||||
+ QString displayId() const;
|
||||
const int terminalId() const;
|
||||
|
||||
const QString &name() const;
|
||||
@@ -71,7 +71,6 @@
|
||||
bool m_relogin { true };
|
||||
bool m_started { false };
|
||||
|
||||
- int m_displayId { 0 };
|
||||
int m_terminalId { 7 };
|
||||
|
||||
QString m_passPhrase;
|
||||
diff -Nuar sddm-0.11.0/src/daemon/Seat.cpp sddm-master/src/daemon/Seat.cpp
|
||||
--- sddm-0.11.0/src/daemon/Seat.cpp 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/Seat.cpp 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -51,36 +51,25 @@
|
||||
return m_name;
|
||||
}
|
||||
|
||||
- void Seat::createDisplay(int displayId, int terminalId) {
|
||||
+ void Seat::createDisplay(int terminalId) {
|
||||
//reload config if needed
|
||||
mainConfig.load();
|
||||
|
||||
- if (displayId == -1) {
|
||||
- // find unused display
|
||||
- displayId = findUnused(0, [&](const int number) {
|
||||
- bool alreadyExists = m_displayIds.contains(number);
|
||||
- if (!alreadyExists)
|
||||
- alreadyExists = XorgDisplayServer::displayExists(number);
|
||||
- return alreadyExists;
|
||||
- });
|
||||
-
|
||||
- // find unused terminal
|
||||
+ if (terminalId == -1) {
|
||||
+ // find unused terminal
|
||||
terminalId = findUnused(mainConfig.XDisplay.MinimumVT.get(), [&](const int number) {
|
||||
return m_terminalIds.contains(number);
|
||||
});
|
||||
}
|
||||
|
||||
- // mark display as used
|
||||
- m_displayIds << displayId;
|
||||
-
|
||||
// mark terminal as used
|
||||
m_terminalIds << terminalId;
|
||||
|
||||
// log message
|
||||
- qDebug() << "Adding new display" << displayId << "on vt" << terminalId << "...";
|
||||
+ qDebug() << "Adding new display" << "on vt" << terminalId << "...";
|
||||
|
||||
// create a new display
|
||||
- Display *display = new Display(displayId, terminalId, this);
|
||||
+ Display *display = new Display(terminalId, this);
|
||||
|
||||
// restart display on stop
|
||||
connect(display, SIGNAL(stopped()), this, SLOT(displayStopped()));
|
||||
@@ -92,26 +81,14 @@
|
||||
display->start();
|
||||
}
|
||||
|
||||
- void Seat::removeDisplay(int displayId) {
|
||||
- qDebug() << "Removing display" << displayId << "...";
|
||||
-
|
||||
- // display object
|
||||
- Display *display = nullptr;
|
||||
+ void Seat::removeDisplay(Display* display) {
|
||||
+ qDebug() << "Removing display" << display->displayId() << "...";
|
||||
|
||||
- // find display
|
||||
- for (Display *d: m_displays)
|
||||
- if (d->displayId() == displayId)
|
||||
- display = d;
|
||||
-
|
||||
- // check if found
|
||||
- if (display == nullptr)
|
||||
- return;
|
||||
|
||||
// remove display from list
|
||||
m_displays.removeAll(display);
|
||||
|
||||
// mark display and terminal ids as unused
|
||||
- m_displayIds.removeAll(display->displayId());
|
||||
m_terminalIds.removeAll(display->terminalId());
|
||||
|
||||
// stop the display
|
||||
@@ -127,7 +104,7 @@
|
||||
Display *display = qobject_cast<Display *>(sender());
|
||||
|
||||
// remove display
|
||||
- removeDisplay(display->displayId());
|
||||
+ removeDisplay(display);
|
||||
|
||||
// restart otherwise
|
||||
if (m_displays.isEmpty())
|
||||
diff -Nuar sddm-0.11.0/src/daemon/Seat.h sddm-master/src/daemon/Seat.h
|
||||
--- sddm-0.11.0/src/daemon/Seat.h 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/Seat.h 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -34,8 +34,8 @@
|
||||
const QString &name() const;
|
||||
|
||||
public slots:
|
||||
- void createDisplay(int displayId = -1, int terminalId = -1);
|
||||
- void removeDisplay(int displayId);
|
||||
+ void createDisplay(int terminalId = -1);
|
||||
+ void removeDisplay(SDDM::Display* display);
|
||||
|
||||
private slots:
|
||||
void displayStopped();
|
||||
@@ -45,7 +45,6 @@
|
||||
|
||||
QList<Display *> m_displays;
|
||||
QList<int> m_terminalIds;
|
||||
- QList<int> m_displayIds;
|
||||
};
|
||||
}
|
||||
|
||||
diff -Nuar sddm-0.11.0/src/daemon/Utils.h sddm-master/src/daemon/Utils.h
|
||||
--- sddm-0.11.0/src/daemon/Utils.h 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/Utils.h 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef SDDM_UTILS_H
|
||||
#define SDDM_UTILS_H
|
||||
|
||||
+#include <random>
|
||||
+
|
||||
namespace SDDM {
|
||||
|
||||
inline QString generateName(int length) {
|
||||
diff -Nuar sddm-0.11.0/src/daemon/XorgDisplayServer.cpp sddm-master/src/daemon/XorgDisplayServer.cpp
|
||||
--- sddm-0.11.0/src/daemon/XorgDisplayServer.cpp 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/XorgDisplayServer.cpp 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QProcess>
|
||||
+#include <QUuid>
|
||||
+
|
||||
+#include <random>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
@@ -36,9 +39,6 @@
|
||||
|
||||
namespace SDDM {
|
||||
XorgDisplayServer::XorgDisplayServer(Display *parent) : DisplayServer(parent) {
|
||||
- // figure out the X11 display
|
||||
- m_display = QString(":%1").arg(displayPtr()->displayId());
|
||||
-
|
||||
// get auth directory
|
||||
QString authDir = RUNTIME_DIR;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
QDir().mkpath(authDir);
|
||||
|
||||
// set auth path
|
||||
- m_authPath = QString("%1/%2").arg(authDir).arg(m_display);
|
||||
+ m_authPath = QString("%1/%2").arg(authDir).arg(QUuid::createUuid().toString());
|
||||
|
||||
// generate cookie
|
||||
std::random_device rd;
|
||||
@@ -70,10 +70,6 @@
|
||||
stop();
|
||||
}
|
||||
|
||||
- bool XorgDisplayServer::displayExists(int number) {
|
||||
- return QFile(QString("/tmp/.X%1-lock").arg(number)).exists();
|
||||
- }
|
||||
-
|
||||
const QString &XorgDisplayServer::display() const {
|
||||
return m_display;
|
||||
}
|
||||
@@ -136,44 +132,72 @@
|
||||
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);
|
||||
+
|
||||
+
|
||||
+ // wait for display server to start
|
||||
+ if (!process->waitForStarted()) {
|
||||
+ // log message
|
||||
+ qCritical() << "Failed to start display server process.";
|
||||
+
|
||||
+ // return fail
|
||||
+ return false;
|
||||
+ }
|
||||
+ emit started();
|
||||
} else {
|
||||
// set process environment
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
- env.insert("DISPLAY", m_display);
|
||||
- env.insert("XAUTHORITY", m_authPath);
|
||||
env.insert("XCURSOR_THEME", mainConfig.Theme.CursorTheme.get());
|
||||
process->setProcessEnvironment(env);
|
||||
|
||||
- // tell the display server to notify us when we can connect
|
||||
- SignalHandler::ignoreSigusr1();
|
||||
+ //create pipe for communicating with X server
|
||||
+ //0 == read from X, 1== write to from X
|
||||
+ int pipeFds[2];
|
||||
+ if (pipe(pipeFds) != 0) {
|
||||
+ qCritical("Could not create pipe to start X server");
|
||||
+ }
|
||||
|
||||
// start display server
|
||||
QStringList args;
|
||||
- args << m_display
|
||||
- << "-auth" << m_authPath
|
||||
+ args << "-auth" << m_authPath
|
||||
<< "-nolisten" << "tcp"
|
||||
<< "-background" << "none"
|
||||
<< "-noreset"
|
||||
+ << "-displayfd" << QString::number(pipeFds[1])
|
||||
<< QString("vt%1").arg(displayPtr()->terminalId());
|
||||
qDebug() << "Running:"
|
||||
<< qPrintable(mainConfig.XDisplay.ServerPath.get())
|
||||
<< qPrintable(args.join(" "));
|
||||
process->start(mainConfig.XDisplay.ServerPath.get(), args);
|
||||
- SignalHandler::initializeSigusr1();
|
||||
- connect(DaemonApp::instance()->signalHandler(), SIGNAL(sigusr1Received()), this, SIGNAL(started()));
|
||||
- }
|
||||
|
||||
- // wait for display server to start
|
||||
- if (!process->waitForStarted()) {
|
||||
- // log message
|
||||
- qCritical() << "Failed to start display server process.";
|
||||
+ // wait for display server to start
|
||||
+ if (!process->waitForStarted()) {
|
||||
+ // log message
|
||||
+ qCritical() << "Failed to start display server process.";
|
||||
+
|
||||
+ // return fail
|
||||
+ close(pipeFds[0]);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ QFile readPipe;
|
||||
+
|
||||
+ if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
|
||||
+ qCritical("Failed to open pipe to start X Server ");
|
||||
+
|
||||
+ close(pipeFds[0]);
|
||||
+ return false;
|
||||
+ }
|
||||
+ QByteArray displayNumber = readPipe.readLine();
|
||||
+ displayNumber.prepend(QByteArray(":"));
|
||||
+ displayNumber.remove(displayNumber.size() -1, 1); //trim trailing whitespace
|
||||
+ m_display= displayNumber;
|
||||
+
|
||||
+ // close our pipe
|
||||
+ close(pipeFds[0]);
|
||||
|
||||
- // return fail
|
||||
- return false;
|
||||
- }
|
||||
- if (daemonApp->testing())
|
||||
emit started();
|
||||
+ }
|
||||
|
||||
// set flag
|
||||
m_started = true;
|
||||
diff -Nuar sddm-0.11.0/src/daemon/XorgDisplayServer.h sddm-master/src/daemon/XorgDisplayServer.h
|
||||
--- sddm-0.11.0/src/daemon/XorgDisplayServer.h 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/daemon/XorgDisplayServer.h 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -33,8 +33,6 @@
|
||||
explicit XorgDisplayServer(Display *parent);
|
||||
~XorgDisplayServer();
|
||||
|
||||
- static bool displayExists(int number);
|
||||
-
|
||||
const QString &display() const;
|
||||
const QString &authPath() const;
|
||||
|
||||
diff -Nuar sddm-0.11.0/src/greeter/SessionModel.cpp sddm-master/src/greeter/SessionModel.cpp
|
||||
--- sddm-0.11.0/src/greeter/SessionModel.cpp 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/greeter/SessionModel.cpp 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -57,6 +57,7 @@
|
||||
continue;
|
||||
SessionPtr si { new Session { session, "", "", "" } };
|
||||
QTextStream in(&inputFile);
|
||||
+ bool execAllowed = true;
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine();
|
||||
if (line.startsWith("Name="))
|
||||
@@ -65,9 +66,15 @@
|
||||
si->exec = line.mid(5);
|
||||
if (line.startsWith("Comment="))
|
||||
si->comment = line.mid(8);
|
||||
+ if (line.startsWith("TryExec=")) {
|
||||
+ QFileInfo fi(line.mid(8));
|
||||
+ if (!fi.exists() || !fi.isExecutable())
|
||||
+ execAllowed = false;
|
||||
+ }
|
||||
}
|
||||
// add to sessions list
|
||||
- d->sessions.push_back(si);
|
||||
+ if (execAllowed)
|
||||
+ d->sessions.push_back(si);
|
||||
// close file
|
||||
inputFile.close();
|
||||
}
|
||||
diff -Nuar sddm-0.11.0/src/helper/backend/PamBackend.cpp sddm-master/src/helper/backend/PamBackend.cpp
|
||||
--- sddm-0.11.0/src/helper/backend/PamBackend.cpp 2014-11-20 17:47:24.000000000 +0200
|
||||
+++ sddm-master/src/helper/backend/PamBackend.cpp 2015-03-08 18:18:48.000000000 +0200
|
||||
@@ -251,7 +251,9 @@
|
||||
QProcessEnvironment sessionEnv = m_app->session()->processEnvironment();
|
||||
QString display = sessionEnv.value("DISPLAY");
|
||||
if (!display.isEmpty()) {
|
||||
+#ifdef PAM_XDISPLAY
|
||||
m_pam->setItem(PAM_XDISPLAY, qPrintable(display));
|
||||
+#endif
|
||||
m_pam->setItem(PAM_TTY, qPrintable(display));
|
||||
}
|
||||
if (!m_pam->putEnv(sessionEnv)) {
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>sddm</Name>
|
||||
<Homepage>https://github.com/sddm/sddm</Homepage>
|
||||
<Packager>
|
||||
<Name>Pisi Linux Admins</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>LGPLv2</License>
|
||||
<IsA>library</IsA>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>QML based X11 display manager</Summary>
|
||||
<Description>KDE Power Management module. Provides kded daemon DBus helper and KCM for configuring Power settings</Description>
|
||||
<Archive sha1sum="ee92a2b27602c13d6ac5cfd34399192a31ca033c" type="tarxz">https://github.com/sddm/sddm/releases/download/v0.14.0/sddm-0.14.0.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>qt5-base-devel</Dependency>
|
||||
<Dependency>qt5-linguist</Dependency>
|
||||
<Dependency>qt5-declarative-devel</Dependency>
|
||||
<Dependency>libxcb-devel</Dependency>
|
||||
<Dependency>libxkbfile-devel</Dependency>
|
||||
<Dependency>pam-devel</Dependency>
|
||||
<Dependency>extra-cmake-modules</Dependency>
|
||||
<Dependency>docutils</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>sddm-respect-user-flags.patch</Patch>
|
||||
<Patch>ecb903e4.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>sddm</Name>
|
||||
<Conflicts>
|
||||
<Package>lightdm</Package>
|
||||
<Package>lxdm</Package>
|
||||
<Package>mdm</Package>
|
||||
<Package>gdm</Package>
|
||||
<Package>slim</Package>
|
||||
</Conflicts>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>qt5-base</Dependency>
|
||||
<Dependency>qt5-declarative</Dependency>
|
||||
<Dependency>pam</Dependency>
|
||||
<Dependency>libgcc</Dependency>
|
||||
<Dependency>libxcb</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
<Path fileType="data">/usr/share</Path>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="library">/usr/lib/qt5</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/sddm.conf">sddm.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm">sddm</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm-autologin">sddm-autologin</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/polkit-1/rules.d/10-backlight.rules">10-backlight.rules</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
<COMAR script="package.py">System.Package</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="5">
|
||||
<Date>2016-10-06</Date>
|
||||
<Version>0.14.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Stefan Gronewold</Name>
|
||||
<Email>groni@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2016-09-07</Date>
|
||||
<Version>0.13.0</Version>
|
||||
<Comment>Add conflict list</Comment>
|
||||
<Name>Yusuf Aydemir</Name>
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="3">
|
||||
<Date>2016-08-14</Date>
|
||||
<Version>0.13.0</Version>
|
||||
<Comment>Rebuild</Comment>
|
||||
<Name>Yusuf Aydemir</Name>
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2016-07-15</Date>
|
||||
<Version>0.13.0</Version>
|
||||
<Comment>Fix session authorization issue and add rules</Comment>
|
||||
<Name>Yusuf Aydemir</Name>
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2015-11-18</Date>
|
||||
<Version>0.13.0</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Yusuf Aydemir</Name>
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>sddm</Name>
|
||||
<Summary xml:lang="en">QML based X11 display manager</Summary>
|
||||
<Summary xml:lang="tr">QML tabanlı X11 görüntü yöneticisi.</Summary>
|
||||
<Description xml:lang="en">KDE Power Management module. Provides kded daemon DBus helper and KCM for configuring Power settings</Description>
|
||||
</Source>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user