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
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
*** Bug 498990 has been marked as a duplicate of this bug. ***
added note: the above fix will allow kdesktop_lock to work on multiuser systems, and with single user having multiple login.
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.
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.
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