You are not logged in.
I could, in principle, just launch slimlock after calling pm-hibernate but that usually results in the system being left without lockscreen for 1-2 seconds after resume.
Does that cause any problems for you? I would rather see my screen for 1-2 seconds as being able to switch the tty when the screen is locked.
Regards
Offline
Well, theoretically those 2 seconds are enough for an attacker to execute something if dedicated enough. And since I don't start X via a tty I don't think locking tty switching is really that useful for me (correct me if I'm wrong though).
Don't bother if it gives you much trouble or if I'm the only one complaining
Offline
@Revolt: Well, Joel was the one who added the tty locking. I didn't even know that until I checked github yesterday. I haven't even updated my repo in quite a while.
I'll let Joel know and see what he thinks. My guess is that making it a config option would be the easiest route.
Offline
Hrm. When that happens, does slimlock become non-responsive? Also, when it happens, does it just happen suddenly or does it start eating your CPU as soon as it's started?
And can you list the other things you had running at the time?
I don't know, I wasn't checking the CPU usage as soon as I locked. Unfortunately it didn't happen again in the last few days, so I can't give any more information...
Offline
@Revolt thanks for the bug report. I forgot to unlock the console after locking it (facepalm). At least I think that's the problem. I seemed to be able to reproduce the issue and then it was gone after I wrote the code to unlock the console. Fix coming tonight or tomorrow.
@65kid looking into it.
Offline
@Revolt @Guff My fix for the tty switching issue is pushed to the repo. I would appreciate it if someone else tested it.
I haven't done anything about the other two known issues yet. I think I'll release a new version tonight whether or not I get to fixing them.
Offline
Did a quick test with the newest version and pm-suspend/s2disk continues not to do anything after slimlock has launched. It happens right on the first try so I don't think the problem was the fact that you didn't unlock it afterwards but rather the lock itself.
I'll try it again later after a reboot when I have more time
Offline
@Revolt try running `slimlock` from your console to see if any error messages are printed.
Offline
just got set up with slimlock/xmodmap, works pretty good, fairly simple too. it's a nice project, i like it! i'm just using the one from archlinux-slim-special-theme, as you can probably recognize, it's not much, 5 mins messing around with theme file that i pulled from AUR (just to go with the wallpaper i have right now) will get to gimp to make a nice login box, keeping it arch'ed. maybe a little something stylish on the rear of the car, who knows ?
thanks a lot, i don't use any other feature, i installed slim but i read it's ok to uninstall it, just keep on editing those pkgbuilds to remove deps when installing themes. i just wanted something to lock the screen and easy to play with. slimlock, you've got yourself another follower.
Last edited by s3kt0r (2011-10-01 01:44:20)
box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle
Offline
I would like to lock the screen before suspending/hibernating the system. Therefore I wanted to use this script for pm-utils.
#!/bin/sh
#
# 00screensaver-lock: lock workstation on hibernate or suspend
case "$1" in
hibernate|suspend)
/usr/bin/slimlock
;;
thaw|resume)
;;
*) exit $NA
;;
esac
However, I don't want to have slimlock itself launched. Another option would be to launch it after resume. In this case there is a delay of few seconds up to a minute, depending on the cpu load while resuming.
In short: Do you have any idea how to run slimlock to have the screen locked immediately after suspend?
Regards
Offline
AFAIK, your only option if you don't want the delay on resume is to lock before the resume as you are doing there. Notice that I still can't hibernate while using slimlock (using i3lock for the time being) so you might encounter the same problem.
You might want to launch slimlock as your user though. Otherwise you'll have to type in the root password (those hibernate scripts run as root).
I found this code some time ago here in the forums:
Put this at the beggining of the script:
DBUS=$(ps aux | grep 'dbus-launch' | grep -v root)
if [[ ! -z $DBUS ]];then
USER=$(echo $DBUS | awk '{print $1}')
USERHOME=$(getent passwd $USER | cut -d: -f6)
export XAUTHORITY="$USERHOME/.Xauthority"
for x in /tmp/.X11-unix/*; do
DISPLAYNUM=$(echo $x | sed s#/tmp/.X11-unix/X##)
if [[ -f "$XAUTHORITY" ]]; then
export DISPLAY=":$DISPLAYNUM"
fi
done
else
USER=YOURUSERNAME
USERHOME=/home/YOURUSERNAME
export XAUTHORITY="$USERHOME/.Xauthority"
export DISPLAY=":0"
fi
And call slimlock with:
su $USER -c "/usr/bin/slimlock"
Offline
Thanks for your reply. I assume, my script must be correct.
#!/bin/sh
#
# 00screensaver-lock: lock workstation on hibernate or suspend
DBUS=$(ps aux | grep 'dbus-launch' | grep -v root)
if [[ ! -z $DBUS ]];then
USER=$(echo $DBUS | awk '{print $1}')
USERHOME=$(getent passwd $USER | cut -d: -f6)
export XAUTHORITY="$USERHOME/.Xauthority"
for x in /tmp/.X11-unix/*; do
DISPLAYNUM=$(echo $x | sed s#/tmp/.X11-unix/X##)
if [[ -f "$XAUTHORITY" ]]; then
export DISPLAY=":$DISPLAYNUM"
fi
done
else
USER=robert
USERHOME=/home/robert
export XAUTHORITY="$USERHOME/.Xauthority"
export DISPLAY=":0"
fi
case "$1" in
hibernate|suspend)
su $USER -c "/usr/bin/slimlock"
;;
thaw|resume)
;;
*) exit $NA
;;
esac
However, this is not what I want. When suspending, slimlock opens and asks me for my user password. After typing in my password suspending takes place. However, after resuming my screen is not locked.
But at least suspending is working for me. Which version of slimlock are you using?
I use 0.10.1-1
Regards
Offline
@orschiro: I might be missing something, but don't you just need to spawn slimlock in the background? e.g.:
su $USER -c "/usr/bin/slimlock" &
Offline
that did not work for me, but I found a solution:
su $USER -c "sleep 1 && /usr/bin/slimlock &"
That works perfect!
Offline
Does anyone else have Segmentation fault problem after system update? https://bbs.archlinux.org/viewtopic.php?id=124268
Offline
@sgtpep sorry about that! Hopefully we can get this fixed quickly.
Offline
I recently switched to qingy for my loginmanager.
Since then, slimlock is no more working :
slimlock: cannot open display
$ echo $DISPLAY
:1
$ xrandr
Screen 0: minimum 320 x 200, current 2646 x 1024, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1366x768 60.0*+ 50.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 connected 1280x1024+1366+0 (normal left inverted right x axis y axis) 380mm x 305mm
1280x1024 60.0*+ 75.0
1152x864 75.0
1024x768 75.1 60.0
800x600 75.0 60.3
640x480 75.0 60.0
720x400 70.1
Cedric Girard
Offline
@orschiro: I might be missing something, but don't you just need to spawn slimlock in the background? e.g.:
su $USER -c "/usr/bin/slimlock" &
I'm referring back to that problem.
Since one of the later versions of slimlock I get asked to enter my password again before my system actually goes into standby.
I didn't change anything with my 00screensaver script for pm-utils.
Can anybody confirm that problem?
Regards,
Robert
Offline
@orschiro I just got pm-utils working. It seems tty locking is interfering with suspending. I put
tty_lock 0
in /etc/slimlock.conf and now pm-suspend works. This is only a workaround, it is not secure, but you might want to try it for now.
Offline
Looks like it's not possible for slimlock to be entirely secure, jwz has a nice explanation: http://www.jwz.org/xscreensaver/faq.html#no-ctl-alt-bs.
The next release of slimlock will have tty switching enabled by default. This is less secure but as the linked article shows, it's possible to disable tty switching at the X11 level. If someone comes up with a solution to have tty swiching disabled and suspend working at the same time I will re-enable it.
Offline
Unfortunately I have to revert to my old statement. Changing slimlock.conf does not solve the problem, though I cannot understand why it worked once.
Do you use exactly the same 00screensaver-lock from above?
Please explain briefly how you call slimlock after suspend.
Regards
Offline
@orschiro sorry I didn't see your second message. My 00screensaver-lock looks the same as yours except I call slimlock in the background:
su $USER -c "/usr/bin/slimlock" &
In fact I copied the script verbatim from the pm-utils wiki page.
Last edited by joelb (2012-01-23 03:50:26)
Offline
I recently switched to qingy for my loginmanager.
Since then, slimlock is no more working :slimlock: cannot open display
$ echo $DISPLAY :1
I've been able to fix this. I've sent a pull request: https://github.com/Guff/slimlock/pull/3
Cedric Girard
Offline