diff --git a/src/anbox/cmds/launch.cpp b/src/anbox/cmds/launch.cpp index 66de05e..f309491 100644 --- a/src/anbox/cmds/launch.cpp +++ b/src/anbox/cmds/launch.cpp @@ -20,6 +20,7 @@ #include "anbox/dbus/stub/application_manager.h" #include "anbox/common/dispatcher.h" #include "anbox/ui/splash_screen.h" +#include "anbox/config.h" #include "anbox/runtime.h" #include "anbox/logger.h" @@ -85,6 +86,12 @@ anbox::cmds::Launch::Launch() auto bus = std::make_shared(core::dbus::WellKnownBus::session); bus->install_executor(core::dbus::asio::make_executor(bus, rt->service())); + const auto snap_path = utils::get_env_value("SNAP"); + if (!snap_path.empty()) { + const auto resource_path = utils::string_format("%s/share/anbox", snap_path); + SystemConfiguration::instance().set_resource_path(resource_path) + } + std::shared_ptr ss; // Instead of relying on the user session init system to start our