ROOT for windows
This is a short guide on how to get root on your computer if you have windows 10. It can be cumbersome to have to open a virtual machine to run root or to dual boot your computer with linux
to be able to do this one thing. I used a Windows subsystem for linux to run root on it and it works great for me. The steps are listed as following:
- Getting a Windows Subsystem for Linux (WSL)
- Follow these steps to get a WSL
- Settings -> Updates & security -> developers -> enable developer mode
- Then go to Control panel -> Programs -> Turn windows features on or off -> enable windows subsystem for linux (WSL)
-
From here windows will install some files and make sure to restart the computer
-
Once that has been done, go to the microsoft store to get Ubuntu
-
Download it and Install it
-
It should download like an application
-
-
After downloading it, launch the application by clicking on the download file or finding it in your applications.
-
This should give you an Ubuntu terminal
-
- You'll need install and run an X-Windows server on windows for the GUI environment that you'll need and you can get it sourceforge.net/projects/xming/files/Xming/6.9.0.31/Xming-6-9-0-31-setup.exe/download
- It should automatically start downloading and just run the .exe to install it.
- Then it'll be good to update the distribution you downloaded by typing the following commands into the Ubuntu terminal
- sudo apt update
- sudo apt upgrade
- IMPORTANT
- Doing this might cause an error when you try to ssh into the RCF but the fix to this is simple. Just re-upload your public key with the attached fingerprint for it.
- Then type the following into the Ubuntu terminal so Xming knows where to display the window when you call it
- export DISPLAY="localhost:0"
-
Then to append the correct display to the .bashrc file, run the following command in the Ubuntu terminal
-
echo 'export DISPLAY="localhost:0"' >> ~/.bashrc
-
where the tilde (~) is the home directory for the current user
-
-
- Follow these steps to get a WSL
- Downloading ROOT
- It is important you download the same version of root as you have visual studio
- To check what version you have: control panel -> programs -> programs and features
- Once there, check for "Microsoft visual C++ 20**" and that'll be the version you have
- The asterisks are just numbers (2018,2019,2020)
- Of course, you can download a newer version if you want
- Here is the link for root: root.cern.ch/downloading-root
- What I recommend - to simplify a lot of things - is to download the .exe file. If you do that, it will download itself when you click on the download (keep track of where it downloads) and do its thing.
- It is important you download the same version of root as you have visual studio
- Compiling ROOT locally
- Before you install ROOT, make sure you have the pre-requisites for it by going to the following website root.cern.ch/build-prerequisites . Towards the middle of the page you'll see all the commands to run to install what you need
- To build ROOT 6.14.02 under UBUNTU 18.04
- Run the following commands in your new WSL terminal
- sudo apt-get install cmake
- sudo apt-get install git dpkg-dev cmake g++ binutils libx11-dev libxpm-dev libxft-dev libxext-dev
- Then some extra stuff if you were to need it
- sudo apt-get install gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxm12-dev limkrb15-dev libsql-dev libqt4-dev libtbb-dev
- sudo apt-get install gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxm12-dev limkrb15-dev libsql-dev libqt4-dev libtbb-dev
- Then run these commands
- wget https://root.cern.ch/download/root_v6.14.02.source.tar.gz
- If wget doesn't work, just copy the link to your webbrowser and it'll begin downloading
- tar -xzvf root_v6.14.02.source.tar.gz
- mkdir buildir
- cd buildir
- cmake ../root-6.14.02
- cmake --build .
- wget https://root.cern.ch/download/root_v6.14.02.source.tar.gz
- Once all of that is done, run these commands
- source ~/builddir/bin/thisroot.sh
- echo 'source ~/builddir/bin/thisroot.sh' >> ~/.bashrc
- root
- Then you should see the root splash screen pop up
- rsalinas's blog
- Login or register to post comments