Bug 499442 - Kdesktop_lock does not work on multiuser systems and for single user with multiple login
Kdesktop_lock does not work on multiuser systems and for single user with mul...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kdebase (Show other bugs)
5.3
All Linux
high Severity high
: rc
: ---
Assigned To: Lukáš Tinkl
desktop-bugs@redhat.com
:
: 498990 (view as bug list)
Depends On:
Blocks: 499522
  Show dependency treegraph
 
Reported: 2009-05-06 13:00 EDT by Aron Parsons
Modified: 2015-07-13 13:36 EDT (History)
15 users (show)

See Also:
Fixed In Version: kdebase-3.5.4-22.el5
Doc Type: Bug Fix
Doc Text:
Previously, the 'kdesktop_lock' process did not run on multi-user systems when another user had already ran an instance of 'kdesktop_lock'. This update allows 'kdesktop_lock' to work on multi-user systems when multiple single users are logged in.
Story Points: ---
Clone Of: 493268
Environment:
Last Closed: 2010-10-27 12:50:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch (639 bytes, patch)
2009-09-07 12:05 EDT, ritz
no flags Details | Diff

  None (edit)
Description Aron Parsons 2009-05-06 13:00:11 EDT
Description of problem:
kdesktop_lock does not run on multi-user systems when another user already has an instance of kdesktop_lock running.  

Version-Release number of selected component (if applicable):
RHEL 5.3

How reproducible:
Always

Steps to Reproduce:
Start a KDE session and lock the desktop.  Start another KDE session and select "Lock session" in the menu or run /usr/bin/kdesktop_lock.

Actual results:
kdesktop_lock does not start

Expected results:
Desktop should lock

Additional info:
This is probably related to the following changelog entry in kdebase:
- Resolves: #251968, kdesktop_lock issue

How to fix it:
sed -i 's|ps ax|ps x|' /usr/bin/kdesktop_lock
Comment 1 Issue Tracker 2009-08-04 10:58:14 EDT
Event posted on 04-08-2009 08:28pm IST by rkhadgar

my fix for kdesktop_lock

$ cat /usr/bin/kdesktop_lock

#!/bin/sh
function check_run
{
        echo "display check for " $LIST | logger -t "kdesktop_lock"
        PLIST=
        for P in $LIST; do
                D=`grep -z DISPLAY /proc/$P/environ|cut -f2 -d:|cut -f1
-d.`
                RD=`echo $DISPLAY|cut -f2 -d:|cut -f1 -d.`
                echo $@ $f $D $RD 
                test $D -eq $RD && PLIST="$PLIST $P" && $1
        done

        echo "killing $PLIST "| logger -t "kdesktop_lock"
        test -z $PLIST || kill -KILL $PLIST
}

#!/bin/sh
LIST=`ps ax --format "%p:%a" | grep "$0.bin" | grep -v grep | cut -d :
-f 1 | tail -n +1`
echo $LIST | logger -t "kdesktop_lock"

# check if kdesktop is already running on this display, if yes, exit
echo $LIST 
check_run exit

# run lock
$0.bin "$@"

# kill the kdesktop_lock process running on our display only
LIST=`ps ax --format "%p:%a" | grep "$0" | grep -v grep | cut -d : -f
1 | tail -n +1`
check_run continue




This event sent from IssueTracker by rkhadgar 
 issue 323523
Comment 2 ritz 2009-08-06 12:36:21 EDT
*** Bug 498990 has been marked as a duplicate of this bug. ***
Comment 3 ritz 2009-08-06 12:37:49 EDT
added note:

  the above fix will allow kdesktop_lock to work on multiuser systems, and with single user having multiple login.
Comment 6 ritz 2009-09-07 12:05:01 EDT
Created attachment 360004 [details]
patch

re-write of kdesktop_lock.wrapper to allow for a single user to run multiple desktop, and kdesktop_lock on each open display.
Comment 21 Florian Nadge 2010-10-12 09:13:23 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the 'kdesktop_lock' process did not run on multi-user systems when another user had already ran an instance of 'kdesktop_lock'. This update allows 'kdesktop_lock' to work on multi-user systems when multiple single users are logged in.
Comment 23 errata-xmlrpc 2010-10-27 12:50:25 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0806.html

Note You need to log in before you can comment on or make changes to this bug.