You are not logged in.

#1 2012-12-02 04:05:11

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 181

[Solved] Slock program gives blue screen

It's just a minor annoyance, but after "slock" locks the screen something kind of odd happens. It gives an ugly blue screen when you start typing on the keyboard, it used to just stay black and not turn blue. It seemed to have started not that long ago, maybe right around when systemd was being adopted if I had to guess? I have no idea what is causing it, it's not a huge deal but it would be nice to fix it.

Last edited by felixculpa (2012-12-04 18:47:00)

Offline

#2 2012-12-02 04:47:58

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,319
Website

Re: [Solved] Slock program gives blue screen

This is a feature introduced in the latest version of slock. You can customize the alternate colour (the default is the dwm blue).

And moving to Applications and DEs...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#3 2012-12-02 05:27:26

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [Solved] Slock program gives blue screen

I'm no mind-reader, but if I had to guess, I'd say this is to notify the user that the keyboard is giving/receiving input, so there's no guesswork to it.  At least, that's what I firgured after I noticed it doing--you know, whatever you call what most other screenlockers do.

Kudos on trying to shoe-horn a half-hearted systemd flame into the boards, though. wink

Offline

#4 2012-12-04 12:20:05

vinicius
Member
Registered: 2009-02-07
Posts: 37

Re: [Solved] Slock program gives blue screen

Hi, felixculpa

I've also been annoyed by this new feature. It looks like the only way to change the blue color back to black is recompiling the package...
This post shows how the config file should be edited: http://linuxforums.org.uk/index.php?top … 5#msg78680

I haven't done that yet because I don't know exactly how to recompile a installed package (shame on me), but I've found a few other pages with the same hint.

If you could manage to solve the problem, let us know. smile

Vinícius

Offline

#5 2012-12-04 12:39:30

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,501
Website

Re: [Solved] Slock program gives blue screen

vinicius wrote:

I haven't done that yet because I don't know exactly how to recompile a installed package

ABS.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#6 2012-12-04 18:06:32

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 181

Re: [Solved] Slock program gives blue screen

ANOKNUSA wrote:

Kudos on trying to shoe-horn a half-hearted systemd flame into the boards, though. wink

I laughed when I read that! Funny stuff.

I'm glad to hear that this wasn't some bug, and was intentional. I will look into how to change the color. It looks like you have the option to display a png image instead of a plain color as well...which I might go for.

I will mark this thread as solved once I figure out how to configure slock.

Offline

#7 2012-12-04 18:40:42

vinicius
Member
Registered: 2009-02-07
Posts: 37

Re: [Solved] Slock program gives blue screen

Trilby wrote:
vinicius wrote:

I haven't done that yet because I don't know exactly how to recompile a installed package

ABS.

Thank you, Trilby.
Following your hint, I've found https://wiki.archlinux.org/index.php/Arch_Build_System and I'm feeling a little better Arch user now. smile

But things weren't so easy... In order to get slock configured and installed properly, what I had to do was:

1. Install abs package;
2. Create abs tree:

# abs

3. Copy slock to a folder in my home:

$ mkdir abs
$ cp -r /var/abs/community/slock/ ~/abs/ 

4. Make the package to get the source code:

$ cd ~/abs/slock
$ makepkg -s 

5. Edit CPPFLAGS in src/slock-1.1/config.mk to have black/black option:

CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"black\" 

6. Compile and copy the new binary to pkg folder:

$ cd src/slock-1.1/
$ make
$ cp slock ../../pkg/usr/bin/ 

7. Repack:

$ cd ../../pkg/
$ tar -zcf ../slock-1.1-1-i686.pkg.tar.xz usr/ .PKGINFO 

8. Install the new package:

$ cd ..
# pacman -U slock-1.1-1-i686.pkg.tar.xz 

9. Now here it comes the tricky step! The only way I could get slock working after all that was changing group/owner and permissions:

$ cd /usr/bin
# chown root:root slock
# chmod u+s slock 

I don't know if there is an easier way, but that worked for me. smile

Just for the record, when I try to run ./slock right after compile with make, I got the error: slock: cannot retrieve shadow entry (make sure to suid or sgid slock). Changing permissions solve the problem, but (I don't know why) copying and installing this file make it stop working again.
Other thing is: without changing group/owner and permissions, slock command returns bash: /usr/local/bin/slock: No such file or directory.

I hope this could be useful. wink

Vinícius

Offline

#8 2012-12-04 18:46:21

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 181

Re: [Solved] Slock program gives blue screen

Well I guess I will mark this thread as solved smile

Offline

#9 2012-12-04 19:36:03

satanselbow
Member
Registered: 2011-06-15
Posts: 524

Re: [Solved] Slock program gives blue screen

felixculpa wrote:

Well I guess I will mark this thread as solved smile

Only thing to add is that (AFAIK) slock itself cannot provide a background image - you might (well I will) want to look at metalock wink

Offline

#10 2012-12-05 02:39:18

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,501
Website

Re: [Solved] Slock program gives blue screen

To improve on vinicious's instructions, after you get the PKGBUILD from abs, just run `makepkg -o` to only download the source without compiling or installing.  Then make the changes to the flags or source files, then just run `makepkg -si` and you should be set.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

Board footer

Powered by FluxBB