Index: /code/branches/netp4/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- /code/branches/netp4/src/orxonox/gamestates/GSDedicated.cc	(revision 3120)
+++ /code/branches/netp4/src/orxonox/gamestates/GSDedicated.cc	(revision 3121)
@@ -43,4 +43,8 @@
 #include <boost/bind.hpp>
 
+#ifndef ORXONOX_PLATFORM_WINDOWS
+#include <termios.h>
+#endif
+
 
 namespace orxonox
@@ -49,4 +53,6 @@
     
     AddGameState(GSDedicated, "dedicated");
+    
+    termios* GSDedicated::originalTerminalSettings_;
 
     GSDedicated::GSDedicated(const std::string& name)
@@ -61,4 +67,8 @@
         this->commandLine_ = new unsigned char[MAX_COMMAND_LENGTH];
 //         memset( this->commandLine_, 0, MAX_COMMAND_LENGTH );
+#ifndef ORXONOX_PLATFORM_WINDOWS
+        this->originalTerminalSettings_ = new termios;
+        this->setTerminalMode();
+#endif
     }
 
@@ -69,4 +79,6 @@
         std::cout << "\033[0G\033[K";
         std::cout.flush();
+        resetTerminalMode();
+        delete this->originalTerminalSettings_;
 #endif
         //inputThread_->join();
@@ -116,5 +128,5 @@
             c = getchar();
             {
-//                 boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+                boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
                 if ( inputIterator_>=MAX_COMMAND_LENGTH-1 && c!='\n' )
                     continue;
@@ -125,6 +137,12 @@
                     boost::recursive_mutex::scoped_lock(this->inputQueueMutex_);
                     this->commandQueue_.push( std::string((const char*)this->commandLine_,inputIterator_) );
+                    memset( this->commandLine_, 0, inputIterator_ );
                     inputIterator_ = 0;
                 }
+                else if( c == 0x8 ) // Backspace
+                {
+                    boost::recursive_mutex::scoped_lock(this->inputQueueMutex_);
+                    commandLine_[inputIterator_--]=0;
+                }
             }
         }
@@ -134,11 +152,12 @@
     {
 #ifndef ORXONOX_PLATFORM_WINDOWS
-        std::cout << "\033[s\033[0G";
-//         boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
-        std::cout << std::fixed << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgFPS() << " fps, " << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgTickTime() << " ms avg ticktime # ";
-        if ( this->cleanLine_ )
-            this->cleanLine_ = false;
-        else
-            std::cout <<"\033[u";
+//         std::cout << "\033[s\033[0G";
+        std::cout << "\033[0G\033[K";
+        boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+        std::cout << std::fixed << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgFPS() << " fps, " << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgTickTime() << " ms avg ticktime # " << this->commandLine_;
+        //if ( this->cleanLine_ )
+        //    this->cleanLine_ = false;
+        //else
+        //    std::cout <<"\033[u";
         std::cout.flush();
 #endif
@@ -164,3 +183,24 @@
         }
     }
+    
+    void GSDedicated::setTerminalMode()
+    {
+      termios new_settings;
+     
+      tcgetattr(0,this->originalTerminalSettings_);
+      new_settings = *this->originalTerminalSettings_;
+      new_settings.c_lflag &= (~ICANON);
+      new_settings.c_cc[VTIME] = 0;
+      new_settings.c_cc[VMIN] = 1;
+      tcsetattr(0,TCSANOW,&new_settings);
+      COUT(0) << endl;
+      atexit(&GSDedicated::resetTerminalMode);
+    }
+    
+    void GSDedicated::resetTerminalMode()
+    {
+#ifndef ORXONOX_PLATFORM_WINDOWS
+      tcsetattr(0, TCSANOW, GSDedicated::originalTerminalSettings_);
+#endif
+    }
 }
Index: /code/branches/netp4/src/orxonox/gamestates/GSDedicated.h
===================================================================
--- /code/branches/netp4/src/orxonox/gamestates/GSDedicated.h	(revision 3120)
+++ /code/branches/netp4/src/orxonox/gamestates/GSDedicated.h	(revision 3121)
@@ -39,6 +39,9 @@
 #include <boost/thread/recursive_mutex.hpp>
 
+struct termios;
+
 namespace orxonox
 {
+    
     class _OrxonoxExport GSDedicated : public GameState
     {
@@ -55,4 +58,6 @@
         void printLine();
         void processQueue();
+        void setTerminalMode();
+        static void resetTerminalMode();
         
         Server*                 server_;
@@ -60,5 +65,5 @@
         
         boost::thread           *inputThread_;
-//         boost::recursive_mutex  inputLineMutex_;
+        boost::recursive_mutex  inputLineMutex_;
         boost::recursive_mutex  inputQueueMutex_;
         bool                    closeThread_;
@@ -67,5 +72,5 @@
         unsigned int            inputIterator_;
         std::queue<std::string> commandQueue_;
-        
+        static termios*         originalTerminalSettings_;
     };
 }
