How to install Seismic Unix (SU) on Windows 10 Anniversary Update or Windows 11
Seismic Unix is a collection of seismic processing programs formerly supported by the Center for Wave Phenomena at the Colorado School of Mines (SU). At present, it resides in https://github.com/JohnWStockwellJr/SeisUnix
The package can be installed in a series of different Unix platforms. For Windows based computers the alternatives up to date to have a working SU were to install Cygwin (Cygwin homepage) or to install some sort of Linux, either in its own partition or using a virtual machine.
With the last Windows 10 update (Anniversary, August 2, 2016), a new way to have SU working in Windows seems to be possible, by using the new Ubuntu-based shell that can be run directly in it.
Here is the step-by-step installation process in Windows 10 or 11, very detailed, so those who may be new to compiling software on Unix can just follow the instructions.
I have not tested the complete SU package, I just installed it without errors.
First, you need to install the bash shell. To do that, first check if your Windows is 64-bit and the version you have. Open the Settings from your Stat Menu. Select System, and then About. Look to the System type. It should be 64-bit. The version should be 1607 or above. Your computer may not be able to upgrade to a 64-bit system. If that is the case, bad luck.
Now, proceed to Settings, Update and Security and For Developers. Activate the Developer Mode.
The new bash shell can be reached using the Start menu. Or you can find it writing "bash" when you open the Windows Start menu. The first time you activate bash you will be prompted to accept the terms of service. After that, the Bash on Ubuntu on Windows application from the Windows Store will be downloaded. You will be asked to create a user account and password to be used in the Bash environment. Close the bash by typing exit. Or just close the window.
Sometimes, you will need to open PowerShell as administrator and run (all in one line):
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
First, you need to install the bash shell. To do that, first check if your Windows is 64-bit and the version you have. Open the Settings from your Stat Menu. Select System, and then About. Look to the System type. It should be 64-bit. The version should be 1607 or above. Your computer may not be able to upgrade to a 64-bit system. If that is the case, bad luck.
Now, proceed to Settings, Update and Security and For Developers. Activate the Developer Mode.
In older versions of Windows 10, go to the Control Panel. You can reach it in Settings, Apps and Features, and click on the Related Settings. In the Control Panel, click “Turn Windows Features On or Off". Enable the Windows Subsystem for Linux (Beta) in the list and click OK. You will need to restart.
In some computers, you will need to activate the virtualization in the BIOS.
In new versions of Windows 10 or 11, just open the Microsoft Store, and find and install first "Windows Subsystem for Linux", and next Ubuntu version 20. Do not install the newest version of Ubuntu. There is a problem because it lacks a certain component for the compilation process.
In new versions of Windows 10 or 11, just open the Microsoft Store, and find and install first "Windows Subsystem for Linux", and next Ubuntu version 20. Do not install the newest version of Ubuntu. There is a problem because it lacks a certain component for the compilation process.
The new bash shell can be reached using the Start menu. Or you can find it writing "bash" when you open the Windows Start menu. The first time you activate bash you will be prompted to accept the terms of service. After that, the Bash on Ubuntu on Windows application from the Windows Store will be downloaded. You will be asked to create a user account and password to be used in the Bash environment. Close the bash by typing exit. Or just close the window.
Sometimes, you will need to open PowerShell as administrator and run (all in one line):
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
With the new Windows Subsystem for Linux (WSL) since November 2022, you are already set to visualize de data graphically. With older versions of WSL, once you have the text-based bash working, you needed to prepare it to be able to run some sort of X windows, so you can visualize the data. You neededed an X windows server. In Windows, download and install Xming (Xming homepage). Xming should be running before your bash environment is running everytime you will use SU. A small inconvenience. Another alternative is VcXsrv. It works too. As stated before, with the new WSL, these steps are not needed anymore.
If installing with an old WSL: once the Xming (or VcXsrv) is running, open bash. You will need a few things to prepare. First, you need the bash to be able to send the graphics to Xming. To do that, you need to modify one of the start files either .bashrc or .profile. To do that, type:
cd
echo "export DISPLAY=:0" >> .bashrc
source .bashrc
(or the same thing but with .profile, but for some reason if you restart bash, it does not read .profile automatically, you need to run source .profile each time). Do not make these changes if you are using the latest WSL.
Ok, so you now have the new WSL or you are working with the older WSL and the needed graphic aids. Then, it is very convenient to have an easy to use editor inside the Unix environment. Simple alternatives are Xedit (the most basic XWindows editor) or the fancier nedit (you can select columns, very useful):
sudo apt install x11-apps
or:
sudo apt install nedit
Now it is time to prepare the system for SU:
cd
echo "export CWPROOT=\$HOME" >> .bashrc
echo "export PATH=\$PATH:\$HOME/bin:./" >> .bashrc
source .bashrc
The addition of ./ to the PATH environment variable is optional, but it is convenient to run your own scripts later.
Now, in Windows 10 or 11, get the SU package. It used to be at CWP. Now (2019 or later), you can find it in https://wiki.seismic-unix.org/doku.php. This is the easiest way. However, if you like, you can also work with a zip file generated from https://github.com/JohnWStockwellJr/SeisUnix.You then can move the package to your root user in bash:
cd /mnt/c/Users/(put your user name in here)/Downloads
mv cwp_su_all_44R26.tgz $HOME/cwp_su_all_44R26.tgz
cd
The 44R26 part can change with new versions, just check (2022 June 6 version here). If a new version is available, change the name of the file!
Now unzip the file:
gunzip cwp_su_all_44R26.tgz
tar -xvf cwp_su_all_44R26.tar
Next, use the correct Makefile.config by:
cd
cd src
rm Makefile.config
cp ./configs/Makefile.config_Linux_x86_64 ./Makefile.config
Install needed development packages:
C compiler (gcc) (it takes time...):
sudo apt-get install build-essential
Fortran:
sudo apt-get install gfortran
X windows:
sudo apt-get install libx11-dev
sudo apt-get install libxt-dev
OpenGL (optional):
sudo apt-get install freeglut3-dev
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install libc6
The last one probably not needed.
Motif (optional):
Motif (optional):
sudo apt-get install libuil4
sudo apt-get install x11proto-print-dev
sudo apt-get install libmotif-dev
Just to be on the safe side:
sudo apt-get update
sudo apt-get upgrade
Finally, install SU package:
cd
cd src
make install
make xtinstall
make finstall
Optional:
make mglinstall
make utils
make xminstall
make sfinstall
One last check:
cd
suplane | suximage title="test"
Again, if you are using an older WSL, do not forget to run Xming before activate the bash or the graphics will not work. With WSL new versions, you do not need to do anything before running bash.
Good Luck!
I am no Unix guru, so I just followed the advice by:
John Stockwell (Seismic-Unix-install-on-Ubuntu).
Chris Hoffman (How-to-install-and-use-the-linux-bash-shell-on-windows-10) and (How-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell).
Colorado School of Mines (CWP).