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
This commit is contained in:
Andy Williams 2014-05-05 21:53:11 +01:00
parent ac53c173dd
commit a44f7390e9
2 changed files with 2 additions and 0 deletions

View File

@ -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@\" \

View File

@ -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);