From e60c7adcd56fdf45d90c7b335ba7f5f543b6ae13 Mon Sep 17 00:00:00 2001 From: Antti Kervinen Date: Wed, 19 Jan 2011 15:55:59 +0200 Subject: [PATCH] Fixes: NB#220076 - applauncherd.bin does not work without link to /tmp/m.themedaemon Details: TMPDIR is hardcoded to /var/tmp, if it's not set already Revby: Jussi Lind --- README | 2 +- debian/changelog | 4 ++++ src/launcher/launcher.c | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README b/README index 8709987..cad6c99 100644 --- a/README +++ b/README @@ -328,7 +328,7 @@ This functionality is implemented in a position-independent executable called single-instance. Applauncherd uses this executable as a library, but it can be used as an ordinary program to start anything as a single instance: - /usr/bun/single-instance + /usr/bin/single-instance Note, that in this case the launcher is not used. diff --git a/debian/changelog b/debian/changelog index 026f765..5c8b58c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,10 @@ applauncherd (0.17.0) unstable; urgency=low * Fixes: NB#212024 - Application launcher should be usable (improve performance) also at boot + * Fixes: NB#220076 - applauncherd.bin does not work without link to /tmp/m.themedaemon + * Changes: support for --boot-mode in applauncherd.bin + * Changes: support for --help in applauncherd.bin + * Changes: support for --single-instance in invoker * Changes: --debug argument problem fixed in preloading * Changes: Corrected error on test-perf-mbooster.py * Changes: Commented out the single-instance test case skeletons diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index 0cdf36a..0d6479f 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -136,6 +136,12 @@ int main(int argc, char ** argv) helpWanted = 1; } + // Set environment. Because applauncherd is usually a privileged + // process, TMPDIR variable might be unset by the C library. In + // case it's not set, we set it to /var/tmp, which usually is not + // a RAM disk. + setenv("TMPDIR", "/var/tmp", 0); + // Preload libraries if (!helpWanted) loadLibraries(gLibs, sizeof(gLibs) / sizeof(char *));