(getting-started)= # Getting started using your laptop ## SSH and X11 You'll need [ssh](https://en.wikipedia.org/wiki/Secure_Shell_Protocol) to connect to a remote server that has ROOT installed. ROOT uses a graphics protocal called [X11](https://en.wikipedia.org/wiki/X_Window_System) for its interactive display.[^strict] [^strict]: Very strictly speaking, if you're going to {ref}`install ROOT ` on your own computer, you don't need `ssh`. As a practical matter, if you're going to be working in science, you'll find `ssh` and its related tools (`scp`, `sftp`) to be useful. If you've never installed ssh or X11 on your computer, these two pages will guide you through the process: - [Initial laptop setup](https://twiki.nevis.columbia.edu/twiki/bin/view/Main/InitialLaptopSetup) - [Installing X11](https://twiki.nevis.columbia.edu/twiki/bin/view/Main/X11OnLaptops) If you have an account on one of the Nevis particle-physics systems, those links were included in the introductory email I sent you with details about your account. In case it's not obvious: For the rest of this tutorial, I'll assume you've read the above web pages, know how to use `ssh` to connect to your Nevis server or some other computer system that includes ROOT, or you have your own installation. (terminal)= ## Terminals You will need at least two terminal windows open during parts of this tutorial. One window I\'ll call your "ROOT command" window; this is where you\'ll run ROOT. Another is a separate "UNIX command" window. Your existing terminal program includes some way of showing multiple windows or tabs; look through its menus for something like "New Window". If you're using a laptop to connect to a remote server, you'll have to separately use `ssh` to login to that server in each window.[^f1] [^f1]: Don't forget the `-XY` or some other method of forwarding an X11 connection to that server. :::{tip} I like to open a new tab instead of a new separate window, but you can use whichever mode you prefer. I suggest you try both methods to find out which one suits you. ::: :::{admonition} Escape from the gooey GUI :class: hint You may be used to a graphical user interface (GUI) instead of the command line; for example, opening a file with an appropriate application by double-clicking on its icon in a window. For copying and editing files, or developing code, I recommend against a GUI; almost all physics development work is done on the command line. This GUI advice won't apply if you start using ROOT notebooks. We'll get to that {ref}`later `. ::: ## Common issues ### Windows: X11 and WSL I say this on the [Installing X11](https://twiki.nevis.columbia.edu/twiki/bin/view/Main/X11OnLaptops) page, but it bears repeating: If you've installed [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install) on your laptop, please don't try to use it to `ssh` into a remote server from Linux. This will only work if you've linked X11 to WSL, and that is an [involved process](https://thomasward.com/wsl2-x11/). Just connect to your server via [mobaXterm](https://mobaxterm.mobatek.net/) directly. ### MacOS and XQuartz After you've installed [XQuartz](https://www.xquartz.org/), you have to log off and log in again to get it set up, or simply reboot your laptop. You're warned of this when you install XQuartz, but we all grow so used to hitting the blue button that it's easy to overlook. ### Testing the connection If you want to check that you've set up X11 forwarding correctly, type this into the UNIX command line on your server: echo $DISPLAY If you see a blank line as output, then you have *not* forwarded an X11 connection. If you see anything else (usually of the form `localhost:NN.N`), then X11 is set up. ## Installing ROOT on your laptop **Don't.** If this is too short and snarky for you, I'll elaborate: You may correctly deduce that setting up ROOT on your own computer system is not a trivial task. It is *not* an app you can double-click to install. To avoid a hassle, I suggest logging into the Nevis particle-physics servers or using the Nevis notebook server for this course if you are able to do so. The reason why I installed ROOT on the Nevis particle-physics systems and prepared the notebook server is so students and researchers affiliated with Nevis can spend less time on software installations, and more time on learning how to use the tools to do physics. Let's do physics. :::{admonition} If you have to... :class: note If the above is not enough to dissuade you, or you don't have a choice because you don't have a connection to either Nevis or another institution with ROOT already installed, I offer the {ref}`nitty-gritty details of installing ROOT `. :::