1
00:00:00,000 --> 00:00:10,120
In this video, you'll learn about remote access protocols.

2
00:00:10,120 --> 00:00:13,400
So X-Forwarding is a remote access protocol.

3
00:00:13,400 --> 00:00:19,440
Now the thing with this is that it is old, because X-Forwarding is only useful in X11

4
00:00:19,440 --> 00:00:20,440
based environments.

5
00:00:20,440 --> 00:00:25,000
In these environments, you could forward graphical applications remotely and show their screens

6
00:00:25,000 --> 00:00:30,600
on the current host using SSH minus UPSCORE-X, followed by the IP address and the name of

7
00:00:30,600 --> 00:00:33,680
the applications that you wanted to run.

8
00:00:33,680 --> 00:00:37,799
On Wayland, that doesn't work anymore, because Wayland doesn't include a built-in network

9
00:00:37,799 --> 00:00:39,119
protocol.

10
00:00:39,119 --> 00:00:43,639
And also for security reasons, it doesn't allow remote applications to draw screens

11
00:00:43,639 --> 00:00:45,680
on it by default.

12
00:00:45,680 --> 00:00:51,360
As a solution for backward compatibility, the XORG X11 server XWayland package can be

13
00:00:51,360 --> 00:00:56,480
installed on the local machine to provide a local X server within Wayland.

14
00:00:56,480 --> 00:01:00,639
Because without X server, there is no way that the graphical application can draw its

15
00:01:00,639 --> 00:01:02,599
screens.

16
00:01:02,599 --> 00:01:07,800
On the remote server, the XORG X11 XALT package needs to be installed to handle the forwarding

17
00:01:07,800 --> 00:01:09,620
correctly.

18
00:01:09,620 --> 00:01:15,279
And also ensure that in secure shell configuration, the options forward X11 is yes and forward

19
00:01:15,279 --> 00:01:20,400
X11 trusted is yes are set on the client as well as on the remote.

20
00:01:20,440 --> 00:01:26,320
Notice that X forwarding only works on applications that are developed for X11, and not for Wayland

21
00:01:26,320 --> 00:01:27,320
applications.

22
00:01:27,320 --> 00:01:31,000
And that means that depending on your distribution current configuration, you may have a hard

23
00:01:31,000 --> 00:01:34,000
time finding the right application.

24
00:01:34,000 --> 00:01:38,639
Some classical X11 applications are XICE and GNOME terminals, so that is what you could

25
00:01:38,639 --> 00:01:39,639
try.

26
00:01:39,639 --> 00:01:43,639
All right, I'm going to show you how to forward graphical sessions.

27
00:01:43,639 --> 00:01:47,680
So I have two servers, one of them is remote, that's where the graphical application is

28
00:01:47,680 --> 00:01:48,680
installed.

29
00:01:49,000 --> 00:01:54,239
That's where you need dnf install XORG X11 server XWayland.

30
00:01:54,239 --> 00:01:58,919
That is going to install the X11 compatible server for Wayland.

31
00:01:58,919 --> 00:02:05,279
Next you need to tweak sshd-config, the secure shell server configuration, with the parameter

32
00:02:05,279 --> 00:02:07,919
X11 forwarding yes.

33
00:02:07,919 --> 00:02:11,039
Don't forget to restart the sshd process.

34
00:02:11,039 --> 00:02:17,039
And then on local, you need to install XORG X11 XALT, because otherwise the remote client

35
00:02:17,039 --> 00:02:21,600
is not authorized to draw its screens on the local machine.

36
00:02:21,600 --> 00:02:30,360
Make sure you set forward X11 yes and forward X11 trusted also to yes in etc ssh ssh-config.

37
00:02:30,360 --> 00:02:36,720
And then from local, you can use ssh-y user at remote server GNOME calculator.

38
00:02:36,720 --> 00:02:42,119
To be considered, at the moment that I'm recording this, GNOME calculator is still an X11 compatible

39
00:02:42,119 --> 00:02:43,520
application.

40
00:02:43,520 --> 00:02:49,800
It is very important that you have an X11 compatible application and not a Wayland application,

41
00:02:49,800 --> 00:02:51,880
because they won't work.

42
00:02:51,880 --> 00:03:01,399
So here we have the remote server, I'm going to use sudo dnf install XORG-X11-server and

43
00:03:01,399 --> 00:03:05,240
XWayland.

44
00:03:05,240 --> 00:03:12,600
And next I need to go into etc ssh sshd-config to apply.

45
00:03:12,600 --> 00:03:20,520
Then we need to tweak the sshd-config and make sure it has X11 forwarding set to yes.

46
00:03:20,520 --> 00:03:27,460
Now systemctl restart sshd to restart the ssh server, and we should be OK.

47
00:03:27,460 --> 00:03:37,000
So now we are on the local host, and on the local host, I need sudo dnf install XORG-X11-XALT,

48
00:03:37,000 --> 00:03:40,720
which is taking care of proper authentication.

49
00:03:40,720 --> 00:03:51,399
Next, I need to take care of the ssh-client configuration in etc ssh ssh-config, not to

50
00:03:51,399 --> 00:03:56,880
be confused with sshd-config, which is for the server.

51
00:03:56,880 --> 00:03:59,759
And then we have forward X11.

52
00:04:00,279 --> 00:04:04,279
Forward X11 needs to be set to yes.

53
00:04:07,440 --> 00:04:21,359
Next, I also need forward X11 truss set is yes.

54
00:04:21,359 --> 00:04:26,720
And we don't have to install anything because it's the ssh-client installation.

55
00:04:26,760 --> 00:04:35,040
I'm going to use ssh-y, student at remote, and let's use GNOME calculator.

56
00:04:37,480 --> 00:04:43,720
So I need to authenticate as user student, enter the password, and there we go.

57
00:04:43,720 --> 00:04:45,799
We can see the GNOME calculator.

58
00:04:45,799 --> 00:04:51,920
And that is how you forward graphical applications in the old X11 compatible way.

