From a44f7390e9589df0a96fb6dfb700fca7d37c50d0 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Mon, 5 May 2014 21:53:11 +0100 Subject: [PATCH] Fix launching with SUDO to set the required environment into the sudo env. Not ideal, but if we have to use sudo then we have to replicate the required variables --- src/daemon/Makefile.am | 1 + src/daemon/entrance.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 801388e..8dd5dcd 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -6,6 +6,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/src/daemon \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -DSYSTEM_CONFIG_DIR=\"$(sysconfdir)\" \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_BIN_DIR=\"$(libdir)/$(PACKAGE)\" \ -DPACKAGE_SBIN_DIR=\"$(sbindir)/\" \ -DSUDO=\"@SUDO@\" \ diff --git a/src/daemon/entrance.c b/src/daemon/entrance.c index 20c9c08..92f39d3 100644 --- a/src/daemon/entrance.c +++ b/src/daemon/entrance.c @@ -188,6 +188,7 @@ _entrance_main(const char *dname) (Ecore_Event_Handler_Cb)_entrance_client_data, NULL); snprintf(buf, sizeof(buf), SUDO" -u nobody " + "LD_LIBRARY_PATH="PACKAGE_LIB_DIR" " PACKAGE_BIN_DIR"/entrance_client -d %s -t %s", dname, entrance_config->theme); PT("Exec entrance_client: %s\n", buf);