Bug 17584

Summary: Screen locking in apmscript does not work properly for root.
Product: [Retired] Red Hat Linux Reporter: martikka
Component: apmdAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-09-18 07:14:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description martikka 2000-09-18 07:14:44 UTC
Screen locking in apmscript does not work properly for root.
There are couple of bugs in apmscripts (incorrent version was submitted to
bero).
Here's the fix:

66,67c66,67
<                               if [ "X$Usern" = "Xroot" ]; then
<                                       su $Usern -c "xlock -display
$XDisp" &>/dev/null &
---
>                               if [ "x$Usern" = "Xroot" ]; then
>                                       xlock -display $XDisp &>/dev/null &


Anyway the screen-locking is a crude hack... :)

Comment 1 Bernhard Rosenkraenzer 2000-09-23 15:33:47 UTC
This is fixed in 3.0final-20 (and probably -19 and -18).

Comment 2 martikka 2000-10-05 16:15:54 UTC
The X=x test was fixed, but it seems that "su $Usern -c " fix was omitted.
Xlock doesn't work without su (at least for me).