Karas Lab:Accessing the Server
Preface
These instructions are for a Mac computer. If you are on Windows, you will have to install MobaXterm for terminal access. Make sure you are connected to the UTMB VPN before doing any of these steps, or none of them will work. Also, I will be using {IP address} as a placeholder for the IP address of the server we are trying to connect to.
Screen Sharing (easy)
You can use the Screen Sharing app built into MacOS. Just enter the IP Address of the server and log in to the Karas Lab account.
Remote file mounting
- Open finder.
- Press Cmd + K, and enter smb://{IP address} in the Server Address. You should now be able to access the files and folders of the server.
ssh in terminal
- Open terminal.
- Type
ssh karaslab@{IP address}
- Enter the password for Karas Lab. You are now ssh'd into the server!
Running RAVE
- Open R by just typing
R
in the terminal. - Enter
rave::start_rave(host = '{IP address}', launch.browser = FALSE, port = 1234)
orrave::rave_preprocess(host = '{IP address}', launch.browser = FALSE, port = 1234)
- This will open an instance of RAVE running on the server that you can access from your local machine. On your local machine, you can go to {IP address}:1234 to access this instance of RAVE!
Note: the port number (1234 in this example) doesn't matter. The numbers 0-1023 are reserved and should not be used, but you can use whatever number you want beyond that.)
Using screen
Screen is a useful tool in linux to preserve your terminal sessions in case you want to come back later (or if you get disconnected unexpectedly). It's also useful if you're working on multiple projects at once and want to keep separate sessions open for each of them.
- Type
screen -S [session-name]
. This will open up a new screen session with whatever name you want. - To disconnect from this screen session, type ctrl+a and then press d.
- If you want to go back into the session, or if you have been disconnected unexpectedly, ssh back into the server and type
screen -ls
. This will list all of the current screen sessions that are running, and whether they are attached or detached.- To get back into an attached session:
screen -x [session-name]
- To get back into a detached session:
screen -r [session-name]
- To get back into the most recent detached session automatically:
screen -R
- To get back into an attached session:
- Once you are done and want to close an instance of screen, just type
exit
or use ctrl+d like you would to exit a normal terminal session. Note that this is different from detaching from a screen, and you cannot come back to this session once you end it!
There are many other functionalities in screen that you can find if you enter man screen
or just search it up online.