You are not logged in.
Pages: 1
Hi!
I have installed sxlock ( https://aur.archlinux.org/packages/sxlock-git/ ) and cant get it to work properly on Fluxbox. After an hibernate Im getting stright to the Fluxbox environment ( I want to get asked for a password to get access). When Im trying to follow this tutorial ( https://github.com/lahwaacz/sxlock ) Im stuck since it cant find a directory when Im typing "sudo systemctl enable sxlock".
Am I way off and should do something different? Bare with me, Im still a fresh noob. Any help is much appreciated.
I can mention that if I type "sxlock" in terminal it works, but its the hibernate thing I want to work.
Its maybe easier to get another screen locker to work with Fluxbox?
/Gurkan
Last edited by gurkan (2016-02-10 05:20:11)
Offline
From the github page of sxlock that you've mentioned:
When using systemd, you can use the following service (create /etc/systemd/system/sxlock.service) to let the system lock your X session on hibernation or suspend:
[Unit] Description=Lock X session using sxlock [Service] User=<username> Environment=DISPLAY=:0 ExecStart=/usr/bin/sxlock [Install] WantedBy=sleep.target
Have you actually created and adjusted the entry above?
An advice for posting problems in forums: Try to describe as detailed as possible (including used commands / terminal outputs) what you have done so far. That makes it a lot easier to understand your problem and what might have gone wrong. I advice you to read the forum etiquette and smart questions.
Offline
Sry for my bad explonation. No I didnt create the "sxlock.service" at first, I was too dumb to understand. But now I have done so and the "sudo systemctl enable sxlock.service" works (doesnt complain it cant find sxlock.service). But after a hibernation it still wont work. I have also changed "username" to my username in the entries. Is there something else I should change?
I should use the "systemctl enable" to get it work, right? Or I am missing something out?
And yes, my hibernation works as it should!
Offline
post output of
systemctl status sxlock.serviceI am running similar service with slock as below, which works
[Unit]
Description=sharad resume actions
After=sleep.target
[Service]
User=sharad
Environment=DISPLAY=:0
ExecStart=/usr/bin/slock
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.targetLast edited by Docbroke (2016-02-08 06:30:38)
Arch is home!
https://github.com/Docbroke
Offline
Thanks! I will post the output status when I get home. But I can see know that I dont have "ExecStartPost=/usr/bin/sleep 1". Maybe Im missing something in the entries...
Offline
Have a look in the Wiki regarding power management and sleep hooks: https://wiki.archlinux.org/index.php/Po … leep_hooks
Maybe you just have to replace sleep.target by hibernate.target?
Offline
hibernate.target pulls in sleep.target. If you want this to only run when hibernating but not when suspending, then use hibernate.target - but if you want it to run when suspending or hibernating, sleep.target should be used.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Something is disabled and have failed, but I cant figure outwhat it is...
My output of "systemctl status sxlock.service" is:
● sxlock.service - Lock X session using sxlock
Loaded: loaded (/etc/systemd/system/sxlock.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since mån 2016-02-08 19:17:31 CET; 2min 39s ago
Process: 2143 ExecStart=/usr/bin/sxlock (code=exited, status=217/USER)
Main PID: 2143 (code=exited, status=217/USER)
feb 08 19:17:31 archi7power systemd[1]: Started Lock X session using sxlock.
feb 08 19:17:31 archi7power systemd[1]: sxlock.service: Main process exited, code=exited, status=217/USER
feb 08 19:17:31 archi7power systemd[1]: sxlock.service: Unit entered failed state.
feb 08 19:17:31 archi7power systemd[1]: sxlock.service: Failed with result 'exit-code'.
[gurkan@archi7power ~]$
Offline
feb 08 19:17:31 archi7power systemd[1]: sxlock.service: Main process exited, code=exited, status=217/USER
Make sure the user you specified is valid. And please use code tags when posting output.
Offline
gurkan wrote:feb 08 19:17:31 archi7power systemd[1]: sxlock.service: Main process exited, code=exited, status=217/USER
Make sure the user you specified is valid. And please use code tags when posting output.
Geez, Im sorry for my stupidness. I have typed my username wrong! Now it works like it should. Thanks for the help!
Offline
Pages: 1