Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-04-11 02:02:16

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Global power settings

Is it possible to set things like Power Manager -> General -> When Power button is pressed?

I'm finding that unless I configure it for each user logging out of a session causes the computer to hang up. At that point I have to power cycle since I can't even get to a consol terminal.

Offline

#2 2019-04-12 07:04:24

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: Global power settings

I can't really answer, but this question has some interesting links, perhaps they help you work out something...

Good luck!

Offline

#3 2019-04-12 12:21:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Global power settings

Another way that you might be able to accomplish this is by creating an "All Users" functionality where configuration changes are made whenever someone logs in. To do this, you would create a script in /usr/local/bin (say "all_users_config_changes") that would look something like this:

#!/bin/bash
sleep 3
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/power-button-action -s XX

...where XX is one of:

0 do nothing
1 suspend
2 hibernate
3 ask
4 shutdown

To get this to execute for all users when they log in, you would create a .desktop file and place it in the system startup directory (/etc/xdg/autostart or for Xubuntu, /etc/xdg/xdg-xubuntu/autostart). A desktop file that looks like:

[Desktop Entry]
Type=Application
Name=All Users Config
Comment=A utility to update configuration settings
Icon=user-info
Exec=/usr/local/bin/all_users_config_changes

This way, whenever someone logs in, that script will be run and the configuration setting will be updated.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2019-04-12 17:32:01

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: Global power settings

alcornoqui wrote:

I can't really answer, but this question has some interesting links, perhaps they help you work out something...

Good luck!

It's a start smile

What I'm not understanding is why this box just freezes if the screen saver hardware stuff hasn't been set. Fortunately, adding new users isn't a common occurrence.

Offline

#5 2019-04-12 17:34:06

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: Global power settings

ToZ wrote:

Another way that you might be able to accomplish this is by creating an "All Users" functionality where configuration changes are made whenever someone logs in. To do this, you would create a script in /usr/local/bin (say "all_users_config_changes") that would look something like this:

Okay ... that's something that should work. Seems like a bit of overkill smile Guess my hope that there was a default file with settings was just wishful thinking?

thanks.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 533.98 KiB (Peak: 534.83 KiB) ]