diff --git a/CEP/Pipeline/recipes/sip/bin/startPython.sh b/CEP/Pipeline/recipes/sip/bin/startPython.sh
index 718f1dcafc7ffa52c50af46062d12ca59ffb5fa0..11caabd5e7ada8e6df318f44b63d8d557e72238f 100755
--- a/CEP/Pipeline/recipes/sip/bin/startPython.sh
+++ b/CEP/Pipeline/recipes/sip/bin/startPython.sh
@@ -7,7 +7,7 @@
 #
 # For example:
 #
-#   startPython.sh ./pythonProgram /opt/lofar/share/Observation6118 \
+#   startPython.sh ./pythonProgram /opt/lofar/var/run/Observation6118 \
 #                  MCU001T MCU001T:PythonControl[0]{6118}:listener  \
 #                  PythonServer{6118}@MCU001T 
 #
@@ -23,7 +23,7 @@ shopt -s expand_aliases
 debug=on
 
 # Log-file used for logging output of this script
-logFile=/opt/lofar/log/startPython.log
+logFile=/opt/lofar/var/log/startPython.log
 
 usage()
 {
@@ -45,7 +45,7 @@ programOptions=" \
  -d \
  -c ${LOFARROOT}/share/pipeline/pipeline.cfg \
  -t ${LOFARROOT}/share/pipeline/tasks.cfg \
- -r ${LOFARROOT}/share/pipeline \
+ -r ${LOFARROOT}/var/run/pipeline \
  -w /data/scratch/${USER}"
   
 # Print some debugging information if debugging is enabled.
diff --git a/CEP/Pipeline/recipes/sip/pipeline.cfg.in b/CEP/Pipeline/recipes/sip/pipeline.cfg.in
index f486638f6f822458eec90b22eed0e890ba0bcaed..0ac8e373673366a5236dd3113798ba1d1eb09c5c 100644
--- a/CEP/Pipeline/recipes/sip/pipeline.cfg.in
+++ b/CEP/Pipeline/recipes/sip/pipeline.cfg.in
@@ -5,7 +5,7 @@ pyraproot = @PYRAP_ROOT_DIR@
 hdf5root = $ENV{HDF5_ROOT}
 wcsroot = @WCSLIB_ROOT_DIR@
 pythonpath = @PYTHON_INSTALL_DIR@
-runtime_directory = %(lofarroot)s/share/pipeline
+runtime_directory = %(lofarroot)s/var/run/pipeline
 recipe_directories = [%(pythonpath)s/lofarpipe/recipes]
 working_directory = /data/scratch/$ENV{USER}
 task_files = [%(lofarroot)s/share/pipeline/tasks.cfg]
diff --git a/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt b/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt
index b412110693481d6e9408dcff60babe034139d821..b301c20b43812d75a86f5437477ae5c4b247d247 100644
--- a/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt
+++ b/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt
@@ -4,6 +4,7 @@
 set(inst_HEADERS
   AntField.h
   AntennaSets.h
+  LofarDirs.h
   Observation.h
   StationConfig.h
   StationDatatypes.h
diff --git a/MAC/APL/Appl_Controller/lofarDirs.h b/LCS/ApplCommon/include/ApplCommon/LofarDirs.h
similarity index 72%
rename from MAC/APL/Appl_Controller/lofarDirs.h
rename to LCS/ApplCommon/include/ApplCommon/LofarDirs.h
index facc48ccb56941e1d7c737f3c3b707a9fd7ecf70..13d80e89bac85901f17a297a55da3dd8521b6793 100644
--- a/MAC/APL/Appl_Controller/lofarDirs.h
+++ b/LCS/ApplCommon/include/ApplCommon/LofarDirs.h
@@ -1,4 +1,4 @@
-//#  lofarDirs.h: Definitions of some directories of LOFAR.
+//#  LofarDirs.h: Definitions of some directories of LOFAR.
 //#
 //#  Copyright (C) 2007
 //#  ASTRON (Netherlands Foundation for Research in Astronomy)
@@ -20,9 +20,13 @@
 //#
 //#  $Id$
 
-#ifndef ACCBIN_LOFARDIRS_H
-#define ACCBIN_LOFARDIRS_H
+#ifndef APPLCOMMON_LOFARDIRS_H
+#define APPLCOMMON_LOFARDIRS_H
 
-#define	LOFAR_SHARE_LOCATION		"/opt/lofar/share"
+#define LOFAR_BASE_LOCATION		"/opt/lofar"
+#define LOFAR_BIN_LOCATION		"/opt/lofar/bin"
+#define LOFAR_CONFIG_LOCATION	"/opt/lofar/etc"
+#define LOFAR_SHARE_LOCATION	"/opt/lofar/var/run"
+#define LOFAR_LOG_LOCATION		"/opt/lofar/var/log"
 
 #endif
diff --git a/LCS/ApplCommon/include/ApplCommon/StationInfo.h b/LCS/ApplCommon/include/ApplCommon/StationInfo.h
index d37c7eb9b240aa6543a39d01a59e55e26fc5fd9c..fba98ff296f7cc55ffbef1323270b715f4b8bf74 100644
--- a/LCS/ApplCommon/include/ApplCommon/StationInfo.h
+++ b/LCS/ApplCommon/include/ApplCommon/StationInfo.h
@@ -28,6 +28,7 @@
 
 //# Never #include <config.h> or #include <lofar_config.h> in a header file!
 //# Includes
+#include <ApplCommon/LofarDirs.h>
 
 //# Avoid 'using namespace' in headerfiles
 
@@ -36,12 +37,6 @@ namespace LOFAR {
 // \addtogroup ApplCommon
 // @{
 
-#define LOFAR_BASE_LOCATION		"/opt/lofar"
-#define LOFAR_BIN_LOCATION		"/opt/lofar/bin"
-#define LOFAR_CONFIG_LOCATION	"/opt/lofar/etc"
-#define LOFAR_SHARE_LOCATION	"/opt/lofar/share"
-#define LOFAR_LOG_LOCATION		"/opt/lofar/log"
-
 //
 // Nameconventions dictate that the hostname has the following syntax:
 //
diff --git a/MAC/APL/APLCommon/src/ChildControl.cc b/MAC/APL/APLCommon/src/ChildControl.cc
index 462799c2564cba93b63e466e05eab5d6a06f9f9c..123725f32808508c147b376041d3f3d6541a0159 100644
--- a/MAC/APL/APLCommon/src/ChildControl.cc
+++ b/MAC/APL/APLCommon/src/ChildControl.cc
@@ -28,6 +28,7 @@
 #include <Common/LofarLogger.h>
 #include <Common/SystemUtil.h>
 #include <Common/ParameterSet.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 #include <GCF/TM/GCF_Protocols.h>
 #include <MACIO/MACServiceInfo.h>
diff --git a/MAC/APL/APLCommon/src/ControllerDefines.cc b/MAC/APL/APLCommon/src/ControllerDefines.cc
index 077226988a1954b16ce8e10e7acd3ec7626e3a41..5f06e931287e84cf290d2357b91535455ab942ad 100644
--- a/MAC/APL/APLCommon/src/ControllerDefines.cc
+++ b/MAC/APL/APLCommon/src/ControllerDefines.cc
@@ -29,6 +29,7 @@
 #include <Common/SystemUtil.h>
 #include <Common/ParameterSet.h>					// indexValue
 #include <APL/APLCommon/ControllerDefines.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 #include "Controller_Protocol.ph"
 
diff --git a/MAC/APL/Appl_Controller/ACDaemon.cc b/MAC/APL/Appl_Controller/ACDaemon.cc
index 539f86b7e4232fcf4f66188b83f080ad2c7639ce..341312a856902b3b5c1f1fb943840e45b53f791f 100644
--- a/MAC/APL/Appl_Controller/ACDaemon.cc
+++ b/MAC/APL/Appl_Controller/ACDaemon.cc
@@ -27,10 +27,10 @@
 #include <Common/LofarLogger.h>
 #include <Common/LofarLocators.h>
 #include <Common/SystemUtil.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ALC/ACRequest.h>
 #include "ACDaemon.h"
 #include "ACDaemonComm.h"
-#include "lofarDirs.h"
 #include "forkexec.h"
 
 namespace LOFAR {
diff --git a/MAC/APL/Appl_Controller/ApplController.cc b/MAC/APL/Appl_Controller/ApplController.cc
index 83143121f8812bbb23d634daae624dac7bab4d39..e8a705370b1631223b91d3b58ccf90057a39a48e 100644
--- a/MAC/APL/Appl_Controller/ApplController.cc
+++ b/MAC/APL/Appl_Controller/ApplController.cc
@@ -27,6 +27,7 @@
 #include <Common/LofarLogger.h>
 #include <Common/LofarLocators.h>
 #include <Common/StringUtil.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ALC/ACCmd.h>
 #include <PLC/ProcControlComm.h>
 #include <MACIO/MACServiceInfo.h>
@@ -36,7 +37,6 @@
 #include "PR_MPI.h"				// TODO: factory!
 #include "PR_BGL.h"				// TODO: factory!
 #include "ItemList.h"			// @@
-#include "lofarDirs.h"
 
 namespace LOFAR {
   using namespace MACIO;
diff --git a/MAC/APL/Appl_Controller/startAP.sh b/MAC/APL/Appl_Controller/startAP.sh
index cd645a5707db192a3846165baaa4c4efe23a12a2..ce8d145a1c57e8973112d16b82565aa61ec14b32 100755
--- a/MAC/APL/Appl_Controller/startAP.sh
+++ b/MAC/APL/Appl_Controller/startAP.sh
@@ -21,4 +21,4 @@ $3 ACC $4 $2 &
 pid=`echo $!`
 
 # construct pid file for stop shell
-echo "$pid" > /opt/lofar/share/$2.pid
+echo "$pid" > /opt/lofar/var/run/$2.pid
diff --git a/MAC/APL/Appl_Controller/stopAP.sh b/MAC/APL/Appl_Controller/stopAP.sh
index 651e2dc6ed1df7157dfcb851a3e4e677cf0d520b..1984d5a8a53eaee28706a52c5e607adedf99c2aa 100755
--- a/MAC/APL/Appl_Controller/stopAP.sh
+++ b/MAC/APL/Appl_Controller/stopAP.sh
@@ -9,6 +9,6 @@
 # DISABLED this script: startBGL.sh starts all CEP processes
 exit
 
-echo -n "Killing process "; cat /opt/lofar/share/$2.pid
-kill -9 `cat /opt/lofar/share/$2.pid`
-rm -f /opt/lofar/share/$2.pid /opt/lofar/share/$2.parset
+echo -n "Killing process "; cat /opt/lofar/var/run/$2.pid
+kill -9 `cat /opt/lofar/var/run/$2.pid`
+rm -f /opt/lofar/var/run/$2.pid /opt/lofar/var/run/$2.parset
diff --git a/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc b/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc
index 25296ce4a30bc980d15c6056794ae950575ee5bf..f84a7f980449a732ff9b6737bd789831f3b7022c 100644
--- a/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc
+++ b/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc
@@ -25,15 +25,15 @@
 #include <Common/LofarLocators.h>
 #include <Common/StringUtil.h>
 #include <Common/ParameterSet.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/Observation.h>
+#include <ApplCommon/StationInfo.h>
 
 #include <GCF/PVSS/GCF_PVTypes.h>
 #include <GCF/PVSS/PVSSinfo.h>
 #include <MACIO/MACServiceInfo.h>
 #include <APL/APLCommon/ControllerDefines.h>
 #include <APL/APLCommon/Controller_Protocol.ph>
-//#include <APL/RTDBCommon/RTDButilities.h>
-//#include <APL/APLCommon/StationInfo.h>
 #include <GCF/RTDB/DP_Protocol.ph>
 #include <signal.h>
 #include <stdlib.h>
@@ -412,8 +412,9 @@ void CEPlogProcessor::processParset( const std::string &observationID )
       return;
     }
 
-    // parsets are in /opt/lofar/share
-    string filename(formatString("/opt/lofar/share/Observation%s", observationID.c_str()));
+    // parsets are in LOFAR_SHARE_LOCATION
+    string filename(formatString("%s/Observation%s", 
+                                 LOFAR_SHARE_LOCATION, observationID.c_str()));
 
     ParameterSet parset(filename);
 
diff --git a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc
index 9c1be313c2cd0b74ab0befa27b9223418261b587..8a5b5c45af27b7379a1424cae1dfb37127dac9e2 100644
--- a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc
+++ b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc
@@ -31,6 +31,7 @@
 #include <ApplCommon/StationInfo.h>
 #include <GCF/PVSS/GCF_PVTypes.h>
 #include <Common/SystemUtil.h>
+#include <ApplCommon/LofarDirs.h>
 #include <MACIO/MACServiceInfo.h>
 #include <GCF/TM/GCF_Protocols.h>
 #include <APL/APLCommon/APL_Defines.h>
diff --git a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc
index 599402f7d5c675c17d2a661d9d557ad7177c3fc6..6ca68cbe2fd7f54e5800358cc0b2055af4d643e2 100644
--- a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc
+++ b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc
@@ -31,6 +31,7 @@
 #include <Common/ParameterRecord.h>
 #include <Common/Exceptions.h>
 #include <Common/SystemUtil.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 #include <MACIO/MACServiceInfo.h>
 #include <MACIO/KVTLogger.h>
diff --git a/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.log_prop b/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.log_prop
index 4931ea10421e7ecfe152be318920f950edf492f4..81123236264e6840762ad50150928395af23ad8b 100644
--- a/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.log_prop
+++ b/MAC/APL/CURTDBDaemons/src/LogProcessor/LogProcessor.log_prop
@@ -16,7 +16,7 @@ log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
 log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S} %-5p %c{3} - %m [%.25l]%n
 
 log4cplus.appender.FILE=log4cplus::RollingFileAppender
-log4cplus.appender.FILE.File=/opt/lofar/log/${LOG4CPLUS_LOGFILENAME}.log
+log4cplus.appender.FILE.File=/opt/lofar/var/log/${LOG4CPLUS_LOGFILENAME}.log
 log4cplus.appender.FILE.MaxFileSize=10MB
 log4cplus.appender.FILE.MaxBackupIndex=9
 log4cplus.appender.FILE.layout=log4cplus::PatternLayout
diff --git a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc
index a268379495b3256191fc64e47b1d31fbcd7b96f8..332515fdc41eff451a7b07ee732acca21f41fbb6 100644
--- a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc
+++ b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc
@@ -27,6 +27,7 @@
 #include <Common/StringUtil.h>
 #include <Common/StreamUtil.h>
 #include <Common/ParameterSet.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 
 #include <MACIO/MACServiceInfo.h>
diff --git a/MAC/APL/Log_Client/src/LogClient.cc b/MAC/APL/Log_Client/src/LogClient.cc
index 6669ca9fe205bb6b2f68dc8d468d8c1f42725c80..0dbecaced935a1bdb4e6acb276f1edf3cf665b49 100644
--- a/MAC/APL/Log_Client/src/LogClient.cc
+++ b/MAC/APL/Log_Client/src/LogClient.cc
@@ -25,7 +25,8 @@
 #include <Common/lofar_fstream.h>
 #include <Common/Version.h>
 #include <Common/ParameterSet.h>
-#include <ApplCommon/StationInfo.h>		// LOFAR_SHARE_LOCATION
+#include <ApplCommon/LofarDirs.h>
+#include <ApplCommon/StationInfo.h>
 //#include <GCF/PVSS/GCF_PVTypes.h>
 #include <MACIO/MACServiceInfo.h>
 #include <MACIO/LOG_Protocol.ph>
diff --git a/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc b/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc
index 1a2aaa683ca3fed5f88a30a817a19ea7d70236f1..c3b12b9db1808233973140ad54981c1e26e7ea4d 100644
--- a/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc
+++ b/MAC/APL/MainCU/src/CRTriggerControl/TriggerControl.cc
@@ -31,6 +31,7 @@
 #include <Common/Version.h>
 #include <Common/StringUtil.h>
 #include <Common/lofar_string.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 #include <ApplCommon/Observation.h>
 
diff --git a/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc b/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc
index b453f8f926d8e8dd639f94e7073f67ddb2a1464d..15e7649bf3dbe5e3f4f7e76dd646a07c3c4905a9 100644
--- a/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc
+++ b/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc
@@ -25,7 +25,7 @@
 #include <Common/StreamUtil.h>
 #include <Common/Version.h>
 #include <Common/ParameterSet.h>
-#include <ApplCommon/StationConfig.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 
 #include <GCF/TM/GCF_Protocols.h>
diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
index e4f448049c8bdc7dadbfa74ec31cc54cbde2cfb6..01ee0d27d866cdb4b9d80bc6bcf3ab82d2fb12f2 100644
--- a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
+++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
@@ -26,6 +26,7 @@
 #include <Common/ParameterSet.h>
 #include <Common/SystemUtil.h>
 #include <ApplCommon/StationInfo.h>
+#include <ApplCommon/LofarDirs.h>
 
 #include <MACIO/MACServiceInfo.h>
 #include <APL/APLCommon/APL_Defines.h>
diff --git a/MAC/APL/PAC/ITRFCalServer/src/CalServer.cc b/MAC/APL/PAC/ITRFCalServer/src/CalServer.cc
index cdf90f5df327619ec73d67ca1ebd6a0033539861..a3aa93871cd291f600bafcdd72d5903c8a249343 100644
--- a/MAC/APL/PAC/ITRFCalServer/src/CalServer.cc
+++ b/MAC/APL/PAC/ITRFCalServer/src/CalServer.cc
@@ -31,6 +31,8 @@
 #include <Common/ParameterSet.h>
 #include <Common/Version.h>
 
+#include <ApplCommon/LofarDirs.h>
+
 #include <APL/APLCommon/AntennaField.h>
 #include <APL/APLCommon/AntennaSets.h>
 #include <APL/ICAL_Protocol/ICAL_Protocol.ph>
@@ -154,9 +156,9 @@ GCFEvent::TResult CalServer::initial(GCFEvent& event, GCFPortInterface& port)
 			LOG_INFO_STR("Calibration subbandrange: " << itsLowestSubband << ".." << itsHighestSubband);
 
 			// Setup datapath
-			itsDataDir = globalParameterSet()->getString("CalServer.DataDirectory", "/opt/lofar/log");
+			itsDataDir = globalParameterSet()->getString("CalServer.DataDirectory", LOFAR_LOG_LOCATION);
 			if (itsDataDir.empty()) {
-				itsDataDir="/opt/lofar/log";
+				itsDataDir = LOFAR_LOG_LOCATION;
 			}
 			else if ((*itsDataDir.rbegin()) == '/') {       // strip off last /
 				itsDataDir.erase(itsDataDir.length()-1);
diff --git a/MAC/APL/PIC/TBB_Driver/src/TBBDriver.conf.in b/MAC/APL/PIC/TBB_Driver/src/TBBDriver.conf.in
index 4c4c05e26b39e3e89724e55e9e66c01f009d0b36..2b76240905f70cbc02805280aa8b1280e530c439 100644
--- a/MAC/APL/PIC/TBB_Driver/src/TBBDriver.conf.in
+++ b/MAC/APL/PIC/TBB_Driver/src/TBBDriver.conf.in
@@ -4,7 +4,7 @@
 
 #
 # Write trigger message info to a file
-# see opt/lofar/log/ <date>_TRIGGER.dat
+# see opt/lofar/var/log/ <date>_TRIGGER.dat
 # 
 TBBDriver.SAVE_TRIGGERS_TO_FILE=1
 
diff --git a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
index d96efad88d9a6710a3435313170dae9f4a36349c..e12b87698223b87085be122a0f8aafeafa655a0f 100644
--- a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
+++ b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc
@@ -23,6 +23,7 @@
 #include <Common/LofarLogger.h>
 #include <Common/StreamUtil.h>
 #include <Common/Version.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/Observation.h>
 #include <ApplCommon/StationConfig.h>
 #include <ApplCommon/StationInfo.h>
diff --git a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc
index 236fe5a1f2ad350af37a012811aaa035cefcef03..de7558ab56baa62fe1eba0c0c7d2f01bd0e8a3c0 100644
--- a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc
+++ b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc
@@ -23,6 +23,7 @@
 #include <Common/LofarLogger.h>
 #include <Common/lofar_datetime.h>
 #include <Common/Version.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationConfig.h>
 #include <ApplCommon/StationInfo.h>
 #include <ApplCommon/AntennaSets.h>
diff --git a/MAC/APL/StationCU/src/StationControl/StationControl.cc b/MAC/APL/StationCU/src/StationControl/StationControl.cc
index 770a5e5da130ec15f83612dc536c610bdf21496a..a385c05b0dbb9caaf1f1b282914046ef511c8685 100644
--- a/MAC/APL/StationCU/src/StationControl/StationControl.cc
+++ b/MAC/APL/StationCU/src/StationControl/StationControl.cc
@@ -29,6 +29,7 @@
 #include <Common/LofarConstants.h>
 #include <Common/SystemUtil.h>
 #include <Common/Version.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationConfig.h>
 #include <ApplCommon/StationInfo.h>
 
diff --git a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
index a9941955356e71c4c6655502d7fe9e6e6f8d47eb..e5c517cbdd45ef26fd3fa8d9c0a278997f60737f 100644
--- a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
+++ b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc
@@ -27,6 +27,7 @@
 #include <Common/LofarLocators.h>
 #include <Common/Version.h>
 #include <Common/ParameterSet.h>
+#include <ApplCommon/LofarDirs.h>
 #include <ApplCommon/StationInfo.h>
 #include <ApplCommon/StationConfig.h>
 
diff --git a/MAC/APL/TestCtlr/CMakeLists.txt b/MAC/APL/TestCtlr/CMakeLists.txt
index 300a1695abb7c11b8f9bdcf08ace17892241d910..5cd9c6b2998b58c1c5bd6dda15ba708ec8d06478 100644
--- a/MAC/APL/TestCtlr/CMakeLists.txt
+++ b/MAC/APL/TestCtlr/CMakeLists.txt
@@ -1,6 +1,6 @@
 # $Id$
 
-lofar_package(TestCtlr 1.0 DEPENDS Common APLCommon MACIO GCFTM)
+lofar_package(TestCtlr 1.0 DEPENDS Common ApplCommon APLCommon MACIO GCFTM)
 
 include(LofarFindPackage)
 lofar_find_package(Boost REQUIRED)
diff --git a/MAC/APL/TestCtlr/src/ControllerMenu.cc b/MAC/APL/TestCtlr/src/ControllerMenu.cc
index 9f115e11fb180adc04c6c978eafe32010b93d07a..95f171d43f2e2262c8bd27b31b9b69560d4468de 100644
--- a/MAC/APL/TestCtlr/src/ControllerMenu.cc
+++ b/MAC/APL/TestCtlr/src/ControllerMenu.cc
@@ -26,6 +26,8 @@
 #include <Common/SystemUtil.h>
 
 #include <Common/ParameterSet.h>
+#include <ApplCommon/LofarDirs.h>
+#include <ApplCommon/StationInfo.h>
 #include <MACIO/MACServiceInfo.h>
 #include <APL/APLCommon/APL_Defines.h>
 #include <APL/APLCommon/ControllerDefines.h>
@@ -547,8 +549,9 @@ void ControllerMenu::_doStartMenu()
 {
 	cout << endl;
 	cout << "You need an exportFile from OTDB containing an Observation." << endl;
-	cout << "Its name has the format /opt/lofar/share/Observation<nr>." << endl;
-	string	command("ls -1 /opt/lofar/share/Observation[0-9]*");
+	cout << "Its name has the format " << LOFAR_SHARE_LOCATION 
+	     << "/Observation<nr>." << endl;
+	string	command("ls -1 " LOFAR_SHARE_LOCATION "/Observation[0-9]*");
 	system(command.c_str());
 
 	int32	obsnr(-1);
@@ -562,7 +565,8 @@ void ControllerMenu::_doStartMenu()
 			return;
 		}
 		ifstream	iFile;
-		string obsFileName(formatString("/opt/lofar/share/Observation%d", obsnr));
+		string obsFileName(formatString("%s/Observation%d", 
+		                                LOFAR_SHARE_LOCATION, obsnr));
 		iFile.open(obsFileName.c_str(), ifstream::in);
 		if (!iFile) {
 			cout << endl << "Cannot open file " << obsFileName << endl;
diff --git a/MAC/APL/VHECR/CMakeLists.txt b/MAC/APL/VHECR/CMakeLists.txt
index 43d470abc82b7ee6c24e38b75a98712ff7aec0f2..5bc46e9637ca93327a0e98a725c757ea3567e112 100644
--- a/MAC/APL/VHECR/CMakeLists.txt
+++ b/MAC/APL/VHECR/CMakeLists.txt
@@ -1,6 +1,6 @@
 # $Id$
 
-lofar_package(VHECR 1.0 DEPENDS Common APLCommon)
+lofar_package(VHECR 1.0 DEPENDS Common ApplCommon APLCommon)
 
 include(LofarFindPackage)
 lofar_find_package(Boost REQUIRED COMPONENTS date_time program_options)
diff --git a/MAC/APL/VHECR/src/VHECRTask.cc b/MAC/APL/VHECR/src/VHECRTask.cc
index ab8d39ede2fa645863d191d2e9cb9ad4a3d77f53..ca98e58a6a72f43ad3b7309729ff4d1daebc94f5 100644
--- a/MAC/APL/VHECR/src/VHECRTask.cc
+++ b/MAC/APL/VHECR/src/VHECRTask.cc
@@ -22,6 +22,7 @@
 #include <lofar_config.h>
 #include <Common/LofarLogger.h>
 #include <Common/LofarLocators.h>
+#include <ApplCommon/LofarDirs.h>
 // #include <APS/ParameterSet.h>
 #include <time.h>
 #include <fstream>
@@ -89,9 +90,9 @@ namespace LOFAR {
     itsParameterSet = new ParameterSet(cl.locate(cntlrName));
     itsSettings = new VHECRsettings(itsParameterSet);  // does all nasty conversions
 
-    itsConfigurationFile = "/opt/lofar/etc/VHECRtask.conf"; // /opt/lofar/etc/
-    itsOutputFilename = "/opt/lofar/log/VHECRtaskLogTest.dat";
-    itsAntennaPositionsFile = "/opt/lofar/etc/AntennaArrays.conf"; // hardcoded but can be overridden by VHECRtask.conf config file
+    itsConfigurationFile = LOFAR_CONFIG_LOCATION "/VHECRtask.conf"; // /opt/lofar/etc/
+    itsOutputFilename = LOFAR_LOG_LOCATION "/VHECRtaskLogTest.dat";
+    itsAntennaPositionsFile = LOFAR_CONFIG_LOCATION "/AntennaArrays.conf"; // hardcoded but can be overridden by VHECRtask.conf config file
     // which is read in only now:
     readConfigFile(itsConfigurationFile.c_str());
     setup();
diff --git a/MAC/Deployment/data/OTDB/loadComponents b/MAC/Deployment/data/OTDB/loadComponents
index 0e9465df7391ac4fa3039cf8a95ff1caab53bd37..a6ca0ba3781652fbb308c783e5effc0ce7974b03 100755
--- a/MAC/Deployment/data/OTDB/loadComponents
+++ b/MAC/Deployment/data/OTDB/loadComponents
@@ -230,7 +230,7 @@ if [ -e $DIR/load_OTDB_comps ]; then
     arguments=$arguments" -q "$QUAL 
   fi
   if [ $localUse = 0 ]; then
-    logfile="/opt/lofar/log/loadComponents.log"
+    logfile="/opt/lofar/var/log/loadComponents.log"
   else
     logfile="./loadComponents.log"
   fi
diff --git a/MAC/Deployment/data/OTDB/loadPICtree b/MAC/Deployment/data/OTDB/loadPICtree
index 43f4f3aa50dc7b45031adeae6addb818504eb872..2c0cce2b7999c11d4601832394ada82c6c1b7b86 100755
--- a/MAC/Deployment/data/OTDB/loadPICtree
+++ b/MAC/Deployment/data/OTDB/loadPICtree
@@ -99,7 +99,7 @@ if [[ -e $DIR/PVSS2SAS ]] && [[ -e $DIR/load_PICtree ]]; then
   arguments=$DATABASE
   arguments=$arguments" "$HOST
   if [ $localUse = 0 ]; then 
-    logfile="/opt/lofar/log/loadPICtree.log"
+    logfile="/opt/lofar/var/log/loadPICtree.log"
   else
     logfile="./loadPICtree.log"
   fi
diff --git a/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.test b/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.test
index 2a977fa7716132ee7de9c77f2fef6d9515d4d2f6..4475f7a5cdcab05cdc5c966c0144e37844daee99 100644
--- a/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.test
+++ b/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.test
@@ -8,7 +8,7 @@
 
 #
 # Write trigger message info to a file
-# see /opt/lofar/log/<date>_TRIGGER.dat
+# see /opt/lofar/var/log/<date>_TRIGGER.dat
 # 
 TBBDriver.SAVE_TRIGGERS_TO_FILE=1
 
diff --git a/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.tmpl b/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.tmpl
index 8153c075fc4dbed790b308c240290f0fd28fa111..34e7427c75764ee104805c516cf5d9192bbb8711 100644
--- a/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.tmpl
+++ b/MAC/Deployment/data/StaticMetaData/TBBDriver.conf.tmpl
@@ -8,7 +8,7 @@
 
 #
 # Write trigger message info to a file
-# see /opt/lofar/log/<date>_TRIGGER.dat
+# see /opt/lofar/var/log/<date>_TRIGGER.dat
 # 
 TBBDriver.SAVE_TRIGGERS_TO_FILE=1
 
diff --git a/MAC/GCF/TM/src/mac.log_prop b/MAC/GCF/TM/src/mac.log_prop
index 0367e7c3ce58eb1532da368a0029bc03cc458c4f..64a96f2f38af0426879a993ccbdc4e55c17c87af 100644
--- a/MAC/GCF/TM/src/mac.log_prop
+++ b/MAC/GCF/TM/src/mac.log_prop
@@ -33,14 +33,14 @@ log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
 log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S} %-5p %c{3} - %m [%.25l]%n
 
 log4cplus.appender.DAILYFILE=log4cplus::DailyRollingFileAppender
-log4cplus.appender.DAILYFILE.File=/opt/lofar/log/${LOG4CPLUS_LOGFILENAME}.log
+log4cplus.appender.DAILYFILE.File=/opt/lofar/var/log/${LOG4CPLUS_LOGFILENAME}.log
 log4cplus.appender.DAILYFILE.Schedule=DAILY
 log4cplus.appender.DAILYFILE.MaxBackupIndex=14
 log4cplus.appender.DAILYFILE.layout=log4cplus::PatternLayout
 log4cplus.appender.DAILYFILE.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S} %-5p %c{3} - %m [%.25l]%n
 
 log4cplus.appender.ROLFILE=log4cplus::RollingFileAppender
-log4cplus.appender.ROLFILE.File=/opt/lofar/log/${LOG4CPLUS_LOGFILENAME}.log
+log4cplus.appender.ROLFILE.File=/opt/lofar/var/log/${LOG4CPLUS_LOGFILENAME}.log
 log4cplus.appender.ROLFILE.MaxFileSize=10MB
 log4cplus.appender.ROLFILE.MaxBackupIndex=9
 log4cplus.appender.ROLFILE.layout=log4cplus::PatternLayout
diff --git a/MAC/GCF/TM/src/mac_debug.log_prop b/MAC/GCF/TM/src/mac_debug.log_prop
index 1b47fdefea5e8ecfba1de7abc6b3550664341057..a4ef3adc42d4db53c33a6f345ec035ccb4d7a9ba 100644
--- a/MAC/GCF/TM/src/mac_debug.log_prop
+++ b/MAC/GCF/TM/src/mac_debug.log_prop
@@ -33,14 +33,14 @@ log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
 log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S} %-5p %c{3} - %m [%.25l]%n
 
 log4cplus.appender.DAILYFILE=log4cplus::DailyRollingFileAppender
-log4cplus.appender.DAILYFILE.File=/opt/lofar/log/${LOG4CPLUS_LOGFILENAME}.log
+log4cplus.appender.DAILYFILE.File=/opt/lofar/var/log/${LOG4CPLUS_LOGFILENAME}.log
 log4cplus.appender.DAILYFILE.Schedule=DAILY
 log4cplus.appender.DAILYFILE.MaxBackupIndex=14
 log4cplus.appender.DAILYFILE.layout=log4cplus::PatternLayout
 log4cplus.appender.DAILYFILE.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S} %-5p %c{3} - %m [%.25l]%n
 
 log4cplus.appender.ROLFILE=log4cplus::RollingFileAppender
-log4cplus.appender.ROLFILE.File=/opt/lofar/log/${LOG4CPLUS_LOGFILENAME}.log
+log4cplus.appender.ROLFILE.File=/opt/lofar/var/log/${LOG4CPLUS_LOGFILENAME}.log
 log4cplus.appender.ROLFILE.MaxFileSize=10MB
 log4cplus.appender.ROLFILE.MaxBackupIndex=9
 log4cplus.appender.ROLFILE.layout=log4cplus::PatternLayout
diff --git a/RTCP/CNProc/test/tCN_Processing_alloc.parset b/RTCP/CNProc/test/tCN_Processing_alloc.parset
index 0e5bde807731b7a74601ae29d42f518acf5db0fd..bc489a5b1d71a05b8cff9cc9e240f0065406c08b 100644
--- a/RTCP/CNProc/test/tCN_Processing_alloc.parset
+++ b/RTCP/CNProc/test/tCN_Processing_alloc.parset
@@ -1,7 +1,7 @@
 ApplCtrl.application = CorrAppl
 ApplCtrl.procesOrder = []
 ApplCtrl.processes = [CorrProc]
-ApplCtrl.resultfile = '/opt/lofar/share/ACC_CCU001:OnlineControl[0]{31821}_CorrAppl_result.param'
+ApplCtrl.resultfile = '/opt/lofar/var/run/ACC_CCU001:OnlineControl[0]{31821}_CorrAppl_result.param'
 ApplCtrl.timeout_createsubsets = 30s
 ApplCtrl.timeout_define = 30s
 ApplCtrl.timeout_info = 30s
diff --git a/RTCP/Run/src/startBGL.sh b/RTCP/Run/src/startBGL.sh
index da33e60339a4e518c5a9b07cb3ab5e8b716e62ba..cf291b7ae5fb71b6cc267d73f6bfd7f3b6685a36 100755
--- a/RTCP/Run/src/startBGL.sh
+++ b/RTCP/Run/src/startBGL.sh
@@ -25,7 +25,7 @@ date
 echo starting obs $OBSID
 echo "---------------"
 
-STORAGE_PARSET=/opt/lofar/log/L$OBSID.parset
+STORAGE_PARSET=/opt/lofar/var/log/L$OBSID.parset
 
 # Convert keys where needed
 /opt/lofar/bin/LOFAR/Parset.py -P $PARTITION $PARSET /opt/lofar/etc/OLAP.parset <(echo "$EXTRA_KEYS") > $IONPROC_PARSET &&
@@ -33,11 +33,11 @@ STORAGE_PARSET=/opt/lofar/log/L$OBSID.parset
 # Copy the parset to NFS for post processing
 (cp $IONPROC_PARSET $STORAGE_PARSET || true) &&
 
-# Make the /opt/lofar/log/latest symlink
-(ln -sfT `dirname $STORAGE_PARSET` /opt/lofar/log/latest || true) &&
+# Make the /opt/lofar/var/log/latest symlink
+(ln -sfT `dirname $STORAGE_PARSET` /opt/lofar/var/log/latest || true) &&
 
-# Make the /opt/lofar/log/latest.parset symlink
-(ln -sfT $STORAGE_PARSET /opt/lofar/log/latest.parset || true) &&
+# Make the /opt/lofar/var/log/latest.parset symlink
+(ln -sfT $STORAGE_PARSET /opt/lofar/var/log/latest.parset || true) &&
 
 # Inject the parset into the correlator
 /opt/lofar/bin/commandOLAP.py -P $PARTITION parset $IONPROC_PARSET
diff --git a/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000 b/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000
index bd6e73f0054e228bf72eec4f1cdc8323a1da7881..4b18640835c1e8f55cb96b4c4e96f8968ab8f14e 100644
--- a/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000
+++ b/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000
@@ -1,7 +1,7 @@
 ApplCtrl.application = CorrAppl
 ApplCtrl.procesOrder = []
 ApplCtrl.processes = [CNProc]
-ApplCtrl.resultfile = '/opt/lofar/share/ACC_CCU001:OnlineControl[0]{24523}_CorrAppl_result.param'
+ApplCtrl.resultfile = '/opt/lofar/var/run/ACC_CCU001:OnlineControl[0]{24523}_CorrAppl_result.param'
 ApplCtrl.timeout_createsubsets = 3m
 ApplCtrl.timeout_define = 40
 ApplCtrl.timeout_info = 30
diff --git a/RTCP/Storage/test/tMeasurementSetFormat.parset-sun b/RTCP/Storage/test/tMeasurementSetFormat.parset-sun
index f03080e0b673f6f8715011bf8af99985bc16ff6b..8e8bd1da6cbf7640f7cb2e763e906533fee9c86c 100644
--- a/RTCP/Storage/test/tMeasurementSetFormat.parset-sun
+++ b/RTCP/Storage/test/tMeasurementSetFormat.parset-sun
@@ -1,7 +1,7 @@
 ApplCtrl.application = CorrAppl
 ApplCtrl.procesOrder = []
 ApplCtrl.processes = [CNProc]
-ApplCtrl.resultfile = '/opt/lofar/share/ACC_CCU001:OnlineControl[0]{24523}_CorrAppl_result.param'
+ApplCtrl.resultfile = '/opt/lofar/var/run/ACC_CCU001:OnlineControl[0]{24523}_CorrAppl_result.param'
 ApplCtrl.timeout_createsubsets = 3m
 ApplCtrl.timeout_define = 40
 ApplCtrl.timeout_info = 30
diff --git a/SAS/Beaminfo/CMakeLists.txt b/SAS/Beaminfo/CMakeLists.txt
index bd46be3cb7c49070801961e63b6a7946e8783532..bf0a8a6f7610aedb12e7178eb4dea6df6e71f2c3 100644
--- a/SAS/Beaminfo/CMakeLists.txt
+++ b/SAS/Beaminfo/CMakeLists.txt
@@ -1,6 +1,6 @@
 # $Id: CMakeLists.txt 16887 2011-09-20 10:46:43Z duscha $
 
-lofar_package(Beaminfo 0.1 DEPENDS Common MSLofar OTDB) 
+lofar_package(Beaminfo 0.1 DEPENDS Common ApplCommon MSLofar OTDB) 
 
 include(LofarFindPackage)
 lofar_find_package(Casacore COMPONENTS casa ms tables REQUIRED)
diff --git a/SAS/Beaminfo/src/failedtiles2ms.cc b/SAS/Beaminfo/src/failedtiles2ms.cc
index 870283d840f36676b14ea439d443eac5795cb54a..ddf0e9b278ef16b4dcd80669fb9b5f602fb2773d 100644
--- a/SAS/Beaminfo/src/failedtiles2ms.cc
+++ b/SAS/Beaminfo/src/failedtiles2ms.cc
@@ -35,7 +35,7 @@ int main (int argc, char* argv[])
 {
   try {
     // Init logger.
-    INIT_LOGGER (basename(argv[0]));
+    INIT_LOGGER (LOFAR::basename(argv[0]));
     // Define the input parameters.
     InputParSet inputs;
     inputs.setVersion ("24-Jan-2012 SD/GvD");
diff --git a/SAS/Beaminfo/src/failedtilesinfo.cc b/SAS/Beaminfo/src/failedtilesinfo.cc
index 880d0dee591a59416c4fa11daae997ff3cbeea5b..0cf53b1d5c99db1810e0309c0f5c2a3a79b902a2 100644
--- a/SAS/Beaminfo/src/failedtilesinfo.cc
+++ b/SAS/Beaminfo/src/failedtilesinfo.cc
@@ -28,6 +28,7 @@
 #include <Common/LofarLogger.h>
 #include <Common/SystemUtil.h>    // needed for basename
 #include <Common/Exception.h>     // THROW macro for exceptions
+#include <ApplCommon/LofarDirs.h>
 
 // SAS
 #include <OTDB/OTDBconstants.h>
@@ -145,8 +146,8 @@ int main (int argc, char* argv[])
     string password    = parset.getString("password", "boskabouter");
     string port        = parset.getString("port", "5432");
     // Locations to save SAS hardware strings of broken and failed tiles to
-    string brokenfilename = parset.getString("brokenTilesFile", "/opt/lofar/share/brokenTiles.txt");
-    string failedfilename = parset.getString("failedTilesFile", "/opt/lofar/share/failedTiles.txt");
+    string failedfilename = parset.getString("failedTilesFile", LOFAR_SHARE_LOCATION "/failedTiles.txt");
+    string brokenfilename = parset.getString("brokenTilesFile", LOFAR_SHARE_LOCATION "/brokenTiles.txt");
 
     //---------------------------------------------------------------------
     // Handle observation starttime and endtime
diff --git a/SAS/OTB/scripts/src/checkOTDBServer b/SAS/OTB/scripts/src/checkOTDBServer
index 93381e2ddd00128e7f8a53592e2c29123caba946..d8fc183332e5514d14ceca0cd04d76cdd8338ce0 100755
--- a/SAS/OTB/scripts/src/checkOTDBServer
+++ b/SAS/OTB/scripts/src/checkOTDBServer
@@ -2,13 +2,13 @@ export serverDir=/opt/sas/server
 export clientDir=/opt/sas/client
 export JAVAHOME=/usr/java/jdk1.6.0_07
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$serverDir
-check_logfile=/opt/lofar/log/checkOTDBServer.log
+check_logfile=/opt/lofar/var/log/checkOTDBServer.log
 check_curdate=`date +%Y-%m-%d\ %H:%M:%S`
 
 start_server()
 {
       curdate=`date +%Y%m%dT%H%M%S`
-      logfile="/opt/lofar/log/OTDBServer."$curdate
+      logfile="/opt/lofar/var/log/OTDBServer."$curdate
       echo "Starting server: $JAVAHOME/bin/java -jar $serverDir/jOTDB2.jar paulus boskabouter LOFAR20 sas001 sas001 $port1 $port2 &" | tee -a $logfile
       $JAVAHOME/bin/java -jar $serverDir/jOTDB2.jar paulus boskabouter LOFAR20 sas001 sas001 $port1 $port2 2>&1 1>$logfile&
       serverpid=$!
diff --git a/SAS/OTB/scripts/src/startOTB b/SAS/OTB/scripts/src/startOTB
index c5cdc68539295226cbf1f1c64dcf05876588836b..d72e3a7875751f58907ad735f29fee0e13fc146f 100755
--- a/SAS/OTB/scripts/src/startOTB
+++ b/SAS/OTB/scripts/src/startOTB
@@ -8,10 +8,10 @@ ps -ef | grep -v grep | grep server | grep java | grep 11500 2>&1 1>/dev/null
 if [ $? -ne 0 ]; then
 	echo "starting server first"
 	curdate=`date +%Y%m%dT%H%M%S`
-        $JAVAHOME/bin/java -jar $serverDir/jOTDB3.jar sas001.control.lofar sas001.control.lofar 11500 11501 2>&1 1>/opt/lofar/log/OTBServer.$curdate &
+        $JAVAHOME/bin/java -jar $serverDir/jOTDB3.jar sas001.control.lofar sas001.control.lofar 11500 11501 2>&1 1>/opt/lofar/var/log/OTBServer.$curdate &
     serverpid=$!
 fi
 
 curdate=`date +%Y%m%dT%H%M%S`
-$JAVAHOME/bin/java -jar $clientDir/OTB.jar -p 11500 2>&1 1>/opt/lofar/log/OTB.$curdate &
+$JAVAHOME/bin/java -jar $clientDir/OTB.jar -p 11500 2>&1 1>/opt/lofar/var/log/OTB.$curdate &
 
diff --git a/SAS/OTB/scripts/src/startOTBServer b/SAS/OTB/scripts/src/startOTBServer
index c600d74af9dbbe3c8af03d1e9cc63064dde78f7f..1e74a60a26a81fa40a225afa9a0889c83f41331c 100755
--- a/SAS/OTB/scripts/src/startOTBServer
+++ b/SAS/OTB/scripts/src/startOTBServer
@@ -7,7 +7,7 @@ ps -ef | grep -v grep | grep server | grep java | grep 11500 2>&1 1>/dev/null
 if [ $? -ne 0 ]; then
 	echo "starting server"
 	curdate=`date +%Y%m%dT%H%M%S`
-        $JAVAHOME/bin/java -jar $serverDir/jOTDB3.jar sas001.control.lofar sas001.control.lofar 11500 11501 2>&1 1>/opt/lofar/log/OTBServer.$curdate &
+        $JAVAHOME/bin/java -jar $serverDir/jOTDB3.jar sas001.control.lofar sas001.control.lofar 11500 11501 2>&1 1>/opt/lofar/var/log/OTBServer.$curdate &
 else
         echo "Server already running; kill first!"
         exit