aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-16 14:17:05 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-16 14:37:07 +0100
commit8aba38339e85df42db7753b6fbfdfd5c21cf1c1d (patch)
tree6c0c6470ccf82b77b891eeb63a719c2650635edc /src
parent76f2e65a6e011cb41f1b7897255c0cf23e49a30e (diff)
downloadarctica-greeter-8aba38339e85df42db7753b6fbfdfd5c21cf1c1d.tar.gz
arctica-greeter-8aba38339e85df42db7753b6fbfdfd5c21cf1c1d.tar.bz2
arctica-greeter-8aba38339e85df42db7753b6fbfdfd5c21cf1c1d.zip
src/arctica-greeter.vala: Trigger UPower activation when greeter starts.
Diffstat (limited to 'src')
-rw-r--r--src/arctica-greeter.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index c10f883..321c74f 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -606,6 +606,17 @@ public class ArcticaGreeter
}
}
+ private static void activate_upower ()
+ {
+ /* hacky approach, but does what's needed: activate the upower service over DBus */
+ try {
+ Process.spawn_command_line_sync("/usr/bin/upower --version", null, null, null);
+ }
+ catch (Error e){
+ warning ("Error while triggering UPower activation: %s", e.message);
+ }
+ }
+
private static void check_hidpi ()
{
try {
@@ -800,6 +811,8 @@ public class ArcticaGreeter
if (!do_test_mode)
{
+ activate_upower();
+
greeter.greeter_ready.connect (() => {
debug ("Showing greeter");
greeter.show ();