Current for 25th January 2021 – NB. this is all quite experimental at the moment!
For WSL2, the following instructions may also work. In Windows 11, you don't need to install the X11 server separately, as long as you have enabled WSLg.
See below for an update for WSL2.
Jump to downloads
Installation of WSL-1 is straightforward but will require a manual
installation since it is not included with the standard Windows 10 updates.
Note that Windows WSL (Windows Subsystem for Linux) is still under development
and is considered in Beta by Microsoft so installation does come with caveats.
Kay Dederichs has also investigated using WSL-2 with CCP4, and has managed to
get CCP4 working on it. His notes on this can be found
here.
I installed WSL-1 using the manual install instructions &
didn’t encounter any show-stopping issues (see notes below). If you follow the
instructions shown on the web page below (for manual installs) & then setup
the display for graphical programs you should end up with WSL-1 in a functional
state (see further on) :-
https://docs.microsoft.com/en-us/windows/wsl/install-win10
V1 of WSL was chosen, as hyper-threading capability is
needed for the more recent v2. At the time of writing hyperthreading
was not possible on Oracle VM. If you are using an actual Windows partition it
should be fine to use WSL-2 (instructions also available on the webpage). When
picking the flavour of Linux to use, I would recommend Ubuntu 18.04 LTS (if
available).
Firefox is broken on the Linux Install, and the google
browser installs but doesn’t work. The default WSL browser works fine though.
Also note I encountered problems when
copying things to & from the Windows partition in WSL-1 (lost permission
settings & was unable to chmod them back). If you
stick to just working with the Linux variant of Edge & downloading to the
Linux partition it all works ok.
CCP4 Installation
CCP4 Installed fine (mostly, but with certain provisos)
using the standard Linux version of the CCP4 installer (choose the GNU/Linux tab above).
Some additional work is needed though. :-
To get aimless working, install the following from a WSL
terminal,
sudo apt-get install libgomp1
All the other command-line programs
I tried worked (this doesn’t cover every single binary though).
The installer may run slower than it usually does, but it
does work – please don’t interrupt it if it’s taking a few minutes longer than
usual.
*IMPORTANT* For graphical programs, you will need
to setup the display & x11 correctly :-
echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
source ~/.bashrc
and you will also need to setup x11 for graphical stuff
(& have it running).
install VcXsrv
https://sourceforge.net/projects/vcxsrv/
In order to get coot running (I suspect
libglu is the one that matters, but it doesn’t harm to have
all of them) install,
sudo apt-get install guile-2.2-libs
sudo apt-get install guile-2.2-dev
sudo apt-get install libglu1-mesa
To run jligand (still doesn't work fully though)
sudo apt-get install default-jre
Google Chrome doesn't work in WSL-1 but for information purposes this is how to get it anyway :-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt-get install ./google-chrome-stable_current_amd64.deb
google-chrome
google-chrome-stable
To get CCP4Cloud running (wslview is the default WSL browser – the first
command is just to test it’s working ok!) :-
wslview https://www.bbc.co.uk
ccp4cloud-config.sh -b wslview
ccp4cloud-config.sh
ccp4cloud-desktop.sh
If you try this, & wish to ask anything, you can e-mail us at :- ccp4@stfc.ac.uk
On WSL2, add the following lines to the .wslconfig file (under the %userprofile% directory in Windows; for example: C:\Users\yourname\):
[wsl2]
kernelCommandLine = vsyscall=emulate
and restart WSL (type wsl --shutdown in Powershell). This change is required to run the statically linked binaries in the SHELX suite and ARP/wARP.
This solution was found by Kay Diederichs.
Update April 2024:
The CCP4 Suite for Linux installs and runs on Ubuntu 20.04 and 22.04 under WSL2 on Windows 11, with WSLg
enabled.
On Ubuntu 20.04, make sure the following packages are installed:
apt install tcsh libxi6 libxrandr2 libglib2.0-0 libxinerama1 binutils libxss1 libgomp1 libopengl0 libglu1-mesa libxdamage1 libxkbcommon0 libxcb-icccm4 libxcb-xkb1 libxkbcommon-x11-0 libxcb-render-util0 libxcb-image0 libxcb-keysyms1 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0
On Ubuntu 22.04, install these additional packages:
sudo apt install libncurses5 libtinfo5 libxcb-xinerama0 libxcb-xinput0
If it still doesn't run, or you are using a different distribution in WSL, refer to the
known issues document. In particular, it may help to run the find-missing-libs.sh script.