Diferență între revizuiri ale paginii „FPGA Student Classroom tutorial”

De la WikiLabs
Jump to navigationJump to search
Linia 1: Linia 1:
Fpga Student Classroom Access Tutorial
+
== FPGA Student Classroom Access Tutorial ==
  
This is a guide that aims to show how to connect to the classroom resources remotely, in order to access the software and hardware resources (FPGAs) available at the university. The goal is to create a remote desktop session to one of the computers in the lab. This session can then be used to run software (eg. Vivado) and to program hardware FPGAs.
+
This is a guide that aims to show how to connect to the classroom resources remotely, in order to access the software and hardware resources (FPGAs) available at the university. The goal is to create a remote desktop session to one of the computers in the lab. This session can then be used to run software (e.g., Vivado) and to program hardware FPGAs.
  
 
Before you can connect to the classroom cluster, you will need to obtain the following from a system administrator:
 
Before you can connect to the classroom cluster, you will need to obtain the following from a system administrator:
  
* a VPN configuration file (eg. fsc00-myname.conf)
+
* A VPN configuration file (e.g., fsc00-myname.conf)
* a username and password
+
* A username and password
* an assigned workstation and FPGA board (eg. station07 & pynq07)
+
* An assigned workstation and FPGA board (e.g., station07 & pynq07)
  
 
The connection process consists of the following steps:
 
The connection process consists of the following steps:
  
1. Connect via VPN to the cluster network.
+
# Connect via VPN to the cluster network.
2. Connect to your workstation via SSH and create a remote desktop (VNC) instance.
+
# Connect to your workstation via SSH and create a remote desktop (VNC) instance.
3. Connect to the remote desktop instance.
+
# Connect to the remote desktop instance.
  
Step 1 -- VPN
+
== Step 1 - VPN ==
-------------
 
  
To connect to the cluster network via VPN you will need the provided VPN configuration file (eg. fsc00-myname.conf) and a Wireguard VPN client.
+
To connect to the cluster network via VPN, you will need the provided VPN configuration file (e.g., fsc00-myname.conf) and a WireGuard VPN client.
  
For a full guide on how to use the Wireguard VPN check [this page](https://link).
+
For a full guide on how to use the WireGuard VPN, check [this page](https://link).
  
Step 2 -- SSH
+
== Step 2 - SSH ==
-------------
 
  
 
In order to connect to your workstation via SSH to open the remote desktop instance, you will need a terminal application or a dedicated SSH client.
 
In order to connect to your workstation via SSH to open the remote desktop instance, you will need a terminal application or a dedicated SSH client.
  
Windows 11 comes with Windows Terminal. Windows 10 users can download the [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701) from the Microsoft Store or use the older Command Prompt application.
+
* **Windows 11** comes with Windows Terminal. Windows 10 users can download the [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701) from the Microsoft Store or use the older Command Prompt application.
 +
* **macOS** has a pre-installed Terminal application. [iTerm2](https://iterm2.com/) is a popular community alternative with more features.
  
macOS has a pre-installed Terminal application. [iTerm2](https://iterm2.com/) is a popular community alternative with more features.
+
First, connect to the workstation using the following command:
  
Firstly, connect to the workstation using the following command:
+
<syntaxhighlight lang="bash">
 +
ssh myname@station07
 +
</syntaxhighlight>
  
```bash
+
If this is your first time logging in, you will be prompted to change your initial password:
> ssh myname@station07
 
  
 +
<syntaxhighlight lang="bash">
 
(myname@station07) Password:  
 
(myname@station07) Password:  
 
Password expired. Change your password now.
 
Password expired. Change your password now.
Linia 43: Linia 44:
  
 
myname@station07:~$
 
myname@station07:~$
```
+
</syntaxhighlight>
  
Replace `myname` and `station07` with your username and your assigned workstation. If it is your first time logging in, you will be prompted to change your initial password, as in the example above.
+
Replace `myname` and `station07` with your assigned username and workstation.
  
Note: the terminal will not echo the password you enter, so you will not see what you are typing!
+
Once connected, launch a VNC instance with:
  
Once connected you can launch a VNC instance with the following command:
+
<syntaxhighlight lang="bash">
 +
vncserver -localhost no
 +
</syntaxhighlight>
  
```bash
+
If this is your first time starting a VNC instance, you will be prompted to set a password. You will also need to note the **VNC port** and **X display number** from the output. If you forget these numbers, you can retrieve them with:
myname@station07:~$ vncserver -localhost no
 
  
You will require a password to access your desktops.
+
<syntaxhighlight lang="bash">
 +
vncserver -list
 +
</syntaxhighlight>
  
Password:
+
To stop the VNC session, use:
Verify:
 
Would you like to enter a view-only password (y/n)? n
 
A view-only password is not used
 
/usr/bin/xauth:  file /ghome/myname/.Xauthority does not exist
 
  
New Xtigervnc server 'station07.fsc00.arh.pub.ro:3 (myname)' on port 5903 for display :3.
+
<syntaxhighlight lang="bash">
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /tmp/tigervnc.Dp5IoV/passwd station07.fsc00.arh.pub.ro:3 to connect to the VNC server.
+
vncserver -kill :3
 +
</syntaxhighlight>
  
myname@station07:~$
+
Replace `:3` with your actual X display number.
```
 
 
 
The `vncserver` command launches a VNC instance for your user. The `-localhost no` argument allows accessing the VNC instance from different machines.
 
 
 
If this is your first time launching an ssh instance, you will be prompted to choose a password for the VNC session. This can be the same password as the one for your account or it can be something different.
 
 
 
You will need to note two things from the program output, which you will use later: the VNC port used (5903 in the example above), and the X display number (:3 in the example). If you forget these numbers, you can run the `vncserver -list` command, to list your active VNC sessions and their associated ports and X display numbers.
 
 
 
Once you have an active VNC session, you can close your terminal application or SSH client. Your VNC session will remain active until you stop it manually.
 
 
 
Once you are done working on the system, you can close your VNC session manually with:
 
 
 
```bash
 
myname@station07:~$ vncserver -kill :3
 
```
 
 
 
Replace :3 with the X display number you noted earlier.
 
 
 
Step 3 -- VNC
 
-------------
 
  
You are now ready to connect via remote desktop to your station, using VNC. You will need a VNC client in order to connect. TigerVNC is a popular VNC client that is very easy to use. There are also other VNC clients which provide more features (RealVNC, TightVNC, Remmina), but they may be less reliable.
+
== Step 3 - VNC ==
  
You can install TigerVNC on Windows by downloading it from [here](https://sourceforge.net/projects/tigervnc/files/stable/1.15.0/).
+
To connect to your workstation using VNC, you will need a VNC client. **TigerVNC** is a popular choice, though others like RealVNC, TightVNC, and Remmina are also available.
  
You can install TigerVNC on macOS by downloading it from [here](https://tigervnc.macupdate.com/).
+
* **Windows:** Download TigerVNC from [here](https://sourceforge.net/projects/tigervnc/files/stable/1.15.0/).
 +
* **macOS:** Download TigerVNC from [here](https://tigervnc.macupdate.com/).
 +
* **Linux:** Install TigerVNC via Flatpak:
  
You can install TigerVNC on Linux via Flatpak by running `flatpak install flathub org.tigervnc.vncviewer` (without `sudo`). If Flatpak is not configured on your system, you can follow the guide [here](https://flatpak.org/setup/) to set it up. Alternatively, you may be able to find TigerVNC in your distribution's packages.
+
<syntaxhighlight lang="bash">
 +
flatpak install flathub org.tigervnc.vncviewer
 +
</syntaxhighlight>
  
Once TigerVNC is installed, running the program will bring up a prompt with an address field. Enter your workstation name, followed by a colon, and the port of your VNC instance, as shown below.
+
Once installed, enter your workstation name followed by a colon and the VNC port (e.g., `station07.fsc00.arh.pub.ro:5903`).
  
![Image of TigerVNC address prompt]([[Fișier:Tigervnc.png|miniatura]] "Enter your workstation and port here")
+
[[File:Tigervnc.png|1500px|thumb|Enter your workstation and port here.]]
  
Click connect any you will be prompted for a password. This is the password you entered when you first started a VNC instance, not the password for your user account.
+
Click **Connect**, then enter your **VNC session password** (not your account password).
  
![Image of TigerVNC password prompt](image2.png "Enter your VNC password here")
+
[[File:TigerVNC_password.png|thumb|Enter your VNC password here.]]
  
If you enter the password correctly, you will be greeted with a view of the desktop on your machine.
+
If successful, you will see your remote desktop.
  
 +
[[File:GNOME_desktop.png|thumb|You are now connected!]]
  
![Image of GNOME desktop](image3.png "You are finally connected!")
+
You can now open a terminal and launch Vivado:
  
 +
<syntaxhighlight lang="bash">
 +
vivado
 +
</syntaxhighlight>
  
You can open a terminal on this desktop and run `vivado` and wait for the Vivado IDE to open in order to check that everything is set up correctly.
+
[[File:Vivado_open.png|thumb|Vivado running on remote desktop.]]
  
![Image of Vivado open on GNOME desktop](image4.png "Connected to Vivado!")
+
== FAQ ==
  
# FAQ
+
'''Q: I cannot connect to my VNC session.'''
 +
A: Connect via SSH and check with `vncserver -list`. Ensure the VNC server was started with `-localhost no`.
  
Q: I can not connect to my VNC session.
+
'''Q: I cannot connect via SSH; my workstation appears to be powered off.'''
A: Connect to your workstation via SSH and make sure your VNC session appears when running `vncserver -list`. Additionally, make sure you have launched the VNC server using the `-localhost no` option.
+
A: Some students turn off the stations despite instructions. Contact a system administrator to power it on remotely.
  
Q: I can not connect via SSH, the workstation appears to be powered off.
+
'''Q: I can connect to VNC, but I see a login screen and an "Authentication error" message.'''
A: The workstations you are working on are used in the classrooms by students for lab activites. Some students have the tendency to close the stations when leaving the lab, against the teacher's instruction. If your workstation is powered off, contact a system administrator and they can power it on remotely.
+
A: This is a [known bug](https://askubuntu.com/questions/1224957/i-cannot-log-in-a-vnc-session-after-the-screen-locks-authentification-error) in TigerVNC. While connected via VNC, open an SSH session and run:
  
Q: I can connect to VNC, and it shows a login screen, but I can not type my password and it shows an "Authenthification error" message.
+
<syntaxhighlight lang="bash">
A: This is a [known bug](https://askubuntu.com/questions/1224957/i-cannot-log-in-a-vnc-session-after-the-screen-locks-authentification-error) in the TigerVNC server. With your VNC client still active, connect via SSH and run the `loginctl unlock-sessions`/
+
loginctl unlock-sessions
 +
</syntaxhighlight>

Versiunea de la data 8 martie 2025 14:50

FPGA Student Classroom Access Tutorial

This is a guide that aims to show how to connect to the classroom resources remotely, in order to access the software and hardware resources (FPGAs) available at the university. The goal is to create a remote desktop session to one of the computers in the lab. This session can then be used to run software (e.g., Vivado) and to program hardware FPGAs.

Before you can connect to the classroom cluster, you will need to obtain the following from a system administrator:

  • A VPN configuration file (e.g., fsc00-myname.conf)
  • A username and password
  • An assigned workstation and FPGA board (e.g., station07 & pynq07)

The connection process consists of the following steps:

  1. Connect via VPN to the cluster network.
  2. Connect to your workstation via SSH and create a remote desktop (VNC) instance.
  3. Connect to the remote desktop instance.

Step 1 - VPN

To connect to the cluster network via VPN, you will need the provided VPN configuration file (e.g., fsc00-myname.conf) and a WireGuard VPN client.

For a full guide on how to use the WireGuard VPN, check [this page](https://link).

Step 2 - SSH

In order to connect to your workstation via SSH to open the remote desktop instance, you will need a terminal application or a dedicated SSH client.

  • **Windows 11** comes with Windows Terminal. Windows 10 users can download the [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701) from the Microsoft Store or use the older Command Prompt application.
  • **macOS** has a pre-installed Terminal application. [iTerm2](https://iterm2.com/) is a popular community alternative with more features.

First, connect to the workstation using the following command:

ssh myname@station07

If this is your first time logging in, you will be prompted to change your initial password:

(myname@station07) Password: 
Password expired. Change your password now.
(myname@station07) Current Password: 
(myname@station07) New password: 
(myname@station07) Retype new password:

myname@station07:~$

Replace `myname` and `station07` with your assigned username and workstation.

Once connected, launch a VNC instance with:

vncserver -localhost no

If this is your first time starting a VNC instance, you will be prompted to set a password. You will also need to note the **VNC port** and **X display number** from the output. If you forget these numbers, you can retrieve them with:

vncserver -list

To stop the VNC session, use:

vncserver -kill :3

Replace `:3` with your actual X display number.

Step 3 - VNC

To connect to your workstation using VNC, you will need a VNC client. **TigerVNC** is a popular choice, though others like RealVNC, TightVNC, and Remmina are also available.

flatpak install flathub org.tigervnc.vncviewer

Once installed, enter your workstation name followed by a colon and the VNC port (e.g., `station07.fsc00.arh.pub.ro:5903`).

Enter your workstation and port here.

Click **Connect**, then enter your **VNC session password** (not your account password).

Enter your VNC password here.

If successful, you will see your remote desktop.

You are now connected!

You can now open a terminal and launch Vivado:

vivado
Vivado running on remote desktop.

FAQ

Q: I cannot connect to my VNC session. A: Connect via SSH and check with `vncserver -list`. Ensure the VNC server was started with `-localhost no`.

Q: I cannot connect via SSH; my workstation appears to be powered off. A: Some students turn off the stations despite instructions. Contact a system administrator to power it on remotely.

Q: I can connect to VNC, but I see a login screen and an "Authentication error" message. A: This is a [known bug](https://askubuntu.com/questions/1224957/i-cannot-log-in-a-vnc-session-after-the-screen-locks-authentification-error) in TigerVNC. While connected via VNC, open an SSH session and run:

loginctl unlock-sessions