Skip to content

Commit

Permalink
Fixed can't see volumes on kde (#48) (#233)
Browse files Browse the repository at this point in the history
Removed syslog from systemd service file since it's depreciated.
  • Loading branch information
CalebQ42 authored Nov 30, 2022
1 parent aedd087 commit 9a6939e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/appimaged/prerequisites.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,6 @@ LimitNOFILE=65536
RestartSec=3
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=appimaged
Environment=LAUNCHED_BY_SYSTEMD=1
[Install]
Expand Down
11 changes: 10 additions & 1 deletion src/appimaged/udisks.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"log"
"os"
"time"

"github.com/probonopd/go-appimage/internal/helpers"

Expand Down Expand Up @@ -115,11 +116,19 @@ func monitorUdisks() {
} else {
satisfied = true
}
retried := false
retry:
// FIXME: For whatever reason this does NOT work with org.kde.Solid.Device
// (which we actually care about), so we check the next best thing
e = conn.Object("org.kde.Solid.PowerManagement", "/").Call("org.freedesktop.DBus.Introspectable.Introspect", 0).Store(&s)
if e != nil {
log.Println("Notice: Cannot introspect org.kde.Solid on this system", e)
if retried {
log.Println("Notice: Cannot introspect org.kde.Solid on this system", e)
} else {
log.Println("org.kde.Solid.PowerManagement might not be started yet. Waiting a moment then retrying")
time.Sleep(500 * time.Millisecond)
goto retry
}
} else {
satisfied = true
}
Expand Down

0 comments on commit 9a6939e

Please sign in to comment.