12. Run Software with a GUI
Running R software with a graphical interface
Make sure you have X11 software installed on your local computer first:
For Mac OS, you need to have XQuartz installed first. XQuartz usually requires restarting your computer before you can use it.
For Windows, you need to have XMing installed first.
To run a Graphical User Interface (GUI) such as RStudio, MATLAB IDE, and SAS, we need to logout (type
logout) and log back in to the Yens with X11 forwarding.
Once you logged out of the Yens, login with:
ssh -Y <SUNetID>@yen.stanford.edu
When prompted, type your SUNet ID password. Then, complete the two-factor authentication process.
After you successfully login, check that X-forwarding works correctly. Choose any of the following commands and type it in
the yen command line interface as all of them will pop up a window if everything is working correctly -
(or choose your favorite X11 command line program).
which will pop up a window with eyes tracking where your mouse is.
R / RStudio GUI
To run RStudio GUI, load the R module with the version of R that you want:
List the loaded modules:
module list Currently Loaded Modules: 1) rstudio/1.1.463 2) R/4.0.0
We see that RStudio is loaded automatically when you load R module. We can now launch RStudio with:
The RStudio GUI will pop open and you can do anything you would normally do in RStudio (but with noticeable delay due to X tunneling):
If you forget to load R module or loaded only the rstudio module, you will see an error that R is not found:
If that happens, just load
R module and start RStudio again.