Posted on 2 Comments

Seismic Unix on Windows

In this post I wanted to briefly summarise the stages I went through to install seismic unix under the windows linux subsystem (WSL). There are other ways to get seismic unix running under windows (just google it !), and believe me I’ve used them all over the years. The WSL route is the closest I’ve come to something that’s easy, fast and offers all the functionality you need including sharing files between windows and linux. Please also note that I did this install a few years ago, but am putting a few updates here (May 2022). My notes might still not be very accurate.

  1. Windows Linux Subsystem 1 or 2 ?
    1. there are plenty of online blogs for this, but try the official microsoft help page. My installed used WSL1 but version 2 is now available and covered in the link above. WSL2 is supposed to be quicker, but there are some network differences and issues to overcome. If you have Windows11 then you can use the latest WSL distribution which automatically handles linux graphics applications. See this page here for windows 11 options. By default under WSL you install the Linux Ubuntu distribution which should then let you install seismic unix very easily. Other distributions are available as per the following screenshot (March 2022).
  1. Once you have installed linux and setup your user name and password you generally need to upgrade/update the installation using the following commands:
    • sudo apt-get update
    • sudo apt-get upgrade
  2. The following commands will install c-compiler and various development libraries needed to install seismic unix. The fortran compiler and possibly other items are optional, but this is what I did prior to installing seismic unix.
    • sudo apt-get install build-essential
    • sudo apt-get install gfortran
    • sudo apt-get install libx11-dev
    • sudo apt-get install libxt-dev
    • sudo apt-get install freeglut3-dev
    • sudo apt-get install libxmu-dev libxi-dev
    • sudo apt-get install libc6
  1. X-Windows System (graphics)
    • Newer versions of WSL will support WSLg as described in this recent microsoft post for Windows 11. However I only have windows 10 and WSL 1 – so I havn’t tested this route. I used the vcxsrv server to enable graphics applications. There are other possible options (for example via MobaXterm), but I know that this way works. You could follow this blog page which describes how to install and test a linux desktop, but particularly focused on vcxsrv and xfce4. Once I have xfce4 installed you can run it to obtain a full linux experience on your windows machine. However I just use vcxsrv to launch graphical windows from seismic unix under windows and it seems to work just fine.
    • One of the main issues seems to be connecting the linux DISPLAY variable to the X-server vcxsrv (as described in the blog page above). There are differences here between WSL1 and WSL2, with WSL2 using different networking protocols. Some users report issues with the firewall automatically blocking the connection – so you may need to make a firewall rule to get it to work properly. If you experience a problem here there are plenty of possible online solutions available.
  2. I also installed an xeyes to check the graphics are working via sudo apt-get install x11-apps
    • xeyes
  1. I like to keep linux and windows files separated by default, so the way I work is to make a new windows directory under Documents called linuxshare and then various project subdirectories for segy files etc. I can then access that from linux by typing
    • cd /mnt/c/Users/<your windows user id>/Documents/linuxshare
    • (I also have an alias setup in .bashrc so I can change easily to that directory).
  2. You will need to download the latest seismic unix from the current main website. The version as of March 2022 is V44 release 23. The installation instructions are found from the main website and these seem to be pretty comprehensive although I’ve done the install so many times that I admit to not following the instructions.
    • The recommended directory for install is /usr/local/cwp but personally I’ve always just used cwp.
    • The critical thing is to setup your CWPHOME variable e.g. export $CWPROOT=/usr/local/cwp
    • test using suplane|suximage

Enjoy seismic processing and quality control in seismic unix.