From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE47B1382C5 for ; Sat, 17 Feb 2018 01:16:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4145E089A; Sat, 17 Feb 2018 01:16:06 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D34AE089A for ; Sat, 17 Feb 2018 01:16:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 81952335C2E for ; Sat, 17 Feb 2018 01:16:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 146FD1FE for ; Sat, 17 Feb 2018 01:16:03 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1518830148.50141c4028e664727b1006319ddd44b3cc50eb31.kensington@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: kde-plasma/kscreenlocker/files/, kde-plasma/kscreenlocker/ X-VCS-Repository: proj/kde X-VCS-Files: kde-plasma/kscreenlocker/files/ck-unlock-session kde-plasma/kscreenlocker/files/kscreenlocker-consolekit-unlock.patch kde-plasma/kscreenlocker/kscreenlocker-5.12.49.9999.ebuild kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild kde-plasma/kscreenlocker/metadata.xml X-VCS-Directories: kde-plasma/kscreenlocker/files/ kde-plasma/kscreenlocker/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 50141c4028e664727b1006319ddd44b3cc50eb31 X-VCS-Branch: master Date: Sat, 17 Feb 2018 01:16:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fdffaaed-8755-4f77-abf9-1e8a710eda56 X-Archives-Hash: 339e1418b10a8af8a69785236b7e06ef commit: 50141c4028e664727b1006319ddd44b3cc50eb31 Author: Michael Palimaka gentoo org> AuthorDate: Sat Feb 17 01:13:31 2018 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Sat Feb 17 01:15:48 2018 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=50141c40 kde-plasma/kscreenlocker: add support for killing the screenlocker on consolekit Original script by Daniel Frey gmail.com>. Modifications by Lars Wendler gentoo.org>. Bug: https://bugs.gentoo.org/647576 Package-Manager: Portage-2.3.19, Repoman-2.3.6 kde-plasma/kscreenlocker/files/ck-unlock-session | 220 +++++++++++++++++++++ .../files/kscreenlocker-consolekit-unlock.patch | 13 ++ .../kscreenlocker-5.12.49.9999.ebuild | 6 +- kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild | 6 +- kde-plasma/kscreenlocker/metadata.xml | 3 + 5 files changed, 246 insertions(+), 2 deletions(-) diff --git a/kde-plasma/kscreenlocker/files/ck-unlock-session b/kde-plasma/kscreenlocker/files/ck-unlock-session new file mode 100644 index 0000000000..6ce6935b06 --- /dev/null +++ b/kde-plasma/kscreenlocker/files/ck-unlock-session @@ -0,0 +1,220 @@ +#!/bin/sh + +# This script is to make unlocking using OpenRC/Consolekit easier when the KDE Screenlocker breaks. +# +# Version: 0.2 +# Date written: February 2, 2018 +# Last modification: February 17, 2018 +# +# Copyright (C) 2018 Daniel Frey +# Copyright (C) 2018 Lars Wendler +# +# This script is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This script is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# +# Some notes: +# -The switch processing/argument handling is very basic. +# -This script assumes session names start with "Session" when listing +# sessions. This is settable via a variable. +# +# Possible actions: +# -h : Show help screen +# -l : List current consolekit sessions +# -u : Unlock specified session (one parameter required - the session name) +# -a : Attempt to unlock all sessions + +# Return code documentation +# +# 0: Script executed normally +# 1: Root access is not present for script +# 2: No arguments passed +# 3: Multiple actions requested, can only do one at a time +# 4: Argument passed was not recognized +# 5: Multiple arguments passed for unlock single session, only one needed +# 6: The argument required for unlocksession() is missing (internal error) + +SCRIPTNAME="$(basename $0)" + +# Return code constants +readonly ERR_NORMAL_OPERATION=0 +readonly ERR_NO_ROOT=1 +readonly ERR_NO_ARGS=2 +readonly ERR_TOO_MANY_ACTIONS=3 +readonly ERR_INVALID_ARGUMENTS=4 +readonly ERR_TOO_MANY_ARGS=5 +readonly ERR_INTERNAL_ARG_MISSING=6 + +# Action parameter constants +readonly ACTION_NONE=0 +readonly ACTION_HELP=1 +readonly ACTION_LIST=2 +readonly ACTION_UNLOCKALL=3 +readonly ACTION_UNLOCK=4 + +# This is what's used to look for a session via consolekit. +# By default, assume it is prefixed with "Session". +SESSION_SEARCH_PREFIX="Session" + +# Check to make sure script has root access, if not... abort now! +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root." + exit ${ERR_NO_ROOT} +fi + +showhelp() { + cat <kde@gentoo.org Gentoo KDE Project + + Add support for killing the screenlocker when sys-auth/consolekit is the session tracker +