Hello community,
here is the log from the commit of package kdebase4-workspace.1678 for openSUSE:12.3:Update checked in at 2013-06-05 11:42:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/kdebase4-workspace.1678 (Old)
and /work/SRC/openSUSE:12.3:Update/.kdebase4-workspace.1678.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdebase4-workspace.1678"
Changes:
--------
New Changes file:
--- /dev/null 2013-05-23 01:40:31.032032505 +0200
+++ /work/SRC/openSUSE:12.3:Update/.kdebase4-workspace.1678.new/kdebase4-workspace.changes 2013-06-05 11:42:09.000000000 +0200
@@ -0,0 +1,2448 @@
+-------------------------------------------------------------------
+Mon May 13 21:18:18 UTC 2013 - tittiatcoke@gmail.com
+
+- Change the default path for the AuthFiles of KDM. Fixes
+ bnc#818792 in a proper way.
+
+-------------------------------------------------------------------
+Tue May 7 17:51:30 UTC 2013 - tittiatcoke@gmail.com
+
+- Add patch kdm-fix-greeteruid.patch from upstream to have the
+ proper greeterUID created.
+
+-------------------------------------------------------------------
+Sat May 4 16:51:03 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.10.3
+ * Bugfix release
+ * See http://www.kde.org/announcements/announce-4.10.3.php
+ * resolves bnc#818500
+- Dropped fix-plasma-theme-workaround-tabbox.patch, it's included in
+ this release
+
+-------------------------------------------------------------------
+Fri Apr 26 15:32:44 UTC 2013 - hrvoje.senjan@gmail.com
+
+- Remove plasma-notifications-kill-timer.diff, that was fix for
+ kde#230740, but it is commited upstream 3 years ago
+- Remove unused patches: kwin-suse.diff, kdm-audit-log.diff,
+ systemsettings-root-kcm.diff, pam-translate.diff and
+ kdm-suspend-hal.diff (which used HAL, but we migrated away from
+ it long ago)
+- Group patches wheter they are for KDM or Workspace components
+- Remove checks and obsoletes/provides for no longer supported versions
+- Fix rpmlint warnings: devel files shipping in the main package and
+ kdm missing logrotate dependency
+- Remove not needed kdesud %verify checks
+- Added %kde4_runtime_requires to ksysguard and plasma-calendar packages
+- Annotate existing patches where possible
+
+-------------------------------------------------------------------
+Wed Apr 17 20:24:37 UTC 2013 - hrvoje.senjan@gmail.com
+
+- Replace workspace_systemd_initial_support.patch with upstream
+ systemd-session-management-support-in-the-workspace.patch
+ This also makes build flag DKWORKSPACE_USE_SYSTEMD obsolete
+- Require kdebase4-artwork and kdebas4-wallpaper-default for upstream
+ branding, otherwise those packages provide the same files
+
+-------------------------------------------------------------------
+Wed Apr 10 13:45:58 UTC 2013 - mmeister@suse.com
+
+- Added url as source.
+ Please see http://en.opensuse.org/SourceUrls
+
+-------------------------------------------------------------------
+Mon Apr 1 19:15:48 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.10.2
+ * Bugfixes
+- Drop validate_systemd_version_for_upower.diff, it is pushed upstream
+
+-------------------------------------------------------------------
+Thu Mar 21 03:48:04 UTC 2013 - crrodriguez@opensuse.org
+
+- Add a native systemd unit for ksysguardd and exclude
+ the old init scripts for newer distros.
+
+-------------------------------------------------------------------
+Thu Mar 7 08:18:25 UTC 2013 - tittiatcoke@gmail.com
+
+- Add patch validate_systemd_version_for_upower.diff. this patch
+ checks if the version of systemd supports suspend/hibernate and
+ resolves the current issue on openSUSE 12.2
+
+-------------------------------------------------------------------
+Mon Mar 4 19:07:24 UTC 2013 - wbauer@tmo.at
+
+- changed plasma-kickoff-newly-collapsing.diff:
+ * use KService ptr instead of name for specialTitle map, so it
+ still works correctly when there are entries with equal names
+ (bnc#807301)
+
+-------------------------------------------------------------------
+Sat Mar 2 15:33:10 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.10.1
+ * Contains bug fixes. See http://www.kde.org/announcements/
+ for more information
+- Drop plasma_expire_suse_paste.diff, powerdevil-logind.patch and
+ respect_screenlock_settings.diff, all applied upstream
+
+-------------------------------------------------------------------
+Thu Feb 28 16:03:32 UTC 2013 - wbauer@tmo.at
+
+- Change default Bootmanager to "Grub2" in kdmrc (bnc#788867)
+
+-------------------------------------------------------------------
+Thu Feb 28 04:06:11 UTC 2013 - crrodriguez@opensuse.org
+
+- Add powerdevil-logind.patch, allows powerdevil to
+ interact properly with systemd-logind
+ (https://git.reviewboard.kde.org/r/108407)
+
+-------------------------------------------------------------------
+Thu Feb 21 19:16:49 UTC 2013 - hrvoje.senjan@gmail.com
+
+- Added GLU buildrequires, needed for KInfoCenter
+
+-------------------------------------------------------------------
+Wed Feb 13 22:31:49 UTC 2013 - hrvoje.senjan@gmail.com
+
+- Added fix-plasma-theme-workaround-tabbox.patch, fixes kde#315064
+
+-------------------------------------------------------------------
+Tue Feb 12 18:03:37 UTC 2013 - ctrippe@opensuse.org
+
+- Added plasma_expire_suse_paste.diff (fixes bnc#803384)
+
+-------------------------------------------------------------------
+Mon Feb 11 20:54:07 UTC 2013 - hrvoje.senjan@gmail.com
+
+- Added pager.diff, fixes bnc#799875
+
+-------------------------------------------------------------------
+Mon Feb 11 19:19:52 UTC 2013 - wbauer@tmo.at
+
+- changed plasma-kickoff-newly-collapsing.diff:
+ * sort entries by genericName if "Show applications by name"
+ is switched off (bnc#803179)
+
+-------------------------------------------------------------------
+Mon Feb 11 18:05:48 UTC 2013 - tittiatcoke@gmail.com
+
+- Added upstream patch respect_screenlock_settings.diff. This would
+ allow again the old behavior of the screensaver and the new
+ screenlocker respects now all the settings (e.g. no password,
+ etc) (bnc#802704)
+
+-------------------------------------------------------------------
+Mon Feb 11 16:44:43 UTC 2013 - wstephenson@suse.com
+
+- Remove the kio-mtp package, moved to KDE4-DESKTOP pattern instead
+
+-------------------------------------------------------------------
+Sat Feb 9 19:08:16 UTC 2013 - tittiatcoke@gmail.com
+
+- Recommend the kio-mtp package so that solid can communicate
+ with Android phones (bnc#765051)
+
+-------------------------------------------------------------------
+Thu Feb 7 19:55:07 UTC 2013 - tittiatcoke@gmail.com
+
+- Remove patch 0001-Tweak-the-locker-wallpaper.patch. The patch
+ causes strange borders when the screen has a different
+ screen ratio than the wallpaper.
+
+-------------------------------------------------------------------
+Thu Feb 7 19:00:15 UTC 2013 - wbauer@tmo.at
+
+- changed plasma-kickoff-newly-collapsing.diff:
+ * add ":F" to the sortOrder list if it isn't included to make sure
+ collapsed entries are really shown (bnc#356553)
+
+-------------------------------------------------------------------
+Thu Feb 7 12:53:33 UTC 2013 - tittiatcoke@gmail.com
+
+- BuildRequire kdebase4-wallpapers so that the 4.10 default wallpaper
+ can be provided with the branding-upstream package
+- BuildRequire kdebase4-artwork so that the 4.10 default ksplash
+ theme can be provided with the branding-upstream package
+
+-------------------------------------------------------------------
+Mon Feb 4 13:22:25 UTC 2013 - hrvoje.senjan@gmail.com
+
+- Add 0001-Tweak-the-locker-wallpaper.patch, to fix locker's
+ wallpaper rendering
+
+-------------------------------------------------------------------
+Thu Jan 31 17:43:25 UTC 2013 - tittiatcoke@gmail.com
+
+- Update to 4.10.0
+ * This is the final release for 4.10. Contains bugfixes
+
+-------------------------------------------------------------------
+Thu Jan 31 12:07:28 UTC 2013 - wbauer@tmo.at
+
+- changed plasma-kickoff-newly-collapsing.diff:
+ * in config dialog: connect added options to settingsModified()
+ slot so that "Apply" button gets activated when they are changed
+ by the user (bnc#801416)
+
+-------------------------------------------------------------------
+Fri Jan 25 18:09:03 UTC 2013 - ctrippe@opensuse.org
+
+- changed kdm-cope-with-new-grub.diff
+ * kdm: don't even look for grub-set-default, we won't need it
+ (bnc#771545)
++++ 2251 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.kdebase4-workspace.1678.new/kdebase4-workspace.changes
New:
----
baselibs.conf
dont-install-solid-netbackends.diff
kde-workspace-4.10.3.tar.xz
kde4-migrate.diff
kdebase4-workspace-rpmlintrc
kdebase4-workspace.changes
kdebase4-workspace.spec
kdm
kdm-all-users-nopass.diff
kdm-cope-with-new-grub.diff
kdm-dont-grab-mouse.diff
kdm-fix-generic-greeter.diff
kdm-fix-greeteruid.patch
kdm-fix-labelcolors.diff
kdm-kdmconf.diff
kdm-logrotate
kdm-long-xserver-timeout.diff
kdm-make_it_cool.diff
kdm-relaxed-auth.diff
kdm-remove-duplicated-sessions.diff
kdm-sysconfig-values.diff
kdm-wordbreak.diff
kdm_plymouth.patch
kdm_systemd_shutdown.patch
krunner-no-italics.diff
ksysguardd.service
kwin-cubecap.png
opensuse-homepage.diff
opensuse-kinfocenter.diff
pager.diff
plasma-branding-defaults-applets.diff
plasma-dashboard-leave.diff
plasma-disable-networkmanager.diff
plasma-kickoff-newly-collapsing.diff
plasma-panel-resize-hint.diff
rcksysguardd
rotate-wacom-pointers.diff
same-pam-generic-classic.diff
startkde.diff
storage.diff
sysconfig.displaymanager-kdm
systemd-session-management-support-in-the-workspace.patch
systemsettings-desktop.diff
titlebar_decor.png
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdebase4-workspace.spec ++++++
++++ 703 lines (skipped)
++++++ baselibs.conf ++++++
kdebase4-workspace-liboxygenstyle
++++++ dont-install-solid-netbackends.diff ++++++
Index: kde-workspace-4.8.1/solid/CMakeLists.txt
===================================================================
--- kde-workspace-4.8.1.orig/solid/CMakeLists.txt
+++ kde-workspace-4.8.1/solid/CMakeLists.txt
@@ -13,7 +13,7 @@ set(HAVE_NETWORKMANAGER FALSE)
if(NETWORKMANAGER_FOUND)
if(${NETWORKMANAGER_VERSION} VERSION_GREATER "0.6.9999" AND
${NETWORKMANAGER_VERSION} VERSION_LESS "0.8.1001")
- message(STATUS "Will build networkmanager-0.7")
+ #message(STATUS "Will build networkmanager-0.7")
set(HAVE_NETWORKMANAGER TRUE)
add_subdirectory(networkmanager-0.7)
else()
@@ -21,7 +21,7 @@ if(NETWORKMANAGER_FOUND)
if (${NETWORKMANAGER_VERSION} VERSION_GREATER "0.8.999")
message(STATUS "Will build networkmanager_fake-0.9")
set(HAVE_NETWORKMANAGER TRUE)
- add_subdirectory(networkmanager_fake-0.9)
+ #add_subdirectory(networkmanager_fake-0.9)
endif ()
endif()
endif (NETWORKMANAGER_FOUND)
@@ -31,9 +31,9 @@ set(HAVE_MODEMMANAGER FALSE)
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
message(STATUS "Will build modemmanager-0.4")
set(HAVE_MODEMMANAGER TRUE)
- add_subdirectory(modemmanager-0.4)
+ #add_subdirectory(modemmanager-0.4)
endif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
if(NOT WIN32)
- macro_optional_add_subdirectory(wicd)
+ #macro_optional_add_subdirectory(wicd)
endif(NOT WIN32)
++++++ kde4-migrate.diff ++++++
Index: startkde.cmake
===================================================================
--- startkde.cmake.orig
+++ startkde.cmake
@@ -64,6 +64,11 @@ fi
kdehome=$HOME/@KDE_DEFAULT_HOME@
test -n "$KDEHOME" && kdehome=`echo "$KDEHOME"|sed "s,^~/,$HOME/,"`
+# first, migrate settings from kde3, if available
+if test -x /usr/bin/kde4-migrate; then
+ /usr/bin/kde4-migrate || true
+fi
+
# see kstartupconfig source for usage
mkdir -m 700 -p $kdehome
mkdir -m 700 -p $kdehome/share
++++++ kdebase4-workspace-rpmlintrc ++++++
addFilter("untranslated-desktop-file .*/usr/share/wallpapers/.*")
++++++ kdm ++++++
kdm_start_proc() {
splashcopy 0 6
return 0
}
kdm_vars() {
KDM4_BIN=/usr/bin/kdm
case "${DISPLAYMANAGER##*/}" in
kdm|kdm4|kde|KDM|KDE)
export KDEROOTHOME=/root/.kdm
DISPLAYMANAGER=$KDM4_BIN
STARTPROC=kdm_start_proc
;;
*) return 1 ;;
esac
return 0
}
++++++ kdm-all-users-nopass.diff ++++++
Index: kdm/backend/client.c
===================================================================
--- kdm/backend/client.c.orig
+++ kdm/backend/client.c
@@ -462,6 +462,9 @@ isNoPassAllowed(struct passwd *pw)
if (cursource != PWSRC_MANUAL)
return True;
+ if (td->noPassAllUsers)
+ return True;
+
#if defined(USE_PAM) || defined(_AIX)
/* Give nss_ldap, etc. a chance to normalize (uppercase) the name. */
if (!(pw = getpwnam(un)) ||
Index: kdm/config.def
===================================================================
--- kdm/config.def.orig
+++ kdm/config.def
@@ -1895,6 +1895,15 @@ Description:
(and any other user with UID = 0).
<emphasis>Never</emphasis> list <systemitem class="username">root</systemitem>.
+Key: NoPassAllUsers
+Type: bool
+Default: false
+User: core
+Instance: #:0/true
+Comment: &
+Description:
+ All users can login without password
+
Key: AutoLoginEnable
Type: bool
Default: false
++++++ kdm-cope-with-new-grub.diff ++++++
Index: kdm/backend/bootman.c
===================================================================
--- kdm/backend/bootman.c.orig
+++ kdm/backend/bootman.c
@@ -84,8 +84,7 @@ getGrub(char ***opts, int *def, int *cur
int len;
char line[1000];
- if (!grubSetDefault && !grub &&
- !(grubSetDefault = locate("grub-set-default")) &&
+ if (!grub &&
!(grub = locate("grub")))
return BO_NOMAN;
@@ -136,31 +135,10 @@ setGrub(const char *opt, SdRec *sdr)
static void
commitGrub(void)
{
- if (sdRec.bmstamp != mTime(GRUB_MENU) &&
- setGrub(sdRec.osname, &sdRec) != BO_OK)
- return;
-
- if (grubSetDefault) {
- /* The grub-set-default command must be used, which is
- * not so good because there is no way of setting an
- * entry for the next boot only. */
- char index[16];
- const char *args[] = { grubSetDefault, index, 0 };
- sprintf(index, "%d", sdRec.osindex);
- runAndWait((char **)args, environ);
- } else {
- /* The grub shell can be used with `savedefault'.
- * That requires a (widely distributed) patch to grub, e.g.
- * grub-0.97-once.patch. It won't work with a vanilla grub.*/
- FILE *f;
- int pid;
- static const char *args[] = { 0, "--batch", "--no-floppy", 0 };
- args[0] = grub;
- if ((f = pOpen((char **)args, 'w', &pid))) {
- fprintf(f, "savedefault --default=%d --once\n", sdRec.osindex);
- pClose(f, &pid);
- }
- }
+ char buffer[PATH_MAX];
+
+ snprintf(buffer, PATH_MAX, "/usr/sbin/grubonce %d", sdRec.osindex);
+ system(buffer);
}
#define GRUB2_MAX_MENU_LEVEL 5
++++++ kdm-dont-grab-mouse.diff ++++++
Index: kdm/kfrontend/kdm_greet.c
===================================================================
--- kdm/kfrontend/kdm_greet.c.orig 2010-07-06 08:54:31.000000000 +0200
+++ kdm/kfrontend/kdm_greet.c 2010-11-21 20:47:03.694718280 +0100
@@ -458,7 +458,6 @@ secureInputs(Display *dpy)
{
debug("secureInputs %s\n", dname);
secureKeyboard(dpy);
- securePointer(dpy);
XSetInputFocus(dpy, None, None, CurrentTime);
debug("secureInputs %s done\n", dname);
}
@@ -469,7 +468,6 @@ unsecureInputs(Display *dpy)
debug("unsecureInputs %s\n", dname);
XSetInputFocus(dpy, PointerRoot, PointerRoot, CurrentTime);
XUngrabKeyboard(dpy, CurrentTime);
- XUngrabPointer(dpy, CurrentTime);
XSync(dpy, False);
}
++++++ kdm-fix-generic-greeter.diff ++++++
Index: kdm/kfrontend/kgreeter.cpp
===================================================================
--- kdm/kfrontend/kgreeter.cpp.orig
+++ kdm/kfrontend/kgreeter.cpp
@@ -976,8 +976,6 @@ KThemedGreeter::KThemedGreeter(KdmThemer
timed_label = themer->findNode("timed-label");
KdmItem *itm;
- if ((itm = themer->findNode("pam-message"))) // done via msgboxes
- itm->setVisible(false);
if ((itm = themer->findNode("language_button"))) // not implemented yet
itm->setVisible(false);
Index: kdm/kfrontend/themes/greeter.dtd
===================================================================
--- kdm/kfrontend/themes/greeter.dtd.orig
+++ kdm/kfrontend/themes/greeter.dtd
@@ -19,9 +19,9 @@ Items with these IDs get special treatme
caps-lock-warning | xauth-warning | pam-error | timed-label |
login_button | session_button | system_button
Items with these IDs might get special treatment by conversation plugins:
- talker | domain-entry | user-entry | pw-entry
+ talker | domain-entry | user-entry | pw-entry | pam-message | pam-prompt | user-pw-entry
Items with these IDs are always hidden:
- pam-message | language_button
+ language_button
-->
<!ATTLIST item
Index: kdm/kfrontend/themes/oxygen-air/oxygen-air.xml
===================================================================
--- kdm/kfrontend/themes/oxygen-air/oxygen-air.xml.orig
+++ kdm/kfrontend/themes/oxygen-air/oxygen-air.xml
@@ -26,7 +26,7 @@
<stock type="welcome-label"/>
</item>
- <item type="rect" id="user-field">
+ <item type="rect" id="talker">
<pos anchor="c" x="50%" y="43%" width="400" height="144"/>
<box orientation="vertical" spacing="0" homogeneous="true">
@@ -34,6 +34,7 @@
<pos anchor="c" x="50%" y="60%" height="box" width="box"/>
<box orientation="horizontal" spacing="10">
<item type="pixmap">
+ <show type="!plugin-specific-generic"/>
<normal file="user-entry.png"/>
</item>
<item type="entry" id="user-entry">
@@ -47,12 +48,31 @@
<pos anchor="c" x="50%" y="40%" height="box" width="box"/>
<box orientation="horizontal" spacing="10">
<item type="pixmap">
+ <show type="!plugin-specific-generic"/>
<normal file="pw-entry.png"/>
</item>
<item type="entry" id="pw-entry">
+ <show type="!plugin-specific-generic"/>
<pos width="157" height="30"/>
<style frame="true"/>
</item>
+ <!-- these need repositioning for KDE 4.6 -->
+ <item type="label" id="pam-message">
+ <show type="plugin-specific-generic"/>
+ <pos anchor="n" x="50%" y="60%" width="90%" height="30%"/>
+ <text> </text>
+ </item>
+
+ <item type="label" id="pam-prompt">
+ <show type="plugin-specific-generic"/>
+ <pos anchor="n" x="50%" y="30%" width="90%" height="22"/>
+ <text> </text>
+ </item>
+
+ <item type="entry" id="user-pw-entry">
+ <show type="plugin-specific-generic"/>
+ <pos anchor="c" x="50%" y="30%" width="90%" height="22"/>
+ </item>
</box>
</item>
Index: libs/kdm/kgreet_generic.cpp
===================================================================
--- libs/kdm/kgreet_generic.cpp.orig
+++ libs/kdm/kgreet_generic.cpp
@@ -41,24 +41,14 @@ extern KDE_EXPORT KGreeterPluginInfo kgr
static int echoMode;
-class KDMPasswordEdit : public KLineEdit {
-public:
- KDMPasswordEdit(QWidget *parent = 0) : KLineEdit(parent)
- {
- if (::echoMode == -1)
- setPasswordMode(true);
- else
- setEchoMode(::echoMode ? Password : NoEcho);
- setContextMenuPolicy(Qt::NoContextMenu);
- }
-};
-
KGenericGreeter::KGenericGreeter(KGreeterPluginHandler *_handler,
QWidget *parent,
const QString &_fixedEntity,
Function _func, Context _ctx) :
QObject(),
KGreeterPlugin(_handler),
+ m_label( 0 ),
+ m_messageLabel( 0 ),
m_lineEdit(0),
fixedUser(_fixedEntity),
func(_func),
@@ -66,22 +56,56 @@ KGenericGreeter::KGenericGreeter(KGreete
exp(-1),
running(false)
{
- m_parentWidget = new QWidget(parent);
- m_parentWidget->setObjectName("talker");
- // XXX set some minimal size
- widgetList << m_parentWidget;
- m_grid = new QGridLayout(m_parentWidget);
- m_grid->setMargin(0);
+ QGridLayout *grid = 0;
+ if (!_handler->gplugHasNode( "pam-prompt" ) ||
+ !_handler->gplugHasNode( "user-pw-entry" ) ||
+ !_handler->gplugHasNode( "pam-message" )) {
+ parent = new QWidget( parent );
+ parent->setObjectName( "talker" );
+ widgetList << parent;
+ grid = new QGridLayout( parent );
+ grid->setMargin( 0 );
+ }
if (ctx == ExUnlock || ctx == ExChangeTok)
fixedUser = KUser().loginName();
+
+ m_label = new QLabel( parent );
+ if( grid ) {
+ m_label->setMinimumWidth(
+ m_label->fontMetrics().width( "A username" ) );
+ grid->addWidget( m_label, 0, 0 );
+ } else {
+ m_label->setObjectName( "pam-prompt" );
+ widgetList << m_label;
+
+ m_lineEdit = new KLineEdit( parent );
+ m_label->setBuddy( m_lineEdit );
+ if( grid ) {
+ m_lineEdit->setMinimumWidth(
+ m_lineEdit->fontMetrics().width( "This is a long password" ) );
+ grid->addWidget( m_lineEdit, 0, 1 );
+ } else {
+ m_lineEdit->setObjectName( "user-pw-entry" );
+ widgetList << m_lineEdit;
+ }
+ m_messageLabel = new QLabel( parent );
+ if( grid ) {
+ m_messageLabel->setMinimumWidth(
+ m_messageLabel->fontMetrics().width( "Information text" ) );
+ grid->addWidget( m_messageLabel, 1, 0 );
+ } else {
+ m_messageLabel->setObjectName( "pam-message" );
+ widgetList << m_messageLabel;
+ }
+ }
}
// virtual
KGenericGreeter::~KGenericGreeter()
{
abort();
- delete m_parentWidget;
+ qDeleteAll( widgetList );
}
void // virtual
@@ -127,8 +151,7 @@ KGenericGreeter::setEnabled(bool enable)
{
// assert(func == Authenticate && ctx == Shutdown);
// XXX this is likely to bear some bogosity
- foreach (QWidget *w, m_children)
- w->setEnabled(enable);
+ m_lineEdit->setEnabled( enable );
if (enable && m_lineEdit)
m_lineEdit->setFocus();
}
@@ -143,9 +166,7 @@ KGenericGreeter::textMessage(const char
revive();
QString qtext = QString::fromUtf8(text);
m_infoMsgs.append(qtext);
- QLabel *label = new QLabel(qtext, m_parentWidget);
- m_grid->addWidget(label, m_line++, 0, 1, 2);
- m_children.append(label);
+ m_messageLabel->setText( m_infoMsgs.join( "\n" ));
return true;
}
@@ -169,15 +190,20 @@ KGenericGreeter::textPrompt(const char *
revive();
else
m_infoMsgs.clear();
-
- QLabel *label = new QLabel(QString::fromUtf8(prompt).trimmed());
- m_grid->addWidget(label, m_line, 0);
- m_children.append(label);
+ m_children.append(m_label);
m_echo = echo;
+
+ m_label->setText( QString::fromUtf8( prompt ).trimmed());
+ m_lineEdit->setContextMenuPolicy( Qt::NoContextMenu );
+ m_lineEdit->setCompletionObject( 0 );
+ m_lineEdit->disconnect( this );
+ m_lineEdit->clear();
+ m_lineEdit->setPasswordMode( false );
+ m_lineEdit->setEchoMode( QLineEdit::Normal );
if (echo) {
- m_lineEdit = new KLineEdit;
- m_lineEdit->setContextMenuPolicy(Qt::NoContextMenu);
if (!exp) {
+ if (m_label->text().isEmpty())
+ m_label->setText( i18n("&Username:"));
if (!m_users.isEmpty()) {
KCompletion *userNamesCompletion = new KCompletion;
userNamesCompletion->setItems(m_users);
@@ -188,20 +214,18 @@ KGenericGreeter::textPrompt(const char *
if (!curUser.isEmpty()) {
m_lineEdit->setText(curUser);
m_lineEdit->selectAll();
- connect(m_lineEdit, SIGNAL(selectionChanged()), SLOT(slotChanged()));
}
connect(m_lineEdit, SIGNAL(editingFinished()), SLOT(slotLoginLostFocus()));
}
connect(m_lineEdit, SIGNAL(editingFinished()), SLOT(slotChanged()));
connect(m_lineEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
} else {
- m_lineEdit = new KDMPasswordEdit;
+ if (::echoMode == -1)
+ m_lineEdit->setPasswordMode( true );
+ else
+ m_lineEdit->setEchoMode( ::echoMode ? QLineEdit::Password : QLineEdit::NoEcho );
+ connect( m_lineEdit, SIGNAL(editingFinished()), SLOT(slotChanged()) );
}
- m_lineEdit->setMinimumWidth(
- m_lineEdit->fontMetrics().width("This is a long password"));
- m_grid->addWidget(m_lineEdit, m_line, 1);
- m_children.append(m_lineEdit);
- m_lineEdit->show();
m_lineEdit->setFocus();
}
@@ -236,7 +260,6 @@ KGenericGreeter::next()
if (m_lineEdit) {
m_lineEdit->setEnabled(false);
QString text = m_lineEdit->text();
- m_lineEdit = 0;
handler->gplugReturnText(text.toLocal8Bit(),
!m_echo ?
KGreeterPluginHandler::IsSecret :
@@ -273,8 +296,7 @@ KGenericGreeter::failed()
revive();
handler->gplugMsgBox(QMessageBox::Information, text);
} else {
- foreach (QWidget *w, m_children)
- w->setEnabled(false);
+ m_lineEdit->setEnabled( false );
}
exp = -1;
running = false;
@@ -284,12 +306,9 @@ void // virtual
KGenericGreeter::revive()
{
// assert(!running);
- foreach (QWidget *w, m_children)
- w->deleteLater();
- m_children.clear();
m_infoMsgs.clear();
- m_lineEdit = 0;
- m_line = 0;
+ m_lineEdit->clear();
+ m_lineEdit->setEnabled( true );
}
void // virtual
Index: libs/kdm/kgreet_generic.h
===================================================================
--- libs/kdm/kgreet_generic.h.orig
+++ libs/kdm/kgreet_generic.h
@@ -33,7 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fi
#include <QObject>
-class QGridLayout;
class QWidget;
class KLineEdit;
@@ -68,11 +67,11 @@ class KGenericGreeter : public QObject,
void slotChanged();
private:
- QGridLayout *m_grid;
QList m_children;
+ QLabel *m_label;
+ QLabel *m_messageLabel;
KLineEdit *m_lineEdit;
- QWidget *m_parentWidget;
- QList<QString> m_infoMsgs;
+ QStringList m_infoMsgs;
QString fixedUser, curUser;
QStringList m_users;
Function func;
++++++ kdm-fix-greeteruid.patch ++++++
commit c44df47be1ddf69df381ff44595c2332c83fab60
Author: Raymond Wooninck
Date: Sun May 5 15:29:53 2013 +0200
Unify the approach on how to create the GreeterUID and utilize useradd for this.
REVIEW: 110315
CCMAIL: ossi@kde.org
diff --git a/kdm/kfrontend/genkdmconf.c b/kdm/kfrontend/genkdmconf.c
index 69b42f1..05a19e7 100644
--- a/kdm/kfrontend/genkdmconf.c
+++ b/kdm/kfrontend/genkdmconf.c
@@ -2101,7 +2101,7 @@ static void
upd_greeteruid(Entry *ce, Section *cs ATTR_UNUSED)
{
struct passwd *pw;
- char *ok, *adduser;
+ char *ok, *useradd;
int uid;
if (use_destdir || !ce->active)
@@ -2109,11 +2109,10 @@ upd_greeteruid(Entry *ce, Section *cs ATTR_UNUSED)
if (!(pw = getpwnam(ce->value))) {
uid = strtol(ce->value, &ok, 10);
if (*ok || !(pw = getpwuid(uid))) {
- if (!access("/etc/debian_version", R_OK)
- && (adduser = locate("adduser"))) {
+ if ((useradd = locate("useradd"))) {
const char *args[] = {
- adduser, "--system", "--group",
- "--home", "/var", "--no-create-home",
+ useradd, "--system", "--user-group", "-s", "/bin/false",
+ "--home-dir", "/var/lib/kdm", "--no-create-home", "-c", "KDM Display Manager daemon",
ce->value, 0
};
if (runAndWait((char **)args)) {
++++++ kdm-fix-labelcolors.diff ++++++
Subject: Fix broken KDM layout with fingerprint support
From: Lubos Lunak
Patch-upstream: yes
Bug: bnc#533189
Relates: kdm-fix-generic-greeter.diff, same-pam-generic-classic.diff
Index: kde-workspace-4.8.5/kdm/kfrontend/themer/kdmlabel.h
===================================================================
--- kde-workspace-4.8.5.orig/kdm/kfrontend/themer/kdmlabel.h
+++ kde-workspace-4.8.5/kdm/kfrontend/themer/kdmlabel.h
@@ -61,6 +61,8 @@ protected:
virtual void doPlugActions(bool plug);
+ virtual void updatePalette( QWidget *w );
+
virtual void setWidget(QWidget *widget);
struct LabelStruct {
Index: kde-workspace-4.8.5/kdm/kfrontend/themer/kdmitem.h
===================================================================
--- kde-workspace-4.8.5.orig/kdm/kfrontend/themer/kdmitem.h
+++ kde-workspace-4.8.5/kdm/kfrontend/themer/kdmitem.h
@@ -199,7 +199,7 @@ protected:
bool eventFilter(QObject *o, QEvent *e);
void setWidgetAttribs(QWidget *);
- void updatePalette(QWidget *w);
+ virtual void updatePalette(QWidget *w);
void updateThisVisible();
Index: kde-workspace-4.8.5/kdm/kfrontend/themer/kdmlabel.cpp
===================================================================
--- kde-workspace-4.8.5.orig/kdm/kfrontend/themer/kdmlabel.cpp
+++ kde-workspace-4.8.5/kdm/kfrontend/themer/kdmlabel.cpp
@@ -221,6 +221,8 @@ KdmLabel::statusChanged(bool descend)
if ((state == Sprelight && !label.prelight.present) ||
(state == Sactive && !label.active.present))
return;
+ if( myWidget )
+ updatePalette( myWidget );
updateWidgetAttribs();
needUpdate();
}
@@ -362,4 +364,19 @@ KdmLabel::updateWidgetAttribs()
myWidget->setPalette(p);
}
+void
+KdmLabel::updatePalette( QWidget *w )
+{
+ struct LabelStruct::LabelClass *l = &label.normal;
+ if (state == Sactive && label.active.present)
+ l = &label.active;
+ else if (state == Sprelight && label.prelight.present)
+ l = &label.prelight;
+ w->setFont( l->font.font );
+ QPalette p = w->palette();
+ p.setColor( QPalette::WindowText, l->color );
+ w->setPalette( p );
+ KdmItem::updatePalette( w );
+}
+
#include "kdmlabel.moc"
++++++ kdm-kdmconf.diff ++++++
Index: kdm/kfrontend/genkdmconf.c
===================================================================
--- kdm/kfrontend/genkdmconf.c.orig
+++ kdm/kfrontend/genkdmconf.c
@@ -1049,6 +1049,26 @@ copyFile(Entry *ce, int mode, int (*proc
}
static void
+cleanupFile( const char *tname, int mode )
+{
+ char *nname;
+ File file, file2;
+ char bn[PATH_MAX + 4];
+
+ ASPrintf( &nname, "%s/%s", newdir, tname );
+ sprintf( bn, "%s.bak", nname );
+
+ if (readFile( &file, nname ) && readFile( &file2, bn )) {
+ if ((file.eof - file.buf == file2.eof - file2.buf) && !strncmp( file.buf, file2.buf, file.eof - file.buf )) {
+ unlink( nname );
+ rename( bn, nname );
+ chmod( nname, mode );
+ }
+ }
+ free( nname );
+}
+
+static void
doLinkFile(const char *name)
{
File file;
@@ -1087,9 +1107,10 @@ writeFile(const char *tname, int mode, c
fputs_(cont, f);
fclose_(f);
addedFile(tname);
+ if (!no_backup)
+ cleanupFile(tname + sizeof(KDMCONF), mode);
}
-
static void
handleBgCfg(Entry *ce, Section *cs)
{
@@ -3179,9 +3200,6 @@ int main(int argc, char **argv)
memcmp(oldkde + olen - sizeof(SHR_CONF) + 1,
SHR_CONF, sizeof(SHR_CONF)))
{
- fprintf(stderr,
- "Warning: --old-kde does not end with " SHR_CONF ". "
- "Might wreak havoc.\n");
oldkdepfx = oldkde;
} else
ASPrintf((char **)&oldkdepfx,
@@ -3293,6 +3311,8 @@ int main(int argc, char **argv)
f = createFile("kdmrc", kdmrcmode);
writeKdmrc(f);
fclose_(f);
+ if (!no_backup)
+ cleanupFile( "kdmrc", kdmrcmode );
f = createFile("README", 0644);
fprintf_(f,
@@ -3341,6 +3361,8 @@ int main(int argc, char **argv)
"\nTry 'genkdmconf --help' if you want to generate another configuration.\n"
"\nYou may delete this README.\n");
fclose_(f);
+ if (!no_backup)
+ cleanupFile( "README", 0644 );
return 0;
}
++++++ kdm-logrotate ++++++
/var/log/kdm.log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
copytruncate
}
++++++ kdm-long-xserver-timeout.diff ++++++
Subject: Increase the time KDM waits for X to start up
From: Lubos Lunak
Patch-upstream: no
Bug: bnc#462478
See the bugreport. In short, some drivers suck.
Index: kdm/config.def
===================================================================
--- kdm/config.def.orig
+++ kdm/config.def
@@ -1364,7 +1364,7 @@ Description:
Key: ServerTimeout
Type: int
-Default: 30
+Default: 60
User: core
Instance: #:*/
Comment:
++++++ kdm-make_it_cool.diff ++++++
--- kdm/kfrontend/kgreeter.cpp 2011-08-18 18:54:29.000000000 +0200
+++ kdm/kfrontend/kgreeter.cpp 2011-08-19 09:37:02.384127904 +0200
@@ -68,20 +68,20 @@
class UserListView : public QListWidget {
public:
- UserListView(QWidget *parent = 0)
+ UserListView( bool _themed, QWidget *parent = 0)
: QListWidget(parent)
, cachedSizeHint(-1, 0)
+ , themed (_themed)
{
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Ignored);
setUniformItemSizes(true);
setVerticalScrollMode(ScrollPerPixel);
setIconSize(QSize(48, 48));
- setAlternatingRowColors(true);
+ setAlternatingRowColors(!themed);
}
mutable QSize cachedSizeHint;
- protected:
virtual QSize sizeHint() const
{
if (!cachedSizeHint.isValid()) {
@@ -149,6 +149,7 @@
private:
bool m_suppressClick;
+ bool themed;
};
class UserListViewItem : public QListWidgetItem {
@@ -185,7 +186,7 @@
"PrevUser");
if (_userList) {
- userView = new UserListView(this);
+ userView = new UserListView(framed, this);
connect(userView, SIGNAL(itemClicked(QListWidgetItem*)),
SLOT(slotUserClicked(QListWidgetItem*)));
connect(userView, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
@@ -193,8 +194,6 @@
}
if (_userCompletion)
userList = new QStringList;
- if (userView || userList)
- insertUsers();
sessMenu = new QMenu(this);
connect(sessMenu, SIGNAL(triggered(QAction*)),
@@ -365,8 +364,11 @@
}
}
+#include
+#include
+
void
-KGreeter::insertUsers()
+KGreeter::insertUsers( int limit_users )
{
struct passwd *ps;
@@ -392,6 +394,9 @@
if (_showUsers == SHOW_ALL) {
UserList noUsers(_noUsers);
QSet<QString> dupes;
+ QStringList toinsert;
+
+ int count = 0;
for (setpwent(); (ps = getpwent()) != 0;) {
if (*ps->pw_dir && *ps->pw_shell &&
(ps->pw_uid >= (unsigned)_lowUserId ||
@@ -403,10 +408,55 @@
QString username(QFile::decodeName(ps->pw_name));
if (!dupes.contains(username)) {
dupes.insert(username);
- insertUser(default_pix, username, ps);
+ toinsert.append( username );
+
+ if ( limit_users >= 0 && ++count > limit_users )
+ break;
+
+ }
+ }
+ }
+ if ( limit_users >= 0 && ++count > limit_users ) {
+ utmpname( _PATH_WTMP );
+ setutxent();
+ toinsert = QStringList();
+ dupes.clear();
+
+ for ( count = 0; count < limit_users; ) {
+ struct utmpx * ent = getutxent();
+ if ( !ent )
+ break;
+ struct passwd *ps = getpwnam( ent->ut_user );
+ if (ps && *ps->pw_dir && *ps->pw_shell &&
+ (ps->pw_uid >= (unsigned)_lowUserId ||
+ !ps->pw_uid && _showRoot) &&
+ ( ps->pw_uid <= (unsigned)_highUserId ) &&
+ !noUsers.hasUser( ps->pw_name ) &&
+ !noUsers.hasGroup( ps->pw_gid ))
+ {
+ QString username( QFile::decodeName( ent->ut_user ) );
+ if (!dupes.contains( username )) {
+ dupes.insert( username );
+ toinsert.append( username );
+ count++;
+ }
}
+
+
}
+ endutxent();
}
+
+ for ( QStringList::ConstIterator it = toinsert.begin();
+ it != toinsert.end(); ++it )
+ {
+ // pretty stupid to do another lookup round, but the number is limited
+ // and caching struct passwd is pretty ugly
+ struct passwd *ps = getpwnam( QFile::encodeName( *it ) );
+ if ( ps )
+ insertUser( default_pix, *it, ps );
+ }
+
} else {
UserList users(_users);
if (users.hasGroups()) {
@@ -783,6 +833,9 @@
break; }
}
+ if (userView || userList)
+ insertUsers();
+
if (userView) {
if (clock)
inner_box->addWidget(clock, 0, Qt::AlignCenter);
@@ -895,6 +948,7 @@
setMouseTracking(true);
adjustGeometry();
+ themer->setTypeVisible( "userlist", true );
themer->setWidget(this);
@@ -983,6 +1037,13 @@
completeMenu();
#endif
+ if (userView || userList)
+ {
+ insertUsers(7);
+ themer->setTypeVisible( "userlist", true );
+ } else
+ themer->setTypeVisible( "userlist", false );
+
if ((system_button = themer->findNode("system_button"))) {
if (optMenu)
addAction(optMenu->menuAction());
@@ -1021,6 +1082,8 @@
inherited::pluginSetup();
if (userView && verify->entitiesLocal() && verify->entityPresettable() && userlist_node) {
+ userView->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
+ userView->setMaximumHeight( userView->sizeHint().height() );
userlist_node->setWidget(userView);
userlist_rect->setVisible(true);
} else {
--- kdm/kfrontend/kgreeter.h 2011-08-18 18:54:29.000000000 +0200
+++ kdm/kfrontend/kgreeter.h 2011-08-19 09:36:00.097124913 +0200
@@ -70,7 +70,7 @@
protected:
void insertUser(const QImage &, const QString &, struct passwd *);
- void insertUsers();
+ void insertUsers(int limit_users = -1);
void putSession(const QString &, const QString &, bool, const char *);
void insertSessions();
virtual void pluginSetup();
--- kdm/kfrontend/themer/kdmitem.cpp 2011-08-18 18:54:29.000000000 +0200
+++ kdm/kfrontend/themer/kdmitem.cpp 2011-08-19 09:36:00.098124907 +0200
@@ -65,7 +65,6 @@
!modes.split(",", QString::SkipEmptyParts).contains("console"))))
{
m_visible = false;
- return;
}
m_showType = sel.attribute("type");
@@ -78,7 +77,6 @@
themer()->typeVisible(m_showType) == m_showTypeInvert)
{
m_visible = false;
- return;
}
}
--- kdm/kfrontend/themer/kdmlist.cpp 2011-08-18 18:54:29.000000000 +0200
+++ kdm/kfrontend/themer/kdmlist.cpp 2011-08-19 09:36:00.098124907 +0200
@@ -29,8 +29,6 @@
: KdmItem(parent, node)
{
itemType = "list";
- if (!isVisible())
- return;
// Read RECT TAGS
QDomNodeList childList = node.childNodes();
--- kdm/kfrontend/themer/kdmthemer.cpp 2011-08-18 18:54:29.000000000 +0200
+++ kdm/kfrontend/themer/kdmthemer.cpp 2011-08-19 09:38:00.360130704 +0200
@@ -223,10 +223,6 @@
} else {
continue;
}
- if (!newItem->isVisible()) {
- delete newItem;
- continue;
- }
connect(newItem, SIGNAL(needUpdate(int,int,int,int)),
SLOT(update(int,int,int,int)));
connect(newItem, SIGNAL(needPlacement()),
++++++ kdm-relaxed-auth.diff ++++++
Index: kdm/backend/auth.c
===================================================================
--- kdm/backend/auth.c.orig 2010-07-06 08:54:30.000000000 +0200
+++ kdm/backend/auth.c 2010-11-21 20:47:03.478727336 +0100
@@ -610,6 +610,7 @@ defineLocal(FILE *file, Xauth *auth, int
writeAddr(FamilyLocal, strlen(name.nodename), (CARD8 *)name.nodename,
file, auth, ok);
#endif
+ setenv("XAUTHLOCALHOSTNAME", name.nodename, 1);
/*
* For HP-UX, HP's Xlib expects a fully-qualified domain name, which
@@ -1277,6 +1278,9 @@ setUserAuthorization(struct display *d)
userEnviron = setEnv(userEnviron, "XAUTHORITY", envname);
systemEnviron = setEnv(systemEnviron, "XAUTHORITY", envname);
}
+ name = getenv("XAUTHLOCALHOSTNAME");
+ if (name)
+ userEnviron = setEnv( userEnviron, "XAUTHLOCALHOSTNAME", name);
/* a chown() used to be here, but this code runs as user anyway */
}
debug("done setUserAuthorization\n");
++++++ kdm-remove-duplicated-sessions.diff ++++++
Index: kdm/kfrontend/sessions/CMakeLists.txt
===================================================================
--- kdm/kfrontend/sessions/CMakeLists.txt.orig 2010-11-05 11:47:45.000000000 +0100
+++ kdm/kfrontend/sessions/CMakeLists.txt 2010-11-21 20:47:03.551842096 +0100
@@ -12,19 +12,14 @@ install(FILES
amaterus.desktop
amiwm.desktop
asclassic.desktop
- blackbox.desktop
cde.desktop
ctwm.desktop
cwwm.desktop
e16.desktop
- enlightenment.desktop
evilwm.desktop
fluxbox.desktop
flwm.desktop
- fvwm.desktop
- fvwm95.desktop
golem.desktop
- icewm.desktop
ion.desktop
larswm.desktop
lwm.desktop
@@ -47,9 +42,6 @@ install(FILES
w9wm.desktop
waimea.desktop
wm2.desktop
- wmaker.desktop
- xfce.desktop
- xfce4.desktop
DESTINATION ${DATA_INSTALL_DIR}/kdm/sessions
)
++++++ kdm-sysconfig-values.diff ++++++
++++ 777 lines (skipped)
++++++ kdm-wordbreak.diff ++++++
Index: kdm/kfrontend/kfdialog.cpp
===================================================================
--- kdm/kfrontend/kfdialog.cpp.orig 2010-08-05 18:55:46.000000000 +0200
+++ kdm/kfrontend/kfdialog.cpp 2010-11-21 20:47:03.524842955 +0100
@@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fi
#include <KGuiItem>
#include <KPushButton>
+#include <KGlobalSettings>
#include <QApplication>
#include <QDesktopWidget>
@@ -172,6 +173,9 @@ KFMsgBox::KFMsgBox(QWidget *parent, QMes
QLabel *label1 = new QLabel(this);
label1->setPixmap(QMessageBox::standardIcon(type));
QLabel *label2 = new QLabel(text, this);
+ QRect d = KGlobalSettings::desktopGeometry(this);
+ if ( label2->fontMetrics().size( 0, text).width() > d.width() * 3 / 5)
+ label2->setWordWrap( true );
KPushButton *button = new KPushButton(KStandardGuiItem::ok(), this);
button->setDefault(true);
button->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
++++++ kdm_plymouth.patch ++++++
--- kdm/backend/dm.c 2011-09-06 16:09:17.000000000 +0200
+++ kdm/backend/dm.c 2011-09-07 16:23:59.017135854 +0200
@@ -1347,6 +1347,81 @@
return activeVTs;
}
+static int
+get_active_vt (void)
+{
+ int console_fd;
+ struct vt_stat console_state = { 0 };
+ console_fd = open ("/dev/tty0", O_RDONLY | O_NOCTTY);
+ if (console_fd < 0) {
+ goto out;
+ }
+ if (ioctl (console_fd, VT_GETSTATE, &console_state) < 0) {
+ goto out;
+ }
+out:
+ if (console_fd >= 0) {
+ close (console_fd);
+ }
+ return console_state.v_active;
+}
+
+static int
+plymouth_is_running (void)
+{
+ int status;
+ status = system ("/usr/bin/plymouth --ping");
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+plymouth_has_active_vt (void)
+{
+ int status;
+ status = system ("/usr/bin/plymouth --has-active-vt");
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+plymouth_prepare_for_transition (void)
+{
+ int status;
+ status = system ("/usr/bin/plymouth deactivate");
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+int
+plymouth_quit_with_transition (void)
+{
+ int status;
+ status = system ("/usr/bin/plymouth quit --retain-splash");
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+plymouth_quit_without_transition (void)
+{
+ int status;
+ status = system ("/usr/bin/plymouth quit");
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static int
+triggered_to_force_display_on_active_vt (void)
+{
+ int should_force_display_on_active_vt;
+ should_force_display_on_active_vt=open("/var/spool/gdm/force-display-on-active-vt", O_RDONLY);
+ if ( should_force_display_on_active_vt >= 0 )
+ close(should_force_display_on_active_vt);
+ unlink("/var/spool/gdm/force-display-on-active-vt");
+ return should_force_display_on_active_vt;
+}
+
static void
allocateVT(struct display *d)
{
@@ -1356,6 +1431,43 @@
if ((d->displayType & d_location) == dLocal &&
d->status == notRunning && !d->serverVT && d->reqSrvVT >= 0)
{
+ /* check for plymouth using newer methods */
+ d->plymouth_is_running = plymouth_is_running ();
+ if (d->plymouth_is_running) {
+ /* call plymouth deactivate */
+ plymouth_prepare_for_transition ();
+ if (plymouth_has_active_vt ()) {
+ /* plymouth was displaying a splash screen and has
+ * terminated leaving it on screen
+ */
+ int vt;
+ vt = get_active_vt ();
+ if (vt > 0) {
+ /* start the X server on the active vt */
+ d->serverVT = vt;
+ return;
+ }
+ }
+ else {
+ /* plymouth might have been running but did not display
+ * a splash screen.
+ */
+
+ /* call plymouth quit and start the X server as usual */
+ d->plymouth_is_running = !plymouth_quit_without_transition ();
+ }
+
+ /* fallback to old/deprecated method */
+ } else if ( triggered_to_force_display_on_active_vt() >= 0 ) {
+ int vt;
+ vt = get_active_vt();
+ if (vt > 0) {
+ d->serverVT = vt;
+ return;
+ }
+ }
+
+
if (d->reqSrvVT && d->reqSrvVT < 16) {
d->serverVT = d->reqSrvVT;
} else {
--- kdm/backend/dm.h 2011-09-06 16:09:17.000000000 +0200
+++ kdm/backend/dm.h 2011-09-07 16:23:59.018135847 +0200
@@ -304,6 +304,8 @@
int authNum; /* number of authorizations */
char *authFile; /* file to store authorization in */
char *greeterAuthFile; /* file to store authorization for greeter in */
+
+ int plymouth_is_running; /* Plymouth's status */
};
#define d_location 1
@@ -428,6 +430,8 @@
void forEachDisplay(void (*f)(struct display *));
#ifdef HAVE_VTS
void forEachDisplayRev(void (*f)(struct display *));
+/* function for plymouth */
+int plymouth_quit_with_transition (void);
#endif
void removeDisplay(struct display *old);
struct display
--- kdm/backend/server.c 2011-09-06 16:09:17.000000000 +0200
+++ kdm/backend/server.c 2011-09-07 16:23:59.018135847 +0200
@@ -137,6 +137,11 @@
struct display *d = startingServer;
d->serverStatus = ignore;
serverTimeout = TO_INF;
+ if (d->plymouth_is_running) {
+ debug( "Quitting Plymouth with transition\n" );
+ d->plymouth_is_running = !plymouth_quit_with_transition ();
+ debug ("Is Plymouth still running? %s\n", d->plymouth_is_running ? "yes" : "no");
+ }
debug("X server ready, starting session\n");
startDisplayP2(d);
}
++++++ kdm_systemd_shutdown.patch ++++++
per https://bugzilla.redhat.com/show_bug.cgi?id=796969#c23
The process that executes kdm/backend/session.c:manageSession() is the leader
process of the logind session.
manageSession() calls:
blockTerm();
clientExited();
unblockTerm();
where clientExited() ends the PAM session.
With the current systemd-logind, ending the PAM session will cause the leader
process to be delivered SIGHUP and SIGTERM. The process will die and the
remainder of manageSession() will not be executed.
Interestingly, at the end of the function there's a call to sessionExit(),
which calls clientExited() again.
Removing the three lines quoted above makes reboot from KDE work again. I
haven't noticed any bad effects.
diff -up kde-workspace-4.8.0/kdm/backend/session.c.bz796969 kde-workspace-4.8.0/kdm/backend/session.c
--- kde-workspace-4.8.0/kdm/backend/session.c.bz796969 2012-01-18 14:08:40.000000000 -0600
+++ kde-workspace-4.8.0/kdm/backend/session.c 2012-02-28 07:17:16.270219932 -0600
@@ -662,9 +662,9 @@ manageSession(void)
sessionExit(EX_AL_RESERVER_DPY);
}
- blockTerm();
- clientExited();
- unblockTerm();
+ /* blockTerm(); */
+ /* clientExited(); */
+ /* unblockTerm(); */
gSet(&mstrtalk);
gSendInt(D_UnUser);
++++++ krunner-no-italics.diff ++++++
commit aed464bdf4ff6ddf81bd5730559a69d4dc7bd446
Author: Will Stephenson
Date: Fri Jan 18 20:46:43 2013 +0100
Change italic krunner result subtext to be smaller instead of italic (kde#307344)
diff --git a/krunner/interfaces/default/resultitem.cpp b/krunner/interfaces/default/resultitem.cpp
index 31fe94c..8d5e7d5 100644
--- a/krunner/interfaces/default/resultitem.cpp
+++ b/krunner/interfaces/default/resultitem.cpp
@@ -383,12 +383,12 @@ void ResultItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
p.setPen(textColor);
//TODO: add subtext, make bold, etc...
p.drawText(pixmap.rect(), Qt::AlignLeft | Qt::TextWordWrap, name());
- QFont italics = p.font();
- QFontMetrics italicMetrics(italics);
- int fontHeight = italicMetrics.boundingRect(pixmap.rect(), Qt::AlignLeft | Qt::TextWordWrap, name()).height();
- italics.setItalic(true);
- p.setFont(italics);
- p.drawText(pixmap.rect().adjusted(0, fontHeight, 0, 0), Qt::AlignLeft | Qt::TextWordWrap, description());
+ QFont subtext = p.font();
+ subtext.setPointSize(qMax(subtext.pointSize() - 1, 1));
+ QFontMetrics subtextMetrics(subtext);
+ int fontHeight = subtextMetrics.boundingRect(pixmap.rect(), Qt::AlignLeft | Qt::TextWordWrap, name()).height();
+ p.setFont(subtext);
+ p.drawText(pixmap.rect().adjusted(0, pixmap.rect().height() - fontHeight, 0, 0), Qt::AlignLeft | Qt::TextWordWrap, description());
// Fade the pixmap out at the end
if (width > pixmap.width()) {
++++++ ksysguardd.service ++++++
[Unit]
Description=KDE ksysguard daemon
[Service]
Type=forking
PIDFile=/var/run/ksysguardd.pid
ExecStart=/usr/bin/ksysguardd -d
PrivateTmp=true
[Install]
WantedBy=multi-user.target++++++ opensuse-homepage.diff ++++++
diff -ur kde-workspace-4.8.1.orig/plasma/desktop/applets/kickoff/ui/brandingbutton.cpp kde-workspace-4.8.1/plasma/desktop/applets/kickoff/ui/brandingbutton.cpp
--- kde-workspace-4.8.1.orig/plasma/desktop/applets/kickoff/ui/brandingbutton.cpp 2012-03-20 15:15:39.645598514 +0100
+++ kde-workspace-4.8.1/plasma/desktop/applets/kickoff/ui/brandingbutton.cpp 2012-03-20 15:17:03.369606255 +0100
@@ -68,7 +68,9 @@
void BrandingButton::openHomepage()
{
- new KRun(Plasma::Theme::defaultTheme()->homepage(), topLevelWidget(), false, false);
+ KUrl suseurl;
+ suseurl = "http://www.opensuse.org";
+ new KRun(suseurl, topLevelWidget(), false, false);
}
void BrandingButton::paintEvent(QPaintEvent *event)
++++++ opensuse-kinfocenter.diff ++++++
diff --git a/kinfocenter/Modules/infosummary/defaultboxwidget.cpp b/kinfocenter/Modules/infosummary/defaultboxwidget.cpp
index 2d522ea..184735c 100644
--- a/kinfocenter/Modules/infosummary/defaultboxwidget.cpp
+++ b/kinfocenter/Modules/infosummary/defaultboxwidget.cpp
@@ -39,10 +39,10 @@ void DefaultBoxWidget::createDisplay()
m_iconLabel = new QLabel();
m_iconLabel->setAlignment(Qt::AlignCenter);
m_iconLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
-
+
QFont bFont;
bFont.setBold(true);
-
+
m_info0Label = new QLabel();
m_info0Label->setFont(bFont);
m_info0NameLabel = new QLabel();
@@ -55,7 +55,7 @@ void DefaultBoxWidget::createDisplay()
m_info2Label->setFont(bFont);
m_info2NameLabel = new QLabel();
- m_layout->addWidget(m_iconLabel,1,1,3,1,Qt::AlignCenter);
+ m_layout->addWidget(m_iconLabel,1,1,3,1,Qt::AlignCenter);
m_layout->addWidget(m_info0Label,1,2,1,1);
m_layout->addWidget(m_info0NameLabel,1,3,1,1);
@@ -65,6 +65,7 @@ void DefaultBoxWidget::createDisplay()
m_layout->addWidget(m_info2Label,3,2,1,1);
m_layout->addWidget(m_info2NameLabel,3,3,1,1);
+
}
void DefaultBoxWidget::setLabelTitles(const QString &first, const QString &second, const QString &third)
diff --git a/kinfocenter/Modules/infosummary/defaultboxwidget.h b/kinfocenter/Modules/infosummary/defaultboxwidget.h
index 2aa10be..271d666 100644
--- a/kinfocenter/Modules/infosummary/defaultboxwidget.h
+++ b/kinfocenter/Modules/infosummary/defaultboxwidget.h
@@ -42,8 +42,8 @@ class DefaultBoxWidget : public QGroupBox
void setLabelOne(const QString &);
void setLabelTwo(const QString &);
void setLabelThree(const QString &);
- void setIcon(const KIcon &icon);
-
+ void setIcon(const KIcon &icon);
+
private:
void createDisplay();
diff --git a/kinfocenter/Modules/infosummary/infosum.cpp b/kinfocenter/Modules/infosummary/infosum.cpp
index 276d00c..c36c311 100644
--- a/kinfocenter/Modules/infosummary/infosum.cpp
+++ b/kinfocenter/Modules/infosummary/infosum.cpp
@@ -47,7 +47,7 @@ void InfoSumPlugin::createDisplay()
m_layout = new QVBoxLayout(this);
m_layout->setAlignment(Qt::AlignTop);
m_layout->setSpacing(10);
-
+
createOsBox();
createCpuBox();
//createMemBox(); // Awaiting Mem class from kdereview
@@ -58,12 +58,12 @@ void InfoSumPlugin::createDisplay()
void InfoSumPlugin::createOsBox()
{
DefaultBoxWidget *osWidget = new DefaultBoxWidget();
- osWidget->setIcon(KIcon("kde"));
- osWidget->setLabelTitles(i18n("OS Version"),i18n("KDE SC Version"), i18n("Hostname"));
+ osWidget->setIcon(KIcon("suse"));
+ osWidget->setLabelTitles(i18n("OS Version"),i18n("KDE Platform Version"), i18n("Hostname"));
OsDepInfo *osInfo = new OsDepInfo();
- osWidget->setLabelOne(osInfo->osVersion());
+ osWidget->setLabelOne(osInfo->osVersion()+'\n'+osInfo->distroName());
osWidget->setLabelTwo(QString(KDE_VERSION_STRING));
osWidget->setLabelThree(osInfo->hostName());
osWidget->setWhatsThis(i18nc("OS whats this","This shows information about your Operating System"));
diff --git a/kinfocenter/Modules/infosummary/infosum.h b/kinfocenter/Modules/infosummary/infosum.h
index 463aebb..536a8b8 100644
--- a/kinfocenter/Modules/infosummary/infosum.h
+++ b/kinfocenter/Modules/infosummary/infosum.h
@@ -66,7 +66,7 @@ class InfoSumPlugin : public KCModule
void createOsBox();
void createCpuBox();
void createMemBox();
- void createHdBox();
+ void createHdBox();
QVBoxLayout *m_layout;
};
diff --git a/kinfocenter/Modules/infosummary/osdepinfo.cpp b/kinfocenter/Modules/infosummary/osdepinfo.cpp
index 34afecc..af1ec45 100644
--- a/kinfocenter/Modules/infosummary/osdepinfo.cpp
+++ b/kinfocenter/Modules/infosummary/osdepinfo.cpp
@@ -37,6 +37,12 @@ const QString OsDepInfo::osVersion()
return m_osVersion;
}
+const QString OsDepInfo::distroName()
+{
+ return m_distroName;
+}
+
+
#if defined(Q_OS_UNIX)
#include "osdepinfo_unix.cpp"
#else
@@ -50,6 +56,7 @@ void OsDepInfo::setDepInfo()
{
m_osVersion.clear();
m_hostName.clear();
+ m_distroName.clear();
}
#endif // Q_OS_UNIX
diff --git a/kinfocenter/Modules/infosummary/osdepinfo.h b/kinfocenter/Modules/infosummary/osdepinfo.h
index 3452e8b..564a86c 100644
--- a/kinfocenter/Modules/infosummary/osdepinfo.h
+++ b/kinfocenter/Modules/infosummary/osdepinfo.h
@@ -32,12 +32,14 @@ class OsDepInfo
const QString hostName();
const QString osVersion();
+ const QString distroName();
private:
void setDepInfo();
QString m_hostName;
QString m_osVersion;
+ QString m_distroName;
};
#endif //OSDEPINFO
diff --git a/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp b/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp
index d237337..9cbdcd9 100644
--- a/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp
+++ b/kinfocenter/Modules/infosummary/osdepinfo_unix.cpp
@@ -23,6 +23,18 @@
#include "osdepinfo.h"
#include
+#include <KConfig>
+#include <KConfigGroup>
+#include <QString>
+
+QString getDistro()
+{
+ KConfig osRelease( "/etc/os-release", KConfig::SimpleConfig );
+ KConfigGroup osR( &osRelease, "" );
+ QString pretty = osR.readEntry("PRETTY_NAME");
+ pretty.remove('"');
+ return(pretty);
+}
void OsDepInfo::setDepInfo()
{
@@ -31,4 +43,5 @@ void OsDepInfo::setDepInfo()
m_osVersion = QString(unixInfo.sysname) + ' ' + QString(unixInfo.release);
m_hostName = QString(unixInfo.nodename);
+ m_distroName = getDistro();
}
++++++ pager.diff ++++++
--- kde-workspace-4.10.0/plasma/desktop/applets/pager/pager.cpp 2013-01-23 22:46:44.000000000 +0100
+++ new.kde-workspace-4.10.0/plasma/desktop/applets/pager/pager.cpp 2013-02-11 21:36:34.747311896 +0100
@@ -789,7 +789,7 @@ void Pager::changeDesktop(int newDesktop
QPixmap Pager::shadowText(const QString &text)
{
- QColor textColor = m_pagerStyle["textColor"].value<QColor>();
+ QColor textColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor);
return Plasma::PaintUtils::shadowText(text,
KGlobalSettings::smallestReadableFont(),
++++++ plasma-branding-defaults-applets.diff ++++++
Index: plasma/desktop/applets/kickoff/applet/applet.cpp
===================================================================
--- plasma/desktop/applets/kickoff/applet/applet.cpp.orig
+++ plasma/desktop/applets/kickoff/applet/applet.cpp
@@ -27,6 +27,7 @@
#include
#include
#include
+#include <QFile>
// KDE
#include <KAuthorized>
@@ -191,7 +192,10 @@ void LauncherApplet::toolTipAboutToShow(
void LauncherApplet::configChanged()
{
KConfigGroup cg = config();
- setPopupIcon(cg.readEntry("icon", "start-here-kde"));
+ if (QFile::exists("/usr/share/icons/oxygen/scalable/places/start-here-branding.svg"))
+ setPopupIcon(cg.readEntry("icon", "start-here-branding"));
+ else
+ setPopupIcon(cg.readEntry("icon", "start-here-kde"));
constraintsEvent(Plasma::ImmutableConstraint);
if (d->launcher) {
@@ -210,7 +214,12 @@ void LauncherApplet::configAccepted()
d->createLauncher();
KConfigGroup cg = config();
- const QString oldIcon = cg.readEntry("icon", "start-here-kde");
+ QString oldIcon;
+ if (QFile::exists("/usr/share/icons/oxygen/scalable/places/start-here-branding.svg"))
+ oldIcon = cg.readEntry("icon", "start-here-branding");
+ else
+ oldIcon = cg.readEntry("icon", "start-here-kde");
+
if (!iconname.isEmpty() && iconname != oldIcon) {
cg.writeEntry("icon", iconname);
Index: plasma/desktop/applets/kickoff/core/favoritesmodel.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/favoritesmodel.cpp.orig
+++ plasma/desktop/applets/kickoff/core/favoritesmodel.cpp
@@ -167,6 +167,11 @@ FavoritesModel::~FavoritesModel()
void FavoritesModel::add(const QString& url)
{
+ KService::Ptr service = KService::serviceByStorageId(url);
+ if (!service) {
+ return;
+ }
+
Private::globalFavoriteList << url;
Private::globalFavoriteSet << url;
Index: plasma/desktop/applets/kickoff/core/models.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/models.cpp.orig
+++ plasma/desktop/applets/kickoff/core/models.cpp
@@ -177,7 +177,19 @@ QStringList Kickoff::systemApplicationLi
{
KConfigGroup appsGroup = componentData().config()->group("SystemApplications");
QStringList apps;
- apps << "systemsettings";
+
+ if (QFile::exists("/usr/share/applications/YaST.desktop"))
+ apps << "YaST.desktop";
+
+ if (QFile::exists("/usr/share/applications/package-manager.desktop"))
+ apps << "package-manager.desktop";
+
+ if (QFile::exists("/usr/share/applications/kde4/kinfocenter.desktop"))
+ apps << "kinfocenter.desktop";
+
+ if (KService::serviceByStorageId("YaST2/live-installer.desktop"))
+ apps << "YaST2/live-installer.desktop";
+
apps = appsGroup.readEntry("DesktopFiles", apps);
return apps;
}
Index: plasma/desktop/applets/kickoff/core/systemmodel.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/systemmodel.cpp.orig
+++ plasma/desktop/applets/kickoff/core/systemmodel.cpp
@@ -71,7 +71,7 @@ public:
connect(placesModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
q, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
- topLevelSections << i18n("Applications")
+ topLevelSections << i18n("Administration")
<< i18n("Places")
<< i18n("Removable Storage")
<< i18n("Storage");
Index: plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
===================================================================
--- plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp.orig
+++ plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
@@ -36,6 +36,7 @@
#include
#include
#include
+#include <QFile>
// KDE Libs
#include <KActionCollection>
@@ -305,7 +306,10 @@ MenuLauncherApplet::MenuLauncherApplet(Q
d->viewtypes << "RunCommand";
}
d->viewtypes << "Leave";
- d->iconname = "start-here-kde";
+ if (QFile::exists("/usr/share/icons/oxygen/scalable/places/start-here-branding.svg"))
+ d->iconname = "start-here-branding";
+ else
+ d->iconname = "start-here-kde";
}
}
d->formattype = NameDescription;
++++++ plasma-dashboard-leave.diff ++++++
Index: plasma/desktop/shell/dashboardview.cpp
===================================================================
--- plasma/desktop/shell/dashboardview.cpp.orig
+++ plasma/desktop/shell/dashboardview.cpp
@@ -225,6 +225,15 @@ bool DashboardView::eventFilter(QObject
widgetExplorer->setPos(0, containment()->geometry().height() - widgetExplorer->geometry().height());
}
+ if (watched != (QObject*)m_widgetExplorer.data()) {
+ if (event->type() == QEvent::MouseButtonPress) {
+ QMouseEvent *me = static_cast(event);
+ if (me->button() == Qt::LeftButton) {
+ hideView();
+ }
+ }
+ }
+
return false;
}
++++++ plasma-disable-networkmanager.diff ++++++
commit dda8f95f9d810cf3f14f7be410bb612b1c6c0744
Author: Stephan Kulow
Date: Thu Oct 13 15:36:58 2011 +0200
openSUSE has NetworkManager installed on all installations, but doesn't
necessarly run it. While checking for some dbus interface might be
the better solution, it's also the more fragile one because NM might
still startup or be down just the second we check the default applets.
So simply make it possible to disable it on KDE start depending on sysconfig
and if the system changes, the user is expected to reconfigure plasma too
Index: kde-workspace-4.8.5/plasma/generic/applets/systemtray/ui/applet.cpp
===================================================================
--- kde-workspace-4.8.5.orig/plasma/generic/applets/systemtray/ui/applet.cpp
+++ kde-workspace-4.8.5/plasma/generic/applets/systemtray/ui/applet.cpp
@@ -706,7 +706,7 @@ void Applet::checkDefaultApplets()
QStringList applets = s_manager->applets(this);
- if (!applets.contains("org.kde.networkmanagement")) {
+ if (!applets.contains("org.kde.networkmanagement") && !getenv("KDE_NETWORKMANAGER_DISABLED")) {
s_manager->addApplet("org.kde.networkmanagement", this);
}
++++++ plasma-kickoff-newly-collapsing.diff ++++++
++++ 779 lines (skipped)
++++++ plasma-panel-resize-hint.diff ++++++
Index: plasma/desktop/shell/panelcontroller.cpp
===================================================================
--- plasma/desktop/shell/panelcontroller.cpp.orig
+++ plasma/desktop/shell/panelcontroller.cpp
@@ -663,6 +663,8 @@ void PanelController::mouseMoveFilter(QM
newX = qMin(newX, screenGeom.left() + screenGeom.width()/3);
move(newX, pos().y());
resizeFrameHeight(geometry().left() - screenGeom.left());
+ m_sizeTool->setText(i18n("Width: %1", geometry().left() - screenGeom.left()));
+
break;
}
case Plasma::RightEdge: {
@@ -671,6 +673,8 @@ void PanelController::mouseMoveFilter(QM
newX = qMax(newX, screenGeom.left() + 2*(screenGeom.width()/3) - width());
move(newX, pos().y());
resizeFrameHeight(screenGeom.right() - geometry().right());
+ m_sizeTool->setText(i18n("Width: %1", screenGeom.right() - geometry().right()));
+
break;
}
case Plasma::TopEdge: {
@@ -679,6 +683,9 @@ void PanelController::mouseMoveFilter(QM
newY = qMin(newY, screenGeom.top() + screenGeom.height()/3);
move(pos().x(), newY);
resizeFrameHeight(geometry().top() - screenGeom.top());
+ m_sizeTool->setText(i18n("Height: %1", geometry().top() - screenGeom.top()));
+
+
break;
}
case Plasma::BottomEdge:
@@ -688,6 +695,8 @@ void PanelController::mouseMoveFilter(QM
newY = qMax(newY, screenGeom.top() + 2*(screenGeom.height()/3) - height());
move(pos().x(), newY);
resizeFrameHeight(screenGeom.bottom() - geometry().bottom());
+ m_sizeTool->setText(i18n("Height: %1", screenGeom.bottom() - geometry().bottom()));
+
break;
}
}
++++++ rcksysguardd ++++++
#!/bin/sh
# Copyright (c) 1995-2009 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author:
#
# /etc/init.d/ksysguardd
#
# and it's symbolic link
#
# /usr/sbin/rcksysguardd
#
### BEGIN INIT INFO
# Provides: ksysguardd
# Required-Start: $remote_fs $syslog
# Should-Start:
# Required-Stop: $remote_fs $syslog
# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start KDE ksysguard daemon to allow system monitoring
# Short-Description: KDE ksysguard daemon
### END INIT INFO
# Check for missing binaries (stale symlinks should not happen)
KSYSGUARDD_BIN=/usr/bin/ksysguardd
test -x $KSYSGUARDD_BIN || { echo "$KSYSGUARDD_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
# rc_splash arg sets the boot splash screen to arg (if active)
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting KDE ksysguard daemon (ksysguardd)"
startproc $KSYSGUARDD_BIN -d
rc_status -v
;;
stop)
echo -n "Shutting down KDE ksysguard daemon (ksysguardd)"
killproc -TERM $KSYSGUARDD_BIN
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
force-reload)
echo -n "Reload KDE ksysguard daemon (ksysguardd)"
$0 stop && $0 start
rc_status
;;
reload)
echo -n "Reload KDE ksysguard daemon (ksysguardd)"
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for KDE ksysguard daemon (ksysguardd): "
checkproc $KSYSGUARDD_BIN
rc_status -v
;;
probe)
## Optional: Probe for the necessity of a reload,
## give out the argument which is required for a reload.
test /etc/ksysguarddrc -nt $KSYSGUARDD_PIDFILE && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit
++++++ rotate-wacom-pointers.diff ++++++
Index: kcontrol/randr/randrscreen.cpp
===================================================================
--- kcontrol/randr/randrscreen.cpp.orig
+++ kcontrol/randr/randrscreen.cpp
@@ -543,6 +543,8 @@ bool RandRScreen::applyProposed(bool con
if (succeed && confirm)
succeed = RandR::confirm(r);
+ RandR::rotateWacom( m_unifiedRotation );
+
// if we succeeded applying and the user confirmed the changes,
// just return from here
if (succeed)
Index: kcontrol/randr/randr.h
===================================================================
--- kcontrol/randr/randr.h.orig
+++ kcontrol/randr/randr.h
@@ -104,6 +104,7 @@ public:
static bool confirm(const QRect &rect = QRect());
static SizeList sortSizes(const SizeList &sizes);
+ static void rotateWacom( int rotation );
};
#endif
Index: kcontrol/randr/legacyrandrscreen.cpp
===================================================================
--- kcontrol/randr/legacyrandrscreen.cpp.orig
+++ kcontrol/randr/legacyrandrscreen.cpp
@@ -104,6 +104,7 @@ bool LegacyRandRScreen::applyProposed()
m_currentSize = m_proposedSize;
m_currentRotation = m_proposedRotation;
m_currentRefreshRate = m_proposedRefreshRate;
+ RandR::rotateWacom( m_currentRotation );
return true;
}
Index: kcontrol/randr/randrcrtc.cpp
===================================================================
--- kcontrol/randr/randrcrtc.cpp.orig
+++ kcontrol/randr/randrcrtc.cpp
@@ -317,6 +317,7 @@ bool RandRCrtc::applyProposed()
m_currentRect = m_proposedRect;
m_currentRate = mode.refreshRate();
emit crtcChanged(m_id, RandR::ChangeMode);
+ RandR::rotateWacom( m_currentRotation );
ret = true;
}
else
Index: kcontrol/randr/randr.cpp
===================================================================
--- kcontrol/randr/randr.cpp.orig
+++ kcontrol/randr/randr.cpp
@@ -19,6 +19,8 @@
#include "randr.h"
#include <KIconLoader>
+#include
+#include
bool RandR::has_1_2 = false;
bool RandR::has_1_3 = false;
@@ -179,5 +181,40 @@ SizeList RandR::sortSizes(const SizeList
return sorted;
}
+void RandR::rotateWacom( int rotation )
+{
+ // search wacom utility and set orientation for available wacom pointers
+ QString xsetwacom = KStandardDirs::findExe("xsetwacom");
+ if (!xsetwacom.isEmpty()) {
+ QProcess proc;
+ proc.start( "xsetwacom", QStringList() << "list" );
+ if (!proc.waitForStarted() || !proc.waitForFinished()) {
+ kError("Could not ask xsetwacom for available pointers.");
+ return;
+ } else {
+ while( !proc.atEnd()) {
+ QString line = QString::fromLocal8Bit( proc.readLine());
+ QString pointer = line.split( ' ' ).first();
+ QStringList args;
+ args << "set" << pointer << "Rotate";
+ switch (rotation) {
+ case RR_Rotate_90:
+ args << "CW";
+ break;
+ case RR_Rotate_180:
+ args << "HALF";
+ break;
+ case RR_Rotate_270:
+ args << "CCW";
+ break;
+ default:
+ args << "NONE";
+ }
+ if( QProcess::execute( "xsetwacom", args ) != 0 )
+ kError("Could not set orientation for wacom pointers.");
+ }
+ }
+ }
+}
++++++ same-pam-generic-classic.diff ++++++
Subject: Use same pam config with generic plugin, to be used with fingerprint auth
From: dmueller@suse.de
Patch-upstream: no
Index: kcheckpass/checkpass_pam.c
===================================================================
--- kcheckpass/checkpass_pam.c.orig
+++ kcheckpass/checkpass_pam.c
@@ -140,12 +140,14 @@ AuthReturn Authenticate(const char *call
openlog("kcheckpass", LOG_PID, LOG_AUTH);
PAM_data.conv = conv;
- if (strcmp(method, "classic")) {
- sprintf(pservb, "%.31s-%.31s", caller, method);
- pam_service = pservb;
- } else {
+ if (strcmp(method, "classic") == 0) {
/* PAM_data.classic = 1; */
pam_service = caller;
+ } else if (strcmp(method, "generic") == 0) {
+ pam_service = caller;
+ } else {
+ sprintf(pservb, "%.31s-%.31s", caller, method);
+ pam_service = pservb;
}
pam_error = pam_start(pam_service, user, &PAM_conversation, &pamh);
if (pam_error != PAM_SUCCESS)
Index: kdm/backend/client.c
===================================================================
--- kdm/backend/client.c.orig
+++ kdm/backend/client.c
@@ -540,7 +540,8 @@ verify(GConvFunc gconv, int rootok)
#ifdef USE_PAM
pnopass = False;
- if (!strcmp(curtype, "classic")) {
+ pdata.usecur = False;
+ if (!strcmp(curtype, "classic") || !strcmp(curtype, "generic")) {
if (!gconv(GCONV_USER, 0))
return False;
if (isNoPassAllowed(curuser)) {
@@ -555,11 +556,11 @@ verify(GConvFunc gconv, int rootok)
} else {
psrv = PAMService;
}
- pdata.usecur = True;
+ if (!strcmp(curtype, "classic"))
+ pdata.usecur = True;
} else {
sprintf(psrvb, "%.31s-%.31s", PAMService, curtype);
psrv = psrvb;
- pdata.usecur = False;
}
pdata.gconv = gconv;
if (!doPAMAuth(psrv, &pdata))
Index: libs/kdm/kgreet_generic.cpp
===================================================================
--- libs/kdm/kgreet_generic.cpp.orig
+++ libs/kdm/kgreet_generic.cpp
@@ -156,6 +156,7 @@ KGenericGreeter::textPrompt(const char *
exp =
exp >= 0 ||
func != Authenticate ||
+ !echo ||
!(kgreeterplugin_info.flags & KGreeterPluginInfo::Presettable);
if (!exp && !fixedUser.isEmpty()) {
@@ -325,8 +326,7 @@ static bool init(const QString &,
echoMode = getConf(ctx, "EchoMode", QVariant(-1)).toInt();
// Fielded entities are not supported per se.
// This implies that the first field is the presettable entity, if any.
- if (getConf(ctx, "generic.Presettable", QVariant(false)).toBool())
- kgreeterplugin_info.flags |= KGreeterPluginInfo::Presettable;
+ kgreeterplugin_info.flags |= KGreeterPluginInfo::Presettable;
KGlobal::locale()->insertCatalog("kgreet_generic");
return true;
}
++++++ startkde.diff ++++++
Index: startkde.cmake
===================================================================
--- startkde.cmake.orig
+++ startkde.cmake
@@ -68,6 +68,9 @@ test -n "$KDEHOME" && kdehome=`echo "$KD
mkdir -m 700 -p $kdehome
mkdir -m 700 -p $kdehome/share
mkdir -m 700 -p $kdehome/share/config
+if test -e /etc/kde4/share/config/startupconfigkeys ; then
+cp /etc/kde4/share/config/startupconfigkeys $kdehome/share/config/startupconfigkeys
+else
cat >$kdehome/share/config/startupconfigkeys <
#include
+#define _DBUS_PROPERTIES_IFACE "org.freedesktop.DBus.Properties"
+#define _DBUS_PROPERTIES_GET "Get"
+
+#define DBUS_PROPERTIES_IFACE QLatin1String(_DBUS_PROPERTIES_IFACE)
+#define DBUS_PROPERTIES_GET QLatin1String(_DBUS_PROPERTIES_GET)
+
+#define _SYSTEMD_SERVICE "org.freedesktop.login1"
+#define _SYSTEMD_BASE_PATH "/org/freedesktop/login1"
+#define _SYSTEMD_MANAGER_IFACE _SYSTEMD_SERVICE ".Manager"
+#define _SYSTEMD_SESSION_BASE_PATH _SYSTEMD_BASE_PATH "/Session"
+#define _SYSTEMD_SEAT_IFACE _SYSTEMD_SERVICE ".Seat"
+#define _SYSTEMD_SEAT_BASE_PATH _SYSTEMD_BASE_PATH "/Seat"
+#define _SYSTEMD_SESSION_IFACE _SYSTEMD_SERVICE ".Session"
+#define _SYSTEMD_USER_PROPERTY "User"
+#define _SYSTEMD_SEAT_PROPERTY "Seat"
+#define _SYSTEMD_SESSIONS_PROPERTY "Sessions"
+#define _SYSTEMD_SWITCH_PROPERTY "Activate"
+
+#define SYSTEMD_SERVICE QLatin1String(_SYSTEMD_SERVICE)
+#define SYSTEMD_BASE_PATH QLatin1String(_SYSTEMD_BASE_PATH)
+#define SYSTEMD_MANAGER_IFACE QLatin1String(_SYSTEMD_MANAGER_IFACE)
+#define SYSTEMD_SESSION_BASE_PATH QLatin1String(_SYSTEMD_SESSION_BASE_PATH)
+#define SYSTEMD_SEAT_IFACE QLatin1String(_SYSTEMD_SEAT_IFACE)
+#define SYSTEMD_SEAT_BASE_PATH QLatin1String(_SYSTEMD_SEAT_BASE_PATH)
+#define SYSTEMD_SESSION_IFACE QLatin1String(_SYSTEMD_SESSION_IFACE)
+#define SYSTEMD_USER_PROPERTY QLatin1String(_SYSTEMD_USER_PROPERTY)
+#define SYSTEMD_SEAT_PROPERTY QLatin1String(_SYSTEMD_SEAT_PROPERTY)
+#define SYSTEMD_SESSIONS_PROPERTY QLatin1String(_SYSTEMD_SESSIONS_PROPERTY)
+#define SYSTEMD_SWITCH_CALL QLatin1String(_SYSTEMD_SWITCH_PROPERTY)
+
+struct NamedDBusObjectPath
+{
+ QString name;
+ QDBusObjectPath path;
+};
+Q_DECLARE_METATYPE(NamedDBusObjectPath)
+Q_DECLARE_METATYPE(QList<NamedDBusObjectPath>)
+
+// Marshall the NamedDBusObjectPath data into a D-Bus argument
+QDBusArgument &operator<<(QDBusArgument &argument, const NamedDBusObjectPath &namedPath)
+{
+ argument.beginStructure();
+ argument << namedPath.name << namedPath.path;
+ argument.endStructure();
+ return argument;
+}
+
+// Retrieve the NamedDBusObjectPath data from the D-Bus argument
+const QDBusArgument &operator>>(const QDBusArgument &argument, NamedDBusObjectPath &namedPath)
+{
+ argument.beginStructure();
+ argument >> namedPath.name >> namedPath.path;
+ argument.endStructure();
+ return argument;
+}
+
+struct NumberedDBusObjectPath
+{
+ uint num;
+ QDBusObjectPath path;
+};
+Q_DECLARE_METATYPE(NumberedDBusObjectPath)
+
+// Marshall the NumberedDBusObjectPath data into a D-Bus argument
+QDBusArgument &operator<<(QDBusArgument &argument, const NumberedDBusObjectPath &numberedPath)
+{
+ argument.beginStructure();
+ argument << numberedPath.num << numberedPath.path;
+ argument.endStructure();
+ return argument;
+}
+
+// Retrieve the NumberedDBusObjectPath data from the D-Bus argument
+const QDBusArgument &operator>>(const QDBusArgument &argument, NumberedDBusObjectPath &numberedPath)
+{
+ argument.beginStructure();
+ argument >> numberedPath.num >> numberedPath.path;
+ argument.endStructure();
+ return argument;
+}
+
+class SystemdManager : public QDBusInterface
+{
+public:
+ SystemdManager() :
+ QDBusInterface(
+ SYSTEMD_SERVICE,
+ SYSTEMD_BASE_PATH,
+ SYSTEMD_MANAGER_IFACE,
+ QDBusConnection::systemBus()) {}
+};
+
+class SystemdSeat : public QDBusInterface
+{
+public:
+ SystemdSeat(const QDBusObjectPath &path) :
+ QDBusInterface(
+ SYSTEMD_SERVICE,
+ path.path(),
+ SYSTEMD_SEAT_IFACE,
+ QDBusConnection::systemBus()) {}
+ /* HACK to be able to extract a(so) type from QDBus, property doesn't do the trick */
+ QList<NamedDBusObjectPath> getSessions() {
+ QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), DBUS_PROPERTIES_IFACE, DBUS_PROPERTIES_GET);
+ message << interface() << SYSTEMD_SESSIONS_PROPERTY;
+ QDBusMessage reply = QDBusConnection::systemBus().call(message);
+
+ QVariantList args = reply.arguments();
+ if (!args.isEmpty()) {
+ QList<NamedDBusObjectPath> namedPathList = qdbus_cast< QList<NamedDBusObjectPath> >(args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>());
+ return namedPathList;
+ }
+ return QList<NamedDBusObjectPath>();
+ }
+};
+
+class SystemdSession : public QDBusInterface
+{
+public:
+ SystemdSession(const QDBusObjectPath &path) :
+ QDBusInterface(
+ SYSTEMD_SERVICE,
+ path.path(),
+ SYSTEMD_SESSION_IFACE,
+ QDBusConnection::systemBus()) {}
+ /* HACK to be able to extract (so) type from QDBus, property doesn't do the trick */
+ NamedDBusObjectPath getSeat() {
+ QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), DBUS_PROPERTIES_IFACE, DBUS_PROPERTIES_GET);
+ message << interface() << SYSTEMD_SEAT_PROPERTY;
+ QDBusMessage reply = QDBusConnection::systemBus().call(message);
+
+ QVariantList args = reply.arguments();
+ if (!args.isEmpty()) {
+ NamedDBusObjectPath namedPath;
+ args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>() >> namedPath;
+ return namedPath;
+ }
+ return NamedDBusObjectPath();
+ }
+ NumberedDBusObjectPath getUser() {
+ QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), DBUS_PROPERTIES_IFACE, DBUS_PROPERTIES_GET);
+ message << interface() << SYSTEMD_USER_PROPERTY;
+ QDBusMessage reply = QDBusConnection::systemBus().call(message);
+
+ QVariantList args = reply.arguments();
+ if (!args.isEmpty()) {
+ NumberedDBusObjectPath numberedPath;
+ args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>() >> numberedPath;
+ return numberedPath;
+ }
+ return NumberedDBusObjectPath();
+ }
+ void getSessionLocation(SessEnt &se)
+ {
+ se.tty = (property("Type").toString() != QLatin1String("x11"));
+ se.display = property(se.tty ? "TTY" : "Display").toString();
+ se.vt = property("VTNr").toInt();
+ }
+};
+
class CKManager : public QDBusInterface
{
public:
@@ -68,9 +228,26 @@
CKSession(const QDBusObjectPath &path) :
QDBusInterface(
QLatin1String("org.freedesktop.ConsoleKit"),
- path.path(),
+ path.path(),
QLatin1String("org.freedesktop.ConsoleKit.Session"),
QDBusConnection::systemBus()) {}
+ void getSessionLocation(SessEnt &se)
+ {
+ QString tty;
+ QDBusReply<QString> r = call(QLatin1String("GetX11Display"));
+ if (r.isValid() && !r.value().isEmpty()) {
+ QDBusReply<QString> r2 = call(QLatin1String("GetX11DisplayDevice"));
+ tty = r2.value();
+ se.display = r.value();
+ se.tty = false;
+ } else {
+ QDBusReply<QString> r2 = call(QLatin1String("GetDisplayDevice"));
+ tty = r2.value();
+ se.display = tty;
+ se.tty = true;
+ }
+ se.vt = tty.mid(strlen("/dev/tty")).toInt();
+ }
};
class GDMFactory : public QDBusInterface
@@ -114,6 +291,10 @@
{
const char *ptr;
struct sockaddr_un sa;
+
+ qDBusRegisterMetaType<NamedDBusObjectPath>();
+ qDBusRegisterMetaType();
+ qDBusRegisterMetaType<NumberedDBusObjectPath>();
if (DMType == Dunno) {
if (!(dpy = ::getenv("DISPLAY")))
@@ -242,17 +423,31 @@
static bool getCurrentSeat(QDBusObjectPath *currentSession, QDBusObjectPath *currentSeat)
{
- CKManager man;
- QDBusReply<QDBusObjectPath> r = man.call(QLatin1String("GetCurrentSession"));
+ SystemdManager man;
+ QDBusReply<QDBusObjectPath> r = man.call(QLatin1String("GetSessionByPID"), (uint) QCoreApplication::applicationPid());
if (r.isValid()) {
- CKSession sess(r.value());
+ SystemdSession sess(r.value());
if (sess.isValid()) {
- QDBusReply<QDBusObjectPath> r2 = sess.call(QLatin1String("GetSeatId"));
- if (r2.isValid()) {
- if (currentSession)
- *currentSession = r.value();
- *currentSeat = r2.value();
- return true;
+ NamedDBusObjectPath namedPath = sess.getSeat();
+ if (currentSession)
+ *currentSession = r.value();
+ *currentSeat = namedPath.path;
+ return true;
+ }
+ }
+ else {
+ CKManager man;
+ QDBusReply<QDBusObjectPath> r = man.call(QLatin1String("GetCurrentSession"));
+ if (r.isValid()) {
+ CKSession sess(r.value());
+ if (sess.isValid()) {
+ QDBusReply<QDBusObjectPath> r2 = sess.call(QLatin1String("GetSeatId"));
+ if (r2.isValid()) {
+ if (currentSession)
+ *currentSession = r.value();
+ *currentSeat = r2.value();
+ return true;
+ }
}
}
}
@@ -261,35 +456,30 @@
static QList<QDBusObjectPath> getSessionsForSeat(const QDBusObjectPath &path)
{
- CKSeat seat(path);
- if (seat.isValid()) {
- QDBusReply r = seat.call(QLatin1String("GetSessions"));
- if (r.isValid()) {
- // This will contain only local sessions:
- // - this is only ever called when isSwitchable() is true => local seat
- // - remote logins into the machine are assigned to other seats
- return r.value();
+ if (path.path().startsWith(SYSTEMD_BASE_PATH)) { // systemd path incoming
+ SystemdSeat seat(path);
+ if (seat.isValid()) {
+ QList<NamedDBusObjectPath> r = seat.getSessions();
+ QList<QDBusObjectPath> result;
+ foreach (const NamedDBusObjectPath &namedPath, r)
+ result.append(namedPath.path);
+ // This pretty much can't contain any other than local sessions as the seat is retrieved from the current session
+ return result;
+ }
+ }
+ else if (path.path().startsWith("/org/freedesktop/ConsoleKit")) {
+ CKSeat seat(path);
+ if (seat.isValid()) {
+ QDBusReply r = seat.call(QLatin1String("GetSessions"));
+ if (r.isValid()) {
+ // This will contain only local sessions:
+ // - this is only ever called when isSwitchable() is true => local seat
+ // - remote logins into the machine are assigned to other seats
+ return r.value();
+ }
}
}
return QList<QDBusObjectPath>();
-}
-
-static void getSessionLocation(CKSession &lsess, SessEnt &se)
-{
- QString tty;
- QDBusReply<QString> r = lsess.call(QLatin1String("GetX11Display"));
- if (r.isValid() && !r.value().isEmpty()) {
- QDBusReply<QString> r2 = lsess.call(QLatin1String("GetX11DisplayDevice"));
- tty = r2.value();
- se.display = r.value();
- se.tty = false;
- } else {
- QDBusReply<QString> r2 = lsess.call(QLatin1String("GetDisplayDevice"));
- tty = r2.value();
- se.display = tty;
- se.tty = true;
- }
- se.vt = tty.mid(strlen("/dev/tty")).toInt();
}
#ifndef KDM_NO_SHUTDOWN
@@ -297,8 +487,13 @@
KDisplayManager::canShutdown()
{
if (DMType == NewGDM || DMType == NoDM || DMType == LightDM) {
+ QDBusReply<QString> canPowerOff = SystemdManager().call(QLatin1String("CanPowerOff"));
+ if (canPowerOff.isValid())
+ return canPowerOff.value() != QLatin1String("no");
QDBusReply<bool> canStop = CKManager().call(QLatin1String("CanStop"));
- return (canStop.isValid() && canStop.value());
+ if (canStop.isValid())
+ return canStop.value();
+ return false;
}
if (DMType == OldKDM)
@@ -329,9 +524,21 @@
return;
if (DMType == NewGDM || DMType == NoDM || DMType == LightDM) {
- // FIXME: entirely ignoring shutdownMode
- CKManager().call(QLatin1String(
- shutdownType == KWorkSpace::ShutdownTypeReboot ? "Restart" : "Stop"));
+ // systemd supports only 2 modes:
+ // * interactive = true: brings up a PolicyKit prompt if other sessions are active
+ // * interactive = false: rejects the shutdown if other sessions are active
+ // There are no schedule or force modes.
+ // We try to map our 4 shutdown modes in the sanest way.
+ bool interactive = (shutdownMode == KWorkSpace::ShutdownModeInteractive
+ || shutdownMode == KWorkSpace::ShutdownModeForceNow);
+ QDBusReply<QString> check = SystemdManager().call(QLatin1String(
+ shutdownType == KWorkSpace::ShutdownTypeReboot ? "Reboot" : "PowerOff"), interactive);
+ if (!check.isValid()) {
+ // FIXME: entirely ignoring shutdownMode
+ CKManager().call(QLatin1String(
+ shutdownType == KWorkSpace::ShutdownTypeReboot ? "Restart" : "Stop"));
+ // if even CKManager call fails, there is nothing more to be done
+ }
return;
}
@@ -406,9 +613,15 @@
if (DMType == NewGDM || DMType == LightDM) {
QDBusObjectPath currentSeat;
if (getCurrentSeat(0, ¤tSeat)) {
- CKSeat seat(currentSeat);
- if (seat.isValid()) {
- QDBusReply<bool> r = seat.call(QLatin1String("CanActivateSessions"));
+ SystemdSeat SDseat(currentSeat);
+ if (SDseat.isValid()) {
+ QVariant prop = SDseat.property("CanMultiSession");
+ if (prop.isValid())
+ return prop.toBool();
+ }
+ CKSeat CKseat(currentSeat);
+ if (CKseat.isValid()) {
+ QDBusReply<bool> r = CKseat.call(QLatin1String("CanActivateSessions"));
if (r.isValid())
return r.value();
}
@@ -468,22 +681,56 @@
if (DMType == NewGDM || DMType == LightDM) {
QDBusObjectPath currentSession, currentSeat;
if (getCurrentSeat(¤tSession, ¤tSeat)) {
- foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
- CKSession lsess(sp);
- if (lsess.isValid()) {
- SessEnt se;
- getSessionLocation(lsess, se);
- // "Warning: we haven't yet defined the allowed values for this property.
- // It is probably best to avoid this until we do."
- QDBusReply<QString> r = lsess.call(QLatin1String("GetSessionType"));
- if (r.value() != QLatin1String("LoginWindow")) {
- QDBusReply<unsigned> r2 = lsess.call(QLatin1String("GetUnixUser"));
- se.user = KUser(K_UID(r2.value())).loginName();
- se.session = "<unknown>";
+ // we'll divide the code in two branches to reduce the overhead of calls to non-existent services
+ // systemd part // preferred
+ if (QDBusConnection::systemBus().interface()->isServiceRegistered(SYSTEMD_SERVICE)) {
+ foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
+ SystemdSession lsess(sp);
+ if (lsess.isValid()) {
+ SessEnt se;
+ lsess.getSessionLocation(se);
+ if ((lsess.property("Class").toString() != QLatin1String("greeter")) &&
+ (lsess.property("State").toString() == QLatin1String("online") ||
+ lsess.property("State").toString() == QLatin1String("active"))) {
+ NumberedDBusObjectPath numberedPath = lsess.getUser();
+ se.display = lsess.property("Display").toString();
+ se.vt = lsess.property("VTNr").toInt();
+ se.user = KUser(K_UID(numberedPath.num)).loginName();
+ /* TODO:
+ * regarding the session name in this, it IS possible to find it out - logind tracks the session leader PID
+ * the problem is finding out the name of the process, I could come only with reading /proc/PID/comm which
+ * doesn't seem exactly... right to me --mbriza
+ */
+ se.session = "<unknown>";
+ se.self = lsess.property("Display").toString() == ::getenv("DISPLAY"); /* Bleh once again */
+ se.tty = !lsess.property("TTY").toString().isEmpty();
+ }
+ list.append(se);
}
- se.self = (sp == currentSession);
- list.append(se);
}
+ }
+ // ConsoleKit part
+ else if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.freedesktop.ConsoleKit")) {
+ foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
+ CKSession lsess(sp);
+ if (lsess.isValid()) {
+ SessEnt se;
+ lsess.getSessionLocation(se);
+ // "Warning: we haven't yet defined the allowed values for this property.
+ // It is probably best to avoid this until we do."
+ QDBusReply<QString> r = lsess.call(QLatin1String("GetSessionType"));
+ if (r.value() != QLatin1String("LoginWindow")) {
+ QDBusReply<unsigned> r2 = lsess.call(QLatin1String("GetUnixUser"));
+ se.user = KUser(K_UID(r2.value())).loginName();
+ se.session = "<unknown>";
+ }
+ se.self = (sp == currentSession);
+ list.append(se);
+ }
+ }
+ }
+ else {
+ return false;
}
return true;
}
@@ -566,16 +813,33 @@
if (DMType == NewGDM || DMType == LightDM) {
QDBusObjectPath currentSeat;
if (getCurrentSeat(0, ¤tSeat)) {
- foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
- CKSession lsess(sp);
- if (lsess.isValid()) {
- SessEnt se;
- getSessionLocation(lsess, se);
- if (se.vt == vt) {
- if (se.tty) // ConsoleKit simply ignores these
- return false;
- lsess.call(QLatin1String("Activate"));
- return true;
+ // systemd part // preferred
+ if (QDBusConnection::systemBus().interface()->isServiceRegistered(SYSTEMD_SERVICE)) {
+ foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
+ SystemdSession lsess(sp);
+ if (lsess.isValid()) {
+ SessEnt se;
+ lsess.getSessionLocation(se);
+ if (se.vt == vt) {
+ lsess.call(SYSTEMD_SWITCH_CALL);
+ return true;
+ }
+ }
+ }
+ }
+ // ConsoleKit part
+ else if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.freedesktop.ConsoleKit")) {
+ foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
+ CKSession lsess(sp);
+ if (lsess.isValid()) {
+ SessEnt se;
+ lsess.getSessionLocation(se);
+ if (se.vt == vt) {
+ if (se.tty) // ConsoleKit simply ignores these
+ return false;
+ lsess.call(QLatin1String("Activate"));
+ return true;
+ }
}
}
}
++++++ systemsettings-desktop.diff ++++++
Index: systemsettings/app/systemsettings.desktop
===================================================================
--- systemsettings/app/systemsettings.desktop.orig
+++ systemsettings/app/systemsettings.desktop
@@ -6,7 +6,7 @@ X-DocPath=systemsettings/index.html
X-KDE-StartupNotify=true
OnlyShowIn=KDE;
-GenericName=System Settings
+GenericName=Configure Desktop
GenericName[ar]=إعدادات النظام
GenericName[ast]=Preferencies del sistema
GenericName[be@latin]=Systemnyja nałady
@@ -88,7 +88,7 @@ GenericName[x-test]=xxSystem Settingsxx
GenericName[zh_CN]=系统设置
GenericName[zh_TW]=系統設定
-Name=System Settings
+Name=Configure Desktop
Name[ar]=إعدادات النظام
Name[ast]=Preferencies del sistema
Name[be]=Сістэмныя настаўленні
@@ -175,4 +175,4 @@ Name[zh_CN]=系统设置
Name[zh_TW]=系統設定
X-DBUS-StartupType=Unique
-Categories=Qt;KDE;Settings;
+Categories=Qt;KDE;Settings;X-SuSE-core;Qt;Core;
Index: systemsettings/app/kdesystemsettings.desktop
===================================================================
--- systemsettings/app/kdesystemsettings.desktop.orig
+++ systemsettings/app/kdesystemsettings.desktop
@@ -99,4 +99,4 @@ Name[zh_CN]=KDE 系统设置
Name[zh_TW]=KDE 系統設定
X-DBUS-StartupType=Unique
-Categories=Qt;KDE;Settings;
+Categories=Qt;KDE;Settings;X-SuSE-core;Qt;Core;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org