sim02
THIS SERVER DOES NOT EXIST ANYMORE. KEEPING THE PAGE FOR REFERENCE.
sim02 is a simple Ubuntu Server 20.04 machine hosted at 192.168.6.192
, which can be accessed with VNC through an SSH connection.
Hardware specs
- Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz
- 32GB RAM 1600 Mhz
- NVIDIA Quadro K2000
- Boot SSD 256GB
- HDD 1TB 7200rpm
- HDD 500GB 7200rpm
Installed software
Please use this folder to place new software when possible: /media/data500gb/software/
name | path |
---|---|
MATLAB 2021b | /usr/local/matlab |
SPM12 | /media/data500gb/software/toolboxes/spm |
CONN Toolbox v20b | /media/data500gb/software/toolboxes/conn |
VNC Configuration
The configuration of the VNC server was based on this link. You can follow this (skipping the installation steps, they were already performed) but some changes are needed for this to work, so we state all the necessary steps here.
The main concept is that each user must configure its own access to VNC (step 2 of the tutorial).
Step-by-step
- Login through ssh to sim02.
- Run the command
vncserver
. This will initiate the server for the current user.- Type in a password specific for the VNC connection.
- When prompted for view-only password, answer no.
- Kill the instance that we just opened with
vncserver -kill :1
- Create a backup of the startup file
mv ~/.vnc/xstartup ~/.vnc/xstartup.orig
- Start a new file
nano ~/.vnc/xstartup
and add the following lines:
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
- Make this file executable
chmod +x ~/.vnc/xstartup
- Restart the server
vncserver -localhost
- Kill the instance that we just opened with
vncserver -kill :1
- Now we need to create a service to keep this vnc server running, even after a restart. For this, type
sudo nano /etc/systemd/system/vncserver<INITIALS>@.service
replacing<INITIALS>
with your name initials. - Copy this text to the file, replacing the fields
<username>
when asked (don’t copy from the tutorial, it has a typo):
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=<username>
Group=<username>
WorkingDirectory=/home/<username>
PIDFile=/home/<username>/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver :%i -depth 24 -geometry 1920x1080
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
- After selecting a port for you user (see Registered users and ports), let’s say
YY
, run the following sequence of commands to start the service:
sudo systemctl daemon-reload
sudo systemctl enable vncserver<INITIALS>@<YY>.service
sudo systemctl start vncserver<INITIALS>@<YY>
sudo systemctl status vncserver<INITIALS>@<YY>
Recommended apps for accessing through SSH or VNC
Windows
The recommendation is to use MobaXterm to open the VNC and SSH tunnel both at the same time.
Create a VNC connection with SSH on in the advanced features.
Linux
Remmina is a great client for handling both VNC and SSH. Use the following settings:
- Basic
- Server: 127.0.0.1:509X (where X comes from the table below)
- User password:
- Color depth: 24 bpp
- Quality: Best
- SSH Tunnel
- Click “Enable SSH tunnel”
- Select custom and insert 192.168.6.192
- Username:
- Password:
macOS
Type this command in the terminal to open the SSH tunnel:
ssh -L 59000:localhost:59XX -C -N -l <username> 192.168.6.192
where 59YY
must be replaced by the user-specific window configured, according to the table below (Registered users and ports), and <username
must be replaced by your username.
Then, in Screen Sharing (or Screens), type localhost:59000
to access the graphical interface.
Registered users and ports
username | vnc port |
---|---|
alexandresayal | 5904 |
danielapereira | 5905 |
brunodireito | 5906 |
rutebettencourt | 5907 |
joaoduarte | 5908 |
Info for admins
Check this link to know how to attribute/change the static IP.