summaryrefslogtreecommitdiff
path: root/community/cinnamon-screensaver
diff options
context:
space:
mode:
Diffstat (limited to 'community/cinnamon-screensaver')
-rw-r--r--community/cinnamon-screensaver/PKGBUILD53
-rw-r--r--community/cinnamon-screensaver/cinnamon-screensaver.desktop11
-rw-r--r--community/cinnamon-screensaver/cinnamon-screensaver.pam3
-rw-r--r--community/cinnamon-screensaver/cinnamon2d-screensaver.desktop11
-rw-r--r--community/cinnamon-screensaver/fix-dbus-compatibility.patch149
5 files changed, 227 insertions, 0 deletions
diff --git a/community/cinnamon-screensaver/PKGBUILD b/community/cinnamon-screensaver/PKGBUILD
new file mode 100644
index 000000000..c4c00ab0a
--- /dev/null
+++ b/community/cinnamon-screensaver/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
+# Based on gnome-screensaver package:
+# Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Jan de Groot <jgc@archlinux.org>
+
+pkgname=cinnamon-screensaver
+pkgver=1.8.0
+pkgrel=1
+pkgdesc="Screensaver designed to integrate well with the Cinnamon desktop."
+arch=('i686' 'x86_64')
+license=('GPL')
+url="https://github.com/linuxmint/cinnamon-screensaver"
+backup=(etc/pam.d/cinnamon-screensaver)
+depends=('cinnamon' 'gnome-screensaver')
+makedepends=('intltool' 'gnome-common')
+options=(!emptydirs)
+source=($pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-screensaver/archive/$pkgver.tar.gz
+ cinnamon-screensaver.desktop
+ cinnamon2d-screensaver.desktop
+ cinnamon-screensaver.pam
+ fix-dbus-compatibility.patch)
+sha256sums=('e85722d5af2ecbed98f50909285b335d7635214bf8cada49964f60bb5d1339c1'
+ '2f29a72991deb5cc2b44da06f49d1115148fee6a0a22b1abfecee1c1661abcaa'
+ '335df8f2fb270484829d94995622521f0a42a12d6887f7de827db34fc81f583a'
+ 'b6ea9e2eb586d94bcabb617a8f1c2958111df87afdbb51f645882bccdc15cbda'
+ 'eebd1d056c21d2d3f60fb954677b9214fd1d575ed1c2bbb56326cedf41a39eb6')
+
+build() {
+ cd $pkgname-$pkgver
+
+
+ # Fix compatibility with gnome-screensaver's D-Bus interface and various fixes
+ patch -Np1 -i ${srcdir}/fix-dbus-compatibility.patch
+
+ ./autogen.sh --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/cinnamon-screensaver \
+ --localstatedir=/var \
+ --with-mit-ext --with-systemd
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -Dm644 ../cinnamon-screensaver.pam "$pkgdir/etc/pam.d/cinnamon-screensaver"
+
+ # Remove conflicts with gnome-screensaver
+ rm "$pkgdir"/usr/bin/gnome-screensaver{,-command}
+
+ # Autostart only in Cinnamon
+ install -m644 "$srcdir/cinnamon-screensaver.desktop" "$pkgdir/etc/xdg/autostart/cinnamon-screensaver.desktop"
+ install -m644 "$srcdir/cinnamon2d-screensaver.desktop" "$pkgdir/etc/xdg/autostart/cinnamon2d-screensaver.desktop"
+}
diff --git a/community/cinnamon-screensaver/cinnamon-screensaver.desktop b/community/cinnamon-screensaver/cinnamon-screensaver.desktop
new file mode 100644
index 000000000..75c81ca26
--- /dev/null
+++ b/community/cinnamon-screensaver/cinnamon-screensaver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Name=Cinnamon Screensaver
+Comment=Launch screensaver and locker program
+Icon=preferences-desktop-screensaver
+Exec=cinnamon-screensaver
+OnlyShowIn=GNOME;
+AutostartCondition=GNOME3 if-session cinnamon
+NoDisplay=true
+X-GNOME-Autostart-Phase=Application
+X-GNOME-Autostart-Notify=true
diff --git a/community/cinnamon-screensaver/cinnamon-screensaver.pam b/community/cinnamon-screensaver/cinnamon-screensaver.pam
new file mode 100644
index 000000000..8d3baf085
--- /dev/null
+++ b/community/cinnamon-screensaver/cinnamon-screensaver.pam
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth substack system-login
+-auth optional pam_gnome_keyring.so
diff --git a/community/cinnamon-screensaver/cinnamon2d-screensaver.desktop b/community/cinnamon-screensaver/cinnamon2d-screensaver.desktop
new file mode 100644
index 000000000..d9d50012c
--- /dev/null
+++ b/community/cinnamon-screensaver/cinnamon2d-screensaver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Name=Cinnamon Screensaver
+Comment=Launch screensaver and locker program
+Icon=preferences-desktop-screensaver
+Exec=cinnamon-screensaver
+OnlyShowIn=GNOME;
+AutostartCondition=GNOME3 if-session cinnamon2d
+NoDisplay=true
+X-GNOME-Autostart-Phase=Application
+X-GNOME-Autostart-Notify=true
diff --git a/community/cinnamon-screensaver/fix-dbus-compatibility.patch b/community/cinnamon-screensaver/fix-dbus-compatibility.patch
new file mode 100644
index 000000000..3d70a79d0
--- /dev/null
+++ b/community/cinnamon-screensaver/fix-dbus-compatibility.patch
@@ -0,0 +1,149 @@
+From e43385126cf6f5187f98f940b8c04c3e99202b0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Thu, 28 Feb 2013 05:45:12 +0100
+Subject: [PATCH 1/4] Fix crashing and compatibility with gnome-screensaver's
+ D-Bus interface
+
+---
+ src/cinnamon-screensaver-command.c | 4 ++--
+ src/gs-listener-dbus.c | 10 ++++++++--
+ src/gs-manager.c | 14 +++++++++++---
+ 3 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/src/cinnamon-screensaver-command.c b/src/cinnamon-screensaver-command.c
+index 4267bd0..5c90916 100644
+--- a/src/cinnamon-screensaver-command.c
++++ b/src/cinnamon-screensaver-command.c
+@@ -311,11 +311,11 @@
+
+ if (do_lock) {
+ if (g_strcmp0 (away_message, "DEFAULT") == 0) {
+- reply = screensaver_send_message_string (connection, "Lock", away_message);
++ reply = screensaver_send_message_string (connection, "LockMessage", away_message);
+ }
+ else {
+ gchar * custom_message = g_strdup_printf("CUSTOM###%s", away_message);
+- reply = screensaver_send_message_string (connection, "Lock", custom_message);
++ reply = screensaver_send_message_string (connection, "LockMessage", custom_message);
+ g_free (custom_message);
+ }
+ if (reply == NULL) {
+diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
+index 2a98aee..6dbf12d 100644
+--- a/src/gs-listener-dbus.c
++++ b/src/gs-listener-dbus.c
+@@ -653,6 +653,8 @@ enum {
+ xml = g_string_append (xml,
+ " <interface name=\""GS_INTERFACE"\">\n"
+ " <method name=\"Lock\">\n"
++ " </method>\n"
++ " <method name=\"LockMessage\">\n"
+ " <arg name=\"body\" direction=\"in\" type=\"s\"/>\n"
+ " </method>\n"
+ " <method name=\"SimulateUserActivity\">\n"
+@@ -744,6 +746,10 @@ enum {
+ g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
+
+ if (dbus_message_is_method_call (message, GS_SERVICE, "Lock")) {
++ g_signal_emit (listener, signals [LOCK], 0);
++ return send_success_reply (connection, message);
++ }
++ if (dbus_message_is_method_call (message, GS_SERVICE, "LockMessage")) {
+ return listener_lock (listener, connection, message);
+ }
+ if (dbus_message_is_method_call (message, GS_SERVICE, "Quit")) {
+@@ -906,7 +912,7 @@ enum {
+ } else if (dbus_message_is_signal (message, SYSTEMD_LOGIND_SESSION_INTERFACE, "Lock")) {
+ if (_listener_message_path_is_our_session (listener, message)) {
+ gs_debug ("systemd requested session lock");
+- return listener_lock (listener, connection, message);
++ g_signal_emit (listener, signals [LOCK], 0);
+ }
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+@@ -948,7 +954,7 @@ enum {
+ } else if (dbus_message_is_signal (message, CK_SESSION_INTERFACE, "Lock")) {
+ if (_listener_message_path_is_our_session (listener, message)) {
+ gs_debug ("ConsoleKit requested session lock");
+- return listener_lock (listener, connection, message);
++ g_signal_emit (listener, signals [LOCK], 0);
+ }
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+diff --git a/src/gs-manager.c b/src/gs-manager.c
+index 1544921..bc09cb9 100644
+--- a/src/gs-manager.c
++++ b/src/gs-manager.c
+@@ -1275,10 +1275,18 @@ enum {
+ gs_manager_set_away_message (GSManager *manager,
+ const char *message)
+ {
+- g_free (manager->priv->logout_command);
+-
+- manager->priv->away_message = g_strdup(message);
+ GSList *l;
++
++ g_return_if_fail (GS_IS_MANAGER (manager));
++
++ g_free (manager->priv->away_message);
++
++ if (message) {
++ manager->priv->away_message = g_strdup (message);
++ } else {
++ manager->priv->away_message = NULL;
++ }
++
+ for (l = manager->priv->windows; l; l = l->next) {
+ gs_window_set_away_message (l->data, manager->priv->away_message);
+ }
+--
+1.8.1.6
+
+
+From 4db01451afbb246213f483805f81a77c4c7371a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Fri, 1 Mar 2013 05:17:46 +0100
+Subject: [PATCH 2/4] Update dbus document with the new LockMessage method
+
+---
+ doc/dbus-interface.html | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/doc/dbus-interface.html b/doc/dbus-interface.html
+index faff26c..c9f95ba 100644
+--- a/doc/dbus-interface.html
++++ b/doc/dbus-interface.html
+@@ -2,6 +2,8 @@
+             <code class="email">&lt;<a class="email" href="mailto:mccann@jhu.edu">mccann@jhu.edu</a>&gt;</code><br>
+           </p></div></div></div></div></div><div><p class="releaseinfo">Version 1.7.1</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#dbus-interface">1. DBUS Interface</a></span></dt><dd><dl><dt><span class="sect1"><a href="#gs-intro">Introduction</a></span></dt><dt><span class="sect1"><a href="#gs-methods">Methods</a></span></dt><dd><dl><dt><span class="sect2"><a href="#gs-method-Lock">
+ <code class="literal">Lock</code>
++ </a></span></dt><dt><span class="sect2"><a href="#gs-method-LockMessage">
++ <code class="literal">LockMessage</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-Cycle">
+ <code class="literal">Cycle</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-SimulateUserActivity">
+@@ -30,6 +32,8 @@
+ <code class="literal">AuthenticationRequestEnd</code>
+ </a></span></dt></dl></dd><dt><span class="sect1"><a href="#gs-examples">Examples</a></span></dt></dl></dd></dl></div><div class="chapter" title="Chapter 1. DBUS Interface"><div class="titlepage"><div><div><h2 class="title"><a name="dbus-interface"></a>Chapter 1. DBUS Interface</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#gs-intro">Introduction</a></span></dt><dt><span class="sect1"><a href="#gs-methods">Methods</a></span></dt><dd><dl><dt><span class="sect2"><a href="#gs-method-Lock">
+ <code class="literal">Lock</code>
++ </a></span></dt><dt><span class="sect2"><a href="#gs-method-LockMessage">
++ <code class="literal">LockMessage</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-Cycle">
+ <code class="literal">Cycle</code>
+ </a></span></dt><dt><span class="sect2"><a href="#gs-method-SimulateUserActivity">
+@@ -70,7 +74,11 @@
+ <code class="literal">Lock</code>
+ </h3></div></div></div><p>
+ Request that the screen be locked.
+- </p></div><div class="sect2" title="Cycle"><div class="titlepage"><div><div><h3 class="title"><a name="gs-method-Cycle"></a>
++ </p></div><div class="sect2" title="LockMessage"><div class="titlepage"><div><div><h3 class="title"><a name="gs-method-LockMessage"></a>
++ <code class="literal">LockMessage</code>
++ </h3></div></div></div><p>
++ Request that the screen be locked, and set an away message.
++ </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Direction</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>in</td><td>string</td><td>the away message</td></tr></tbody></table></div></div><div class="sect2" title="Cycle"><div class="titlepage"><div><div><h3 class="title"><a name="gs-method-Cycle"></a>
+ <code class="literal">Cycle</code>
+ </h3></div></div></div><p>
+ Request that the screen saver theme be restarted and, if applicable,
+--
+1.8.1.6
+