SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-04-03 20:44:52

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

[solved] how do I replace xscreensaver

Probably there's an answer to this in the forums, but I really can't find it.
I would like to replace xscreensaver with slock
I don't need a screensaver, I just want my laptop getting locked at lid close and after suspend.

Last edited by Tunafish (2012-04-05 13:50:31)


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

Help fund CrunchBang, donate to the project!

#2 2012-04-03 21:41:56

Jabroneous
#! CrunchBanger
Registered: 2011-11-26
Posts: 123

Re: [solved] how do I replace xscreensaver

Your power manager should give you those options regardless of which screensaver program you use.

Offline

#3 2012-04-03 21:59:17

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

Jabroneous wrote:

Your power manager should give you those options regardless of which screensaver program you use.

So.... in that case, what would be an alternative to xscreensaver?
I don't think slock or i3lock are real alternatives to xscreensaver.


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#4 2012-04-03 22:31:09

wuxmedia
wookiee madclaw
From: Back in Blighty
Registered: 2012-03-09
Posts: 1,472
Website

Re: [solved] how do I replace xscreensaver

what do you want to happen? just the screen lock?
ie blank screen, no access untill password?
you can disable all visuals, in the popup menu... blank screen, the screenlock work the same.
personally i purposefully leave my lappy on xsreensaver glasses

Offline

#5 2012-04-03 23:32:19

Jabroneous
#! CrunchBanger
Registered: 2011-11-26
Posts: 123

Re: [solved] how do I replace xscreensaver

You don't really need an alternative; xscreensaver handles screen locking just fine. Go into your power manager and find the "extra" or "extended" tab (might be called something else depending on the program and your DE/WM), and make sure the "lock screen after going from suspend or hibernate" box is checked. You should be fine after that as long as xscreensaver is enabled (you can set it to a blank screen in its prefs).

Offline

#6 2012-04-04 09:52:36

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

@jabroneous & wuxmedia...
You probably haven't seen the beauty of i3lock, which has the ability to set an image on locking and has a very nice unlock screen...

xscreensaver works fine, it's just ugly...


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#7 2012-04-04 10:06:37

wuxmedia
wookiee madclaw
From: Back in Blighty
Registered: 2012-03-09
Posts: 1,472
Website

Re: [solved] how do I replace xscreensaver

so why not install i3lock?
sorry if i've totally misunderstood your question...

Offline

#8 2012-04-04 10:26:16

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

wuxmedia wrote:

so why not install i3lock?
sorry if i've totally misunderstood your question...

Might be the language barrier, I've problems expressing in/on/with (whatever) English.

I did install i3lock, but how do I enable 'lock on lid close'?


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#9 2012-04-04 14:51:40

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,674

Re: [solved] how do I replace xscreensaver

OK, I think I get what you're looking for.  (I don't have a solution, but I think these might be "the droids you're looking for".)  Basically, you want to figure out how to call i3lock when the laptop lid switch is activated.  Yes?  I believe you need to make/modify an acpi or hald script, but I'm not sure what you'd put in it or where you'd put it.


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#10 2012-04-05 12:05:52

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

pvsage wrote:

OK, I think I get what you're looking for. (...) I believe you need to make/modify an acpi or hald script, but I'm not sure what you'd put in it or where you'd put it.

Thanks for pointing me in the right direction. I've got it working now.

Here's what I did:
- disable xscreensaver in ~/.config/openbox/autostart
- run xfce4-power-manager-settings and set lid close to nothing (ac and battery)
- sudo apt-get install acpid acpi-support
- sudo gedit /usr/share/acpi-support/screenblank
add these lines (as line 22& 23)
        elif [ -x /usr/bin/i3lock ]; then
            su $XUSER -s /bin/sh -c "/usr/bin/i3lock -c 000000 &"
- sudo gedit /etc/acpi/lid.sh
comment out the line if CheckPolicy; then exit; fi
(otherwise, xfce4-power-manager overrides acpid)
- sudo /etc/init.d/acpid restart

Maybe I should ditch xfce4-power-manager, but for now, I'm satisfied.


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#11 2012-04-05 13:41:22

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,674

Re: [solved] how do I replace xscreensaver

Mark it solved!  MARK IT SOLVED! big_smile


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#12 2012-04-05 13:50:16

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

pvsage wrote:

Mark it solved!  MARK IT SOLVED! big_smile

Sorry? What do I have to do? smile


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#13 2012-04-05 13:53:40

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,674

Re: [solved] how do I replace xscreensaver

Oh, I see you'd done it while I was writing my response..."Nothing to see here; these aren't the droids you're looking for; move along."


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#14 2012-04-20 10:46:45

kuosan
New Member
Registered: 2012-04-20
Posts: 1

Re: [solved] how do I replace xscreensaver

I actually found a easier and arguably cleaner way to replace xscreensaver with slock
After examing Xfce4-power-manager's source code I found it is hard coded to try a list of commands to lock screen.
First of which is 'xflock4' so all I did is:

cd /usr/bin
sudo ln -s slock xflock4

So now you don't have to install acpi nor have to disable xfce4-power-manager's lid closing setting.

Offline

#15 2012-04-20 11:25:34

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

kuosan wrote:

I actually found a easier and arguably cleaner way to replace xscreensaver with slock
After examing Xfce4-power-manager's source code I found it is hard coded to try a list of commands to lock screen.
First of which is 'xflock4' so all I did is:

cd /usr/bin
sudo ln -s slock xflock4

So now you don't have to install acpi nor have to disable xfce4-power-manager's lid closing setting.

Thanks a lot. That's far more easy.

Anyway... I learned a lot about acpi events. smile


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#16 2013-11-04 07:13:57

Sakknekedro
New Member
Registered: 2013-11-01
Posts: 9

Re: [solved] how do I replace xscreensaver

Hmm... nor the symlink nor the acpi-support way seems to work for me with i3lock.

here's what i tried for the symlink:

sudo ln -s i3lock xflock

and in /usr/share/acpi-support/screenblank:

elif [ -x /usr/bin/i3lock ]; then
	su $XUSER -s /bin/sh -c "/usr/bin/i3lock -i /usr/share/backgrounds/spacelock.png &"

but my /etc/acpi/lid.sh only had

CheckPolicy && exit

to comment, may this be the problem?

Offline

#17 2013-11-05 15:44:53

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: [solved] how do I replace xscreensaver

Hi Sakknekedro,

Here's what I did on the latest release of #! (2010506)

########## DISABLE XSCREENSAVER
vim ~/.config/openbox/autostart

#xscreensaver -no-splash &

########## CREATE NEW XFLOCK4 (as root or use sudo)
mv /usr/bin/xflock4 /usr/bin/xflock4.orig
vim /usr/bin/xflock4

#!/bin/bash
if ! pidof i3lock > /dev/null 2>&1; then # launch once only
  /usr/bin/i3lock --dpms -c 000000
fi

chmod +x /usr/bin/xflock4

HTH, tuna


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#18 2013-11-05 16:40:11

Sakknekedro
New Member
Registered: 2013-11-01
Posts: 9

Re: [solved] how do I replace xscreensaver

Oh thank you, kind sir, works like a charm.
Turns out, I didn't even have an xflock4 in /usr/bin at all. I went on nonetheless, and created it with my i3lock options.
And thanks also for the run only once tip, it's really useful.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo