Bug 499442 - Kdesktop_lock does not work on multiuser systems and for single user with multiple login
Summary: Kdesktop_lock does not work on multiuser systems and for single user with mul...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kdebase
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lukáš Tinkl
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
: 498990 (view as bug list)
Depends On:
Blocks: 499522
TreeView+ depends on / blocked
 
Reported: 2009-05-06 17:00 UTC by Aron Parsons
Modified: 2018-11-14 20:03 UTC (History)
15 users (show)

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.
Clone Of: 493268
Environment:
Last Closed: 2010-10-27 16:50:25 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0806 0 normal SHIPPED_LIVE kdebase bug fix update 2010-10-27 16:50:19 UTC

Description Aron Parsons 2009-05-06 17:00:11 UTC
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 14:58:14 UTC
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 16:36:21 UTC
*** Bug 498990 has been marked as a duplicate of this bug. ***

Comment 3 ritz 2009-08-06 16:37:49 UTC
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 16:05:01 UTC
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 13:13:23 UTC
    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 16:50:25 UTC
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.