Index: trunk/FACT++/src/StateMachineDimControl.cc
===================================================================
--- trunk/FACT++/src/StateMachineDimControl.cc	(revision 15110)
+++ trunk/FACT++/src/StateMachineDimControl.cc	(revision 15111)
@@ -1,3 +1,5 @@
 #include "StateMachineDimControl.h"
+
+#include <boost/filesystem.hpp>
 
 #include "Dim.h"
@@ -546,5 +548,8 @@
     //     fVerbosity = 90;
 
-    if (conf.GetName()=="dimserver")
+    const boost::filesystem::path path(conf.GetName());
+    const string fname = path.filename().string();
+
+    if (fname=="dimserver")
         return -1;
 
Index: trunk/FACT++/src/dimctrl.cc
===================================================================
--- trunk/FACT++/src/dimctrl.cc	(revision 15110)
+++ trunk/FACT++/src/dimctrl.cc	(revision 15111)
@@ -11,5 +11,8 @@
 int RunShell(Configuration &conf)
 {
-    StateMachineDimControl::fIsServer = conf.GetName()=="dimserver";
+    const boost::filesystem::path path(conf.GetName());
+    const string fname = path.filename().string();
+
+    StateMachineDimControl::fIsServer = fname=="dimserver";
     return Main::execute<T, StateMachineDimControl>(conf);
 }
@@ -17,13 +20,16 @@
 void SetupConfiguration(Configuration &conf)
 {
-    po::options_description control("Options ("+conf.GetName()+")");
+    const boost::filesystem::path path(conf.GetName());
+    const string fname = path.filename().string();
+
+    po::options_description control("Options ("+fname+")");
     control.add_options()
         ("force-console", po_switch(),     "Forces console mode in server-mode.")
         ("debug",         po_bool(false),  "Print the labels for debugging purpose")
         ("user,u",        var<string>(""), "A user name - just for logging purposes (default is ${USER})")
-        ("JavaScript.*",  var<string>(""), "Additional arguments which are provided to JavaScripts started in a dimctrl server via the START command")
+        ("JavaScript.*",  var<string>(),   "Additional arguments which are provided to JavaScripts started in a dimctrl server via the START command")
         ;
 
-    if (conf.GetName()!="dimserver")
+    if (fname!="dimserver")
     {
         control.add_options()
@@ -102,5 +108,8 @@
         throw runtime_error("--force-console must be used with --console/-c");
 
-    if (conf.GetName()=="dimserver" && !conf.Get<bool>("force-console"))
+    const boost::filesystem::path path(conf.GetName());
+    const string fname = path.filename().string();
+
+    if (fname=="dimserver" && !conf.Get<bool>("force-console"))
         conf.Remove("console");
 
