Comments (2)
I don't use the hibernation functionality...
But here's my config file (/etc/oblogout.conf)
in case that it helps:
[settings]
# Backend
# Specify backed to use for oblogout's shutdown/restart operations
# - HAL
# - ConsoleKit
#
# If nothing then oblogout will use the commands you specify.
backend = "HAL"
# Monitor
# If you have multiple monitors,
# you can specify which one the oblogout will appear in.
monitor = 0
[looks]
# Looks
# Look and feel settings.
opacity = 60
bgcolor = black
# Buttontheme
# Icon theme for the buttons, must be in ~/.themes/<name>/oblogout/
# Valid values: oxygen, foom
buttontheme = oxygen
# Buttons
# You can specify which buttons and their order you want here.
buttons = cancel, logout, restart, shutdown, suspend, lock
[shortcuts]
# Shortcuts
# Keyboard shortcuts for actions.
cancel = Escape
shutdown = S
restart = R
suspend = U
logout = L
lock = K
hibernate = H
[commands]
# Commands
# You can specify command for certain action.
# Ignored if you have a backend -->
shutdown = shutdown -h now
restart = reboot
suspend = pmi action suspend
hibernate = pmi action hibernate
safesuspend = safesuspend
# <--
lock = gnome-screensaver-command -l
switch = gdm-control --switch-user
logout = openbox --exit
from oblogout-py3.
Okay I think there's actually more to it, here's the output of the program with the -v
flag:
$ oblogout -v
2021-05-08 18:24:16,042 - OpenboxLogout - DEBUG - Shortcut Options: [('cancel', 'Escape'), ('shutdown', 'S'), ('restart', 'R'), ('lock', 'L'), ('hibernate', 'H')]
2021-05-08 18:24:16,042 - OpenboxLogout - DEBUG - Setting cmd_shutdown as systemctl poweroff
2021-05-08 18:24:16,042 - OpenboxLogout - DEBUG - Setting cmd_restart as systemctl reboot
2021-05-08 18:24:16,042 - OpenboxLogout - DEBUG - Setting cmd_hibernate as systemctl hibernate
2021-05-08 18:24:16,042 - OpenboxLogout - DEBUG - Setting cmd_lock as betterlockscreen -l --off 30 -- -e -n
2021-05-08 18:24:16,042 - OpenboxLogout - DEBUG - Validated Button List: ['shutdown', 'restart', 'hibernate', 'lock']
2021-05-08 18:24:16,044 - OpenboxLogout - DEBUG - Screen supports alpha channels!
2021-05-08 18:24:17,222 - OpenboxLogout - DEBUG - Keypress: 104/h
2021-05-08 18:24:17,222 - OpenboxLogout - DEBUG - Matched hibernate
2021-05-08 18:24:17,223 - OpenboxLogout - DEBUG - Executing command: betterlockscreen -l --off 30 -- -e -n
Got 1920x1080 /home/undercover/.cache/i3lock/1920x1080
2021-05-08 18:24:25,212 - OpenboxLogout - DEBUG - Executing command: systemctl hibernate
As you can see it sets cmd_hibernate
as systemctl hibernate
, which is expected, and binds H
(case insensitive from what I've read in the readme) to cmd_hibernate
.
However when it matches hibernate, it runs betterlockscreen -l --off 30 -- -e -n
instead! Only after that process is completed, which is me unlocking my screen because betterlockscreen locks my screen, does it hibernate.
When it does run systemctl hibernate
then my screen is locked (because I said systemd to do so) and then it hibernates, but this should be completely transparent to oblogout.
Changing the configuration file in /etc/oblogout.conf
will change the command issued when verbose is on, which means for some reason oblogout is in fact picking up the lock screen command before hibernation, by itself. So I decided to completely remove the lock command, and here's what happened:
$ oblogout -v
2021-05-08 18:44:39,647 - OpenboxLogout - DEBUG - Shortcut Options: [('cancel', 'Escape'), ('shutdown', 'S'), ('restart', 'R'), ('hibernate', 'H')]
2021-05-08 18:44:39,647 - OpenboxLogout - DEBUG - Setting cmd_shutdown as systemctl poweroff
2021-05-08 18:44:39,648 - OpenboxLogout - DEBUG - Setting cmd_restart as systemctl reboot
2021-05-08 18:44:39,648 - OpenboxLogout - DEBUG - Setting cmd_hibernate as systemctl hibernate
2021-05-08 18:44:39,648 - OpenboxLogout - DEBUG - Validated Button List: ['shutdown', 'restart', 'hibernate']
2021-05-08 18:44:39,649 - OpenboxLogout - DEBUG - Screen supports alpha channels!
2021-05-08 18:44:42,072 - OpenboxLogout - DEBUG - Keypress: 104/h
2021-05-08 18:44:42,072 - OpenboxLogout - DEBUG - Matched hibernate
2021-05-08 18:44:42,073 - OpenboxLogout - DEBUG - Executing command: gnome-screensaver-command -l
sh: line 1: gnome-screensaver-command: command not found
2021-05-08 18:44:42,084 - OpenboxLogout - DEBUG - Executing command: systemctl hibernate
It's still trying to reach a screensaver, in this case gnome-screensaver-command
, which is not even available on my system!
After searching for a while I found this, in lines 404-410 in the __init__.py
in the directory /usr/lib/python3.9/site-packages/oblogout
:
elif (data == 'hibernate'):
self.window.hide()
self.__exec_cmd(self.cmd_lock)
if self.backend:
self.dbus.hibernate()
else:
self.__exec_cmd(self.cmd_hibernate)
As you can see it's in fact locking the screen before hibernating, even if I don't want to. As a temporary fix I've just decided to comment this out, but ideally there should be an option to say if you intend to lock your screen before hibernating or not, considering somebody else might already be taking care of it.
from oblogout-py3.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oblogout-py3.