1 diff --git a/src/dbus.cpp b/src/dbus.cpp
2 index 7379af1..4eef3fe 100644
5 @@ -152,7 +152,7 @@ bool dbus_manager::get_media_player_metadata(metadata& meta, std::string name) {
8 bool dbus_manager::init_internal() {
9 - if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("libdbus-1.so.3")) {
10 + if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("@libdbus@/lib/libdbus-1.so.3")) {
11 SPDLOG_ERROR("Could not load libdbus-1.so.3");
14 diff --git a/src/logging.cpp b/src/logging.cpp
15 index 7d4cb98..256128c 100644
18 @@ -27,8 +27,12 @@ string exec(string command) {
20 std::array<char, 128> buffer;
23 + char* originalPath = getenv("PATH");
24 + setenv("PATH", "@path@", 1);
25 auto deleter = [](FILE* ptr){ pclose(ptr); };
26 std::unique_ptr<FILE, decltype(deleter)> pipe(popen(command.c_str(), "r"), deleter);
27 + setenv("PATH", originalPath, 1);
29 return "popen failed!";
31 diff --git a/src/pci_ids.cpp b/src/pci_ids.cpp
32 index 002a843..5a6262b 100644
35 @@ -24,11 +24,9 @@ static std::istream& get_uncommented_line(std::istream& is, std::string &line)
39 - file.open("/usr/share/hwdata/pci.ids");
40 + file.open("@hwdata@/share/hwdata/pci.ids");
42 - file.open("/usr/share/misc/pci.ids");
44 - SPDLOG_ERROR("can't find file pci.ids");
45 + SPDLOG_ERROR("can't find file pci.ids");