diff --git a/base_v4/Dockerfile b/base_v4/Dockerfile
index 30f60cc997515c8aff5f957b249e792aa766e9d2..77f73fcfa1e91a83bebcf3a067ac95ae346c78cd 100644
--- a/base_v4/Dockerfile
+++ b/base_v4/Dockerfile
@@ -1,11 +1,12 @@
 FROM lofar/lofar-pipeline:LOFAR-Release-4_0_16
-
+LABEL Maintainer Giuliano Taffoni <giuliano.taffoni@inaf.it>
+USER root
 # Set non-interactive
 ENV DEBIAN_FRONTEND noninteractive
 
 # Always update when extending base images
 RUN apt update
-
+RUN apt -y upgrade
 
 #------------------------
 # Install deps
@@ -13,6 +14,12 @@ RUN apt update
 
 # Git, Curl, sudo and  Nano
 RUN apt-get install git curl sudo nano -y
+RUN apt -y install lubuntu-core libjpeg-dev wget sudo git curl nano vim emacs
+RUN apt-get install -y  supervisor strace net-tools
+
+RUN  sed -i 's\1\0\g' /etc/apt/apt.conf.d/20auto-upgrades
+RUN  ln -s /usr/share/lxde/wallpapers/lxde_blue.jpg /etc/alternatives/desktop-background
+#
 
 
 #------------------------
@@ -36,64 +43,38 @@ COPY data/input_data /input_data
 COPY data/output_data /output_data
 RUN chown lofar:lofar /home/lofar && chown -R lofar:lofar /input_data && chown -R lofar:lofar /output_data
 
-
-#----------------------
-# Minimal Desktop
-#----------------------
-
-# Utilities
-RUN apt-get install -y telnet unzip wget supervisor build-essential python-dev git-core openjdk-8-jre
-
-# Global Supervisord conf
-COPY files/supervisord.conf /etc/supervisor/
-
-# Install xvfb that triggers minimal install of X base packages and xterm
-RUN apt-get install xvfb xterm  -y
-
-# Install base packages for VNC server and headless desktop (2)
-RUN cd /opt && wget https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-1.8.0.x86_64.tar.gz -O tigervnc-1.8.0.x86_64.tar.gz \
-            && tar -zxvf tigervnc-1.8.0.x86_64.tar.gz \
-            && mv tigervnc-1.8.0.x86_64 tigervnc
-
-# Supervisord configuration
-COPY files/supervisord_vnc.conf /etc/supervisor/conf.d/
-COPY files/run_vnc.sh /etc/supervisor/conf.d/
-COPY files/run_novnc.sh /etc/supervisor/conf.d/
-RUN chmod 755 /etc/supervisor/conf.d/run_vnc.sh
-RUN chmod 755 /etc/supervisor/conf.d/run_novnc.sh
-
-# Web VNC (noVNC) v0.6.1.
-# NOTE: this is a custom version from Doro Wu (fcwu.tw@gmail.com).
-# TODO: Check differences and maybe move to 0.6.2
-COPY files/noVNC.tar.gz /usr/lib/
-RUN cd /usr/lib/ && tar -zxvf noVNC.tar.gz
-COPY files/index.html /usr/lib/noVNC
-
-RUN apt-get install -y net-tools
-
-# Supervisord configuration
-COPY files/supervisord_novnc.conf /etc/supervisor/conf.d/
-
-# X environment setup/startup
-RUN apt-get install fluxbox -y
-COPY files/xstartup /opt/tigervnc/
-RUN chmod 755 /opt/tigervnc/xstartup
-
 # Prepare for logs
 RUN mkdir /home/lofar/.logs && chown lofar:lofar /home/lofar/.logs
 
-# Add fluxbox customisations
-COPY files/dot_fluxbox /home/lofar/.fluxbox
-RUN chown -R lofar:lofar /home/lofar/.fluxbox
-COPY files/background.jpg /usr/share/images/fluxbox/background.jpg
 
-# Rename lofar home folder as a "vanilla" home folder
+RUN mkdir /home/lofar/.vnc
+COPY files/config  /home/lofar/.vnc
+COPY files/xstartup /home/lofar/.vnc
+RUN chmod 755 /home/lofar/.vnc/xstartup
+RUN chown -R lofar:lofar /home/lofar/.vnc
+
+# Rename user home folder as a "vanilla" home folder
 RUN mv /home/lofar /lofar_home_vanilla
 
 # Give write access to anyone to the home folder so the entrypoint will be able
-# to copy over the /home/matauser_vanilla into /home/lofar (for Singularity)
+# to copy over the /home/matauser_vanilla into /home/metauser (for Singularity)
 RUN chmod 777 /home
 
+# Copy and install kasmvnc
+COPY files/kasmvnc-Linux-x86_64-0.9.tar.gz /tmp
+RUN sudo tar xz --strip 1 -C / -f /tmp/kasmvnc-Linux-x86_64-0.9.tar.gz && rm /tmp/kasmvnc-Linux-x86_64-0.9.tar.gz
+RUN mkdir /usr/local/share/kasmvnc/certs
+RUN chown lofar.lofar /usr/local/share/kasmvnc/certs
+COPY files/index.html /usr/local/share/kasmvnc/www/
+
+
+# Global Supervisord conf
+COPY files/supervisord.conf /etc/supervisor/
+COPY files/supervisord_kasm.conf /etc/supervisor/conf.d/
+COPY files/run_kasm.sh /etc/supervisor/conf.d/
+RUN chmod 755 /etc/supervisor/conf.d/run_kasm.sh
+
+
 
 #----------------------
 # Entrypoint
@@ -108,6 +89,7 @@ RUN chmod 755 /entrypoint.sh
 # Set entrypoint
 ENTRYPOINT ["/entrypoint.sh"]
 
+RUN apt -y clean
 # Set user lofar
 USER lofar
 
diff --git a/base_v4/entrypoint.sh b/base_v4/entrypoint.sh
index ce320b06bb5fe5e0e0e659158efaa1facfac1f9e..ce652447ef651043eebf4c1e8e46c1d0015f0cfa 100644
--- a/base_v4/entrypoint.sh
+++ b/base_v4/entrypoint.sh
@@ -4,6 +4,9 @@
 # (see https://stackoverflow.com/questions/4381618/exit-a-script-on-error)
 set -e
 
+GUI=True
+
+
 
 if [ "x$SAFE_MODE" == "xTrue" ]; then
 
@@ -18,9 +21,9 @@ else
     
     if [ "x$GUI" == "xTrue" ]; then
 	    if [ "x$BASE_PORT" == "x" ]; then
-	        echo "[INFO] No task base port set, will set noVNC port 8590 and VNC port 5900 with desktop id \"0\""  
+	        echo "[INFO] No task base port set, will set KasmVNC port 8443 with  desktop id \"1\""  
 	    else 
-	        echo "[INFO] Task base port set, will set noVNC port $BASE_PORT and noVNC port $(($BASE_PORT+1)) with desktop id \"$(($BASE_PORT-5900+1))\""
+	        echo "[INFO] Task base port set, will set KasmVNC port $BASE_PORT with desktop id \"$(($BASE_PORT-5900+1))\""
 	    fi
     fi
     
@@ -28,19 +31,16 @@ else
     #   Setup home
     #---------------------
 
-    if [ -f "/home/lofar/.initialized" ]; then
-        :
-    else
+    if [ ! -f "/home/lofar/.initialized" ]; then
         echo "[INFO] Setting up home"
-        mkdir -p /home/lofar
-
+	[ ! -d "/home/lofar" ] &&  mkdir -p /home/lofar
         # Copy over vanilla home contents
         for x in /lofar_home_vanilla/* /lofar_home_vanilla/.[!.]* /lofar_home_vanilla/..?*; do
             if [ -e "$x" ]; then cp -a "$x" /home/lofar/; fi
         done
         
         # Mark as initialized
-        touch /home/lofar/.initialized
+	[ ! -f "/home/lofar/.initialized" ] && touch /home/lofar/.initialized
     fi
     
 
@@ -61,21 +61,26 @@ else
           echo "export $env_var" >> /tmp/env.sh
       fi
     done
-    
+    cd /home/lofar 
     #---------------------
     #   VNC Password
     #---------------------
     if [ "x$GUI" == "xTrue" ]; then
 	    if [ "x$AUTH_PASS" != "x" ]; then
 	        echo "[INFO] Setting up VNC password..."
-	        mkdir -p /home/lofar/.vnc
-	        /opt/tigervnc/usr/bin/vncpasswd -f <<< $AUTH_PASS > /home/lofar/.vnc/passwd
-	        chmod 600 /home/lofar/.vnc/passwd
-	        export VNC_AUTH=True
+	        /usr/local/bin/kasmvncpasswd -f <<< $AUTH_PASS > /home/lofar/.kasmpasswd
 	    else
-	        echo "[INFO] Not setting up any VNC password"
-	            
-	    fi
+	        echo "[INFO] Setting up default VNC password: metapasswd"
+                /usr/local/bin/kasmvncpasswd -f <<< metapasswd > /home/lofar/.kasmpasswd
+	    fi            
+            chmod 600 /home/lofar/.kasmpasswd
+            export VNC_AUTH=True
+	    if [ "x$AUTH_USER" != "x" ]; then
+               echo "[INFO] Setting up VNC user..."
+               sed -i -e "s/username=lofar/username=$AUTH_USER/" /home/lofar/.vnc/config 
+	    else
+               echo "[INFO] Default VNC user: lofar"
+            fi
     fi
     
 	echo "[INFO] Creating /tmp/lofarhome to be used as lofar home"
@@ -90,7 +95,7 @@ else
 	
 	echo "[INFO] Setting new prompt @$CONTAINER_NAME container"
 	echo 'export PS1="${debian_chroot:+($debian_chroot)}\u@$CONTAINER_NAME@\h:\w\$ "' >> /tmp/lofarhome/.bashrc
-
+        
 	
     # Set entrypoint command
 	if [ "x$@" == "x" ]; then
@@ -106,11 +111,10 @@ else
 
     # Start!
 	echo -n "[INFO] Will execute entrypoint command: "
-	echo $COMMAND
 	echo ""
 	echo "=============================================================="
 	echo ""
-	echo "      Welcome to the LOFAR-IT $CONTAINER_NAME container!"
+	echo "      Welcome to the EUROEXA $CONTAINER_NAME container!"
 	echo ""
 	echo "=============================================================="
 	echo ""
@@ -122,5 +126,4 @@ else
 	echo ""
 	
 	exec $COMMAND
-
 fi
diff --git a/base_v4/files/background.jpg b/base_v4/files/background.jpg
deleted file mode 100644
index fe623ec4ddbd6bab4d77dc0f49303d1be040be73..0000000000000000000000000000000000000000
Binary files a/base_v4/files/background.jpg and /dev/null differ
diff --git a/base_v4/files/config b/base_v4/files/config
new file mode 100644
index 0000000000000000000000000000000000000000..5447fd4b22f134c533e91f1053a8f4077b94f806
--- /dev/null
+++ b/base_v4/files/config
@@ -0,0 +1,10 @@
+## Supported server options to pass to vncserver upon invocation can be listed
+## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
+## Several common ones are shown below. Uncomment and modify to your liking.
+##
+# securitytypes=vncauth,tlsvnc
+# desktop=sandbox
+# geometry=2000x1200
+# localhost
+# alwaysshared
+username=lofar
diff --git a/base_v4/files/kasmvnc-Linux-x86_64-0.9.tar.gz b/base_v4/files/kasmvnc-Linux-x86_64-0.9.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..1bc58413497aa1d9bdd071508d843ab0bf9268af
Binary files /dev/null and b/base_v4/files/kasmvnc-Linux-x86_64-0.9.tar.gz differ
diff --git a/base_v4/files/kasmvncserver_0.9.1~beta-1_amd64.deb b/base_v4/files/kasmvncserver_0.9.1~beta-1_amd64.deb
new file mode 100644
index 0000000000000000000000000000000000000000..823c29cd2ea5bbe448fcb6277203f5c608544491
Binary files /dev/null and b/base_v4/files/kasmvncserver_0.9.1~beta-1_amd64.deb differ
diff --git a/base_v4/files/noVNC.tar.gz b/base_v4/files/noVNC.tar.gz
deleted file mode 100644
index a531bed617c54af4826c7afd76192bc2736100ba..0000000000000000000000000000000000000000
Binary files a/base_v4/files/noVNC.tar.gz and /dev/null differ
diff --git a/base_v4/files/run_kasm.sh b/base_v4/files/run_kasm.sh
new file mode 100755
index 0000000000000000000000000000000000000000..72f40de5d06fd4b641e3da07ae58c6cde0c2fb21
--- /dev/null
+++ b/base_v4/files/run_kasm.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Exec KasmVNC server 
+
+if [ "x$BASE_PORT" == "x" ]; then
+    BASE_PORT=8443
+    DESKTOP_NUMBER=1
+else
+    DESKTOP_NUMBER=$(($BASE_PORT-5900+1))
+fi
+
+if [ "x$KASMSOCK" == "xTrue" ]; then
+    export SOCKET_PORT=$(( $RANDOM % 50 + 1 ))
+fi
+
+if [ "x$VNC_AUTH" == "xTrue" ]; then
+     echo "[INFO] Setting new certificate for VNC"
+     openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /home/lofar/.vnc/self.pem -out /home/lofar/.vnc/self.pem -subj "/C=IT/ST=None/L=None/O=INAF/OU=OATs/CN=kasm/emailAddress=none@none.none" 
+     /usr/local/bin/vncserver :$DESKTOP_NUMBER -depth 24 -geometry 1280x1050 -websocketPort $BASE_PORT  -cert /home/lofar/.vnc/self.pem -sslOnly -FrameRate=24 -interface 0.0.0.0
+else
+     /usr/local/bin/vncserver :$DESKTOP_NUMBER -depth 24 -geometry 1280x1050 -websocketPort $BASE_PORT   -FrameRate=24 -interface 0.0.0.0
+fi
+
+# Check it is running. If it is not, exit
+while true
+do
+
+    #PSOUT=$(ps -ef | grep /usr/local/bin/Xvnc | grep SecurityTypes) 
+    PSOUT=$(ps -ef | grep /usr/local/bin/Xvnc) 
+
+    if [[ "x$PSOUT" == "x" ]] ; then
+        exit 1
+    fi
+
+	# Sleep other 10 secs before re-checking
+	sleep 10
+
+done
diff --git a/base_v4/files/run_novnc.sh b/base_v4/files/run_novnc.sh
deleted file mode 100755
index 53198782b7aea92d8cd8c5181a5fefac7fa91b22..0000000000000000000000000000000000000000
--- a/base_v4/files/run_novnc.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-# Exec TigerVNC server 
-
-if [ "x$BASE_PORT" == "x" ]; then
-    /usr/lib/noVNC/utils/launch.sh --listen 8590
-    echo "Running noVNC on port 8590"
-else
-    /usr/lib/noVNC/utils/launch.sh --listen $BASE_PORT --vnc localhost:$(($BASE_PORT+1))
-    echo "Running noVNC on port $BASE_PORT and connecting to VNC on port $(($BASE_PORT+1))"
-
-fi
diff --git a/base_v4/files/run_vnc.sh b/base_v4/files/run_vnc.sh
deleted file mode 100755
index ac7daebd51232559545e9bdcf71dbd5e79140cb6..0000000000000000000000000000000000000000
--- a/base_v4/files/run_vnc.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# Exec TigerVNC server 
-
-if [ "x$BASE_PORT" == "x" ]; then
-    DESKTOP_NUMBER=0
-else
-    DESKTOP_NUMBER=$(($BASE_PORT-5900+1))
-fi
-
-if [ "x$VNC_AUTH" == "xTrue" ]; then
-    /opt/tigervnc/usr/bin/vncserver :$DESKTOP_NUMBER -SecurityTypes vncauth,tlsvnc -xstartup /opt/tigervnc/xstartup
-else
-    /opt/tigervnc/usr/bin/vncserver :$DESKTOP_NUMBER -SecurityTypes None -xstartup /opt/tigervnc/xstartup
-fi
-
-
-# Check it is running. If it is not, exit
-while true
-do
-
-    PSOUT=$(ps -ef | grep /opt/tigervnc/usr/bin/Xvnc | grep SecurityTypes) 
-
-    if [[ "x$PSOUT" == "x" ]] ; then
-        exit 1
-    fi
-
-	# Sleep other 10 secs before re-checking
-	sleep 10
-
-done
diff --git a/base_v4/files/sudoers b/base_v4/files/sudoers
new file mode 100644
index 0000000000000000000000000000000000000000..47ab37c90fdec1df833409f825d2665fe7d1f899
--- /dev/null
+++ b/base_v4/files/sudoers
@@ -0,0 +1,30 @@
+#
+# This file MUST be edited with the 'visudo' command as root.
+#
+# Please consider adding local content in /etc/sudoers.d/ instead of
+# directly modifying this file.
+#
+# See the man page for details on how to write a sudoers file.
+#
+Defaults        env_reset
+Defaults        mail_badpass
+Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+# Host alias specification
+
+# User alias specification
+
+# Cmnd alias specification
+
+# User privilege specification
+root    ALL=(ALL:ALL) ALL
+
+# Members of the admin group may gain root privileges
+%admin ALL=(ALL) ALL
+
+# Allow members of group sudo to execute any command
+%sudo   ALL=(ALL:ALL) NOPASSWD:ALL
+
+# See sudoers(5) for more information on "#include" directives:
+
+#includedir /etc/sudoers.d
diff --git a/base_v4/files/supervisord_vnc.conf b/base_v4/files/supervisord_kasm.conf
similarity index 91%
rename from base_v4/files/supervisord_vnc.conf
rename to base_v4/files/supervisord_kasm.conf
index 81830a7cef31fc9404ec6eef63e3b39e4ecca85e..bc65f816449c96741464ba8a506e235d6f5b9638 100644
--- a/base_v4/files/supervisord_vnc.conf
+++ b/base_v4/files/supervisord_kasm.conf
@@ -6,7 +6,7 @@
  
 ; General
 directory     = /
-command       = /etc/supervisor/conf.d/run_vnc.sh
+command       = /etc/supervisor/conf.d/run_kasm.sh
 numprocs      = 1
 autostart     = true
 autorestart   = true
diff --git a/base_v4/files/supervisord_novnc.conf b/base_v4/files/supervisord_novnc.conf
deleted file mode 100644
index f63669ad27671f49a72650c8c4acebd864e55b3e..0000000000000000000000000000000000000000
--- a/base_v4/files/supervisord_novnc.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-;=======================================
-; noVNC service
-;=======================================
- 
-[program:novnc]
- 
-; General
-directory     = /usr/lib/noVNC/
-command       = /etc/supervisor/conf.d/run_novnc.sh
-numprocs      = 1
-autostart     = true
-autorestart   = true
-startsecs     = 10
-stopwaitsecs  = 30
-process_name  = novnc
- 
-; Standard out / error
-stdout_logfile          = /home/lofar/.logs/%(program_name)s.log
-stdout_logfile_maxbytes = 5MB
-stdout_logfile_backups  = 10
-stderr_logfile          = /home/lofar/.logs/%(program_name)s.log
-stderr_logfile_maxbytes = 5MB
-stderr_logfile_backups  = 10
diff --git a/base_v4/files/xstartup b/base_v4/files/xstartup
index 64e30eee8b5d71a3135e8465d5276750b8a98e8f..c1259fdb4563c107c85c9a7af164515118023185 100644
--- a/base_v4/files/xstartup
+++ b/base_v4/files/xstartup
@@ -1,7 +1,5 @@
 #!/bin/sh
 
-cd /home/lofar
-
 unset SESSION_MANAGER
 unset DBUS_SESSION_BUS_ADDRESS
 OS=`uname -s`
@@ -22,8 +20,7 @@ if [ -f /etc/X11/xinit/xinitrc ]; then
   exec sh /etc/X11/xinit/xinitrc
 fi
 [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
-#xsetroot -solid grey
-xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" /bin/bash &
-
-#twm &
-fluxbox &
+xsetroot -solid grey
+xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
+twm
+/usr/bin/lxsession -s LXDE &
diff --git a/vlbi/Dockerfile b/vlbi/Dockerfile
index e99960ad15881756d46481abe88bcc72d38a31da..71c99ee4dc6ee275e3e0d223c7a180c411bc8266 100644
--- a/vlbi/Dockerfile
+++ b/vlbi/Dockerfile
@@ -7,16 +7,13 @@ USER root
 # Environmental variables
 #
 ENV PYTHON_VERSION=2.7
-# Path to where the patch for python-casacore's setup is stored.
-ENV PYTHON_CASACORE_PATCH=$INSTALLDIR/python-casacore/python_casacore_setup_patch.patch
-ENV PATCH_LOFAR=$INSTALLDIR/lofar/lofar.patch
 # Settings relevant to the installed software.
 ENV AOFLAGGER_VERSION=v2.15.0
 ENV ARMADILLO_VERSION=9.900.3
 ENV BLAS_VERSION=3.8.0
 ENV BOOST_VERSION=1.69.0
 ENV CASACORE_VERSION=v2.4.1
-ENV # Leave at latest, release versions crash for some reason.
+# Leave at latest, release versions crash for some reason.
 ENV CASAREST_VERSION=latest
 ENV CFITSIO_VERSION=7.3.47
 ENV DPPP_VERSION=v4.2
@@ -61,8 +58,11 @@ ARG LD_LIBRARY_PATH="$INSTALLDIR/aoflagger/lib:$INSTALLDIR/casacore/lib:$INSTALL
 ARG PATH="/usr/lib64/openmpi/bin:$PATH"
 ARG OLD_PYTHONPATH=$PYTHONPATH
 
-ARG NCORES=40
+ARG NCORES=2
 ARG INSTALLDIR=/opt/lofar
+# Path to where the patch for python-casacore's setup is stored.
+ENV PYTHON_CASACORE_PATCH=$INSTALLDIR/python-casacore/python_casacore_setup_patch.patch
+ENV PATCH_LOFAR=$INSTALLDIR/lofar/lofar.patch
 
 #
 # Env to set at building
@@ -311,6 +311,7 @@ RUN    ln -s /opt/lofar/DPPP/bin/DPPP /opt/lofar/lofar/bin/NDPPP && \
        ln -s /opt/lofar/DPPP/bin/makesourcedb /opt/lofar/lofar/bin/makesourcedb &&\
        ln -s $INSTALLDIR/pyenv-py3/bin/h5plot /usr/bin/h5plot
 COPY files/post_init /tmp/post_init
-RUN  cat /tmp/post_init >> $INSTALLDIR/init.sh
+RUN  cat /tmp/post_init >> $INSTALLDIR/init.sh && rm -f /tmp/post_init
 RUN  sed -e 's/\\\$/\$/g' /opt/lofar/init.sh
+RUN sudo touch /opt/lofar/.casarc && sudo chmod 666 /opt/lofar/.casarc
 USER metauser
diff --git a/vlbi/Dockerfile.patch b/vlbi/Dockerfile.patch
new file mode 100644
index 0000000000000000000000000000000000000000..14f7498b3c34560d8294e28c73f75ef4f3896886
--- /dev/null
+++ b/vlbi/Dockerfile.patch
@@ -0,0 +1,5 @@
+FROM git.ia2.inaf.it:5050/lofarit/containers/vlbi-inaf-sw:0.1.0
+
+RUN sudo rm -f /opt/lofar/init.sh 
+RUN sudo touch /opt/lofar/.casarc && sudo chmod 666 /opt/lofar/.casarc
+COPY init.sh /opt/lofar/init.sh
diff --git a/vlbi/files/post_init b/vlbi/files/post_init
index 9b174a9b5f2cda6a0cb5334711157d2da1390e8e..565d4fc9c92c2a6aa784e8785b0a07aac5718b59 100644
--- a/vlbi/files/post_init
+++ b/vlbi/files/post_init
@@ -22,5 +22,5 @@ export OMP_MAX_THREADS=64
 
 export PYTHONPATH=$INSTALLDIR/dppp:$INSTALLDIR/lofar/lib64/python2.7/site-packages:$PYTHONPATH
 source $INSTALLDIR/pyenv-py2/bin/activate
-measures.directory: $INSTALLDIR/casacore/data
+echo "measures.directory: $INSTALLDIR/casacore/data" > $INSTALLDIR/.casarc 
 export CASARCFILES=$INSTALLDIR/.casarc
diff --git a/vlbi/init.sh b/vlbi/init.sh
new file mode 100644
index 0000000000000000000000000000000000000000..b7163bc9163dc58b47e3347c19790060c1c42798
--- /dev/null
+++ b/vlbi/init.sh
@@ -0,0 +1,30 @@
+export INSTALLDIR=/opt/lofar
+export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64/:$LD_LIBRARY_PATH
+export PATH=/usr/local/cuda/bin:$PATH
+export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/opt/intel/mkl/lib/intel64/:$LD_LIBRARY_PATH
+export INSTALLDIR=$INSTALLDIR
+export HDF5_USE_FILE_LOCKING=FALSE
+source $INSTALLDIR/lofar/lofarinit.sh
+export PYTHONPATH=$INSTALLDIR/dppp:$INSTALLDIR/lofar/lib64/python2.7/site-packages
+export PATH=/opt/montage/Montage-6.0/bin:$PATH
+export PATH=$INSTALLDIR/aoflagger/bin:$PATH
+export PATH=$INSTALLDIR/casacore/bin:$PATH
+export PATH=$INSTALLDIR/ds9/bin:$PATH
+export PATH=$INSTALLDIR/DPPP/bin:$PATH
+export PATH=$INSTALLDIR/difmap/uvf_difmap:$PATH
+export PATH=$INSTALLDIR/dysco/bin:$PATH
+export PATH=$INSTALLDIR/lofar/bin:$PATH
+export PATH=$INSTALLDIR/wsclean/bin:$PATH
+export PATH=/usr/lib64/openmpi/bin:$PATH
+export LD_LIBRARY_PATH=$INSTALLDIR/aoflagger/lib:$INSTALLDIR/casacore/lib:$INSTALLDIR/DPPP/lib:$INSTALLDIR/dysco/lib:$INSTALLDIR/EveryBeam/lib:$INSTALLDIR/idg/lib:$INSTALLDIR/lofar/lib:$INSTALLDIR/lofar/lib64:$INSTALLDIR/LOFARBeam/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/:$LD_LIBRARY_PATH
+export OPENBLAS_NUM_THREADS=64
+export OPENBLAS_MAX_THREADS=64
+export OMP_NUM_THREADS=64
+export OMP_MAX_THREADS=64
+
+export PYTHONPATH=$INSTALLDIR/dppp:$INSTALLDIR/lofar/lib64/python2.7/site-packages:$PYTHONPATH
+source $INSTALLDIR/pyenv-py2/bin/activate
+echo "measures.directory: $INSTALLDIR/casacore/data" > $INSTALLDIR/.casarc 
+export CASARCFILES=$INSTALLDIR/.casarc