You are not logged in.

#126 2011-09-26 20:57:11

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#127 2011-09-26 21:13:36

Revolt
Member
From: Portugal
Registered: 2009-06-11
Posts: 71
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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 wink

Offline

#128 2011-09-27 12:08:51

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@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

#129 2011-09-27 17:58:26

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Guff wrote:

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

#130 2011-09-27 18:15:05

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@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.


Github          Twitter          joelburget.com

Offline

#131 2011-09-27 22:53:22

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@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.


Github          Twitter          joelburget.com

Offline

#132 2011-09-28 07:46:42

Revolt
Member
From: Portugal
Registered: 2009-06-11
Posts: 71
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#133 2011-09-30 23:58:30

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@Revolt try running `slimlock` from your console to see if any error messages are printed.


Github          Twitter          joelburget.com

Offline

#134 2011-10-01 01:43:14

s3kt0r
Member
Registered: 2009-01-20
Posts: 208

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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 ? big_smile

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. smile

sshots
RUEyzs.jpg
Wdkeps.jpg

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

#135 2011-10-04 01:02:02

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#136 2011-10-04 09:32:03

Revolt
Member
From: Portugal
Registered: 2009-06-11
Posts: 71
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#137 2011-10-04 11:34:16

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#138 2011-10-04 13:51:46

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@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

#139 2011-10-04 22:03:07

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@Guff,

I was almost sure that I tried to spawn it before. Anyway, it works now.

Thanks!

Offline

#140 2011-11-01 16:58:44

Evilandi666
Member
Registered: 2010-10-28
Posts: 105

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

that did not work for me,  but I found a solution:

su $USER -c "sleep 1 && /usr/bin/slimlock &"

That works perfect!

Offline

#141 2011-12-22 18:53:52

sgtpep
Member
Registered: 2011-12-22
Posts: 28

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Does anyone else have Segmentation fault problem after system update? https://bbs.archlinux.org/viewtopic.php?id=124268

Offline

#142 2011-12-22 20:51:02

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@sgtpep sorry about that! Hopefully we can get this fixed quickly.


Github          Twitter          joelburget.com

Offline

#143 2012-01-05 14:48:46

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 135
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#144 2012-01-17 02:47:56

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Guff wrote:

@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

#145 2012-01-20 01:05:30

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@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.


Github          Twitter          joelburget.com

Offline

#146 2012-01-20 02:15:46

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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.


Github          Twitter          joelburget.com

Offline

#147 2012-01-20 10:27:54

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@joelb,

Thank you. I tried it and it seems to work.

Regards

Last edited by orschiro (2012-01-20 10:31:04)

Offline

#148 2012-01-20 16:41:43

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

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

#149 2012-01-23 03:49:33

joelb
Member
Registered: 2010-09-16
Posts: 21
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

@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)


Github          Twitter          joelburget.com

Offline

#150 2012-02-01 16:17:29

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 135
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

X-dark wrote:

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

Board footer

Powered by FluxBB