You are not logged in.
Hi there,
I am currently testing xfce4-power-manager.
It provides several options such as locking screen or asking me what to do when pressing power/hibernate/sleep button.
Since I am not using Xfce but Openbox, I am wondering what the default applications are that are used by Power Manager when triggering these actions?
Currently, setting the buttons to ask does not trigger any actions. Thus, I suspect that I am missing a certain application.
Thanks for your advice!
Offline
From the xfce4-power-manger source, screen-locking is done via one of the following programs:
gboolean
xfpm_lock_screen (void)
{
gboolean ret = g_spawn_command_line_async ("xflock4", NULL);
if ( !ret )
{
ret = g_spawn_command_line_async ("gnome-screensaver-command -l", NULL);
}
if ( !ret )
{
/* this should be the default*/
ret = g_spawn_command_line_async ("xdg-screensaver lock", NULL);
}
if ( !ret )
{
ret = g_spawn_command_line_async ("xscreensaver-command -lock", NULL);
}
if ( !ret )
{
g_critical ("Connot lock screen\n");
}
return ret;
}As for suspend/hibernate, I believe that the version in the repositories uses pm-utils for this functionality.
A couple of things to note:
1. xfce4-power-manager has been upgraded to support systemd. The new version is available in AUR as xfce4-power-manager-git. You may have more luck using this version with respect to suspend/hibernate using systemd.
2. To see what your install of xfce4-power-manager supports, run:
xfce4-power-manager --dumpOffline
@toz
Very helpful, thanks!
Two things I now struggle with, even when using the -git version.
1. I use xtrlock for screen locking. How can I tell Power Manager/xdg-screensaver to use it?
Running xdg-screensaver lock doesn't trigger any action, nor does it report any error.
2. I want Power Manager to ignore my power button completely because I use a custom keybinding in my Openbox config file.
Which piece of the Power Manager's source do I need to remove to disable that? Simply setting When Power Button is pressed: to nothing does not help to make my custom keybinding work. Because then it simply does nothing, not even triggering my custom binding.
Offline
1. I use xtrlock for screen locking. How can I tell Power Manager/xdg-screensaver to use it?
Running xdg-screensaver lock doesn't trigger any action, nor does it report any error.
xflock4 is provided by xfce4-session. If you're not using that package, you could create a /usr/local/bin/xflock4 wrapper script or a link that runs xtrlock.
2. I want Power Manager to ignore my power button completely because I use a custom keybinding in my Openbox config file.
Which piece of the Power Manager's source do I need to remove to disable that? Simply setting When Power Button is pressed: to nothing does not help to make my custom keybinding work. Because then it simply does nothing, not even triggering my custom binding.
I'm not exactly sure about this. I found this bug over at launchpad that might be related (not sure). You might consider creating a bug report at https://bugzilla.xfce.org/ regarding the ignore option not ignoring.
Offline