0

I've setup my Ubuntu 22.04 Workstation in Dubai, and i myself am in Pakistan. I need to connect to that system graphically so that i can do my stuff that i need such as putting a machine learning model on training etc, because the laptop which i have here in Pakistan can't handle the workload. how can i connect to it graphically? I'm trying to connect to it from my Arch Linux system. I watched a YouTube video which showed how to access one linux machine from another graphically using reminna, but that process was for local machines which are on the same network, because it used the ip on the internet network to connect to the other system.

My usecase is to connect to my workstation which is located in Dubai, my brother lives there and i tried to get it to work with his help but I can't seem to connect. I tried TeamViewer which worked like one time and when i restarted that machine and tried to connect then it kept failing, it was jot able to connect to it. I used TeamViewer on my machine and TeamViewer host on my remote machine which I'm trying to access.

I then tried anydesk to access that remote system and i got an error on my end saying that wayland is detected and all. Then i asked my brother to login using Ubuntu On XORG which caused to screen to freeze and go black when he logged in. So clearly anydesk is not gonna work

Then i tried to use reminna because as i heard from YouTube, its the best for linux system. I tried to get that public ip of the remote system by asking my brother to to google and search What's my ip. I put that ip in on my end on my reminna and try to connect but i fails.

Can you please recommend any software which i can use reliably to access my remote workstation at any time.

And also I don't know much about ISP providing static IP and port forwarding. Can you please teach me how to get these things done?

I shall be very thankful to you.

  • Your question contains insufficient network information to be answerable yet. Were you able to connect from the Internet (not the LAN) in Dubai? How long since you were last able to connect? Is there a router between the workstation and the internet? Is that router properly configured for port forwarding? Is the ISP providing a static IP address, or a dynamic IP address? – user535733 Sep 08 '22 at 21:07
  • Yes sir, i updated my question. Is it fine now? – Sharjeel M. Rajput Sep 08 '22 at 22:46
  • Thank you sir @user68186 – Sharjeel M. Rajput Sep 09 '22 at 21:05

1 Answers1

4

This solution is only for Ubuntu 22.04 and above.

RDP using Gnome Remote Desktop

You need local access to the remote computer for setting it up. It is best if you have another computers in the local network (your brother's home in Dubai) and you can test it first within the local network.

Enable Remote Desktop Sharing

Go to the System Menu at the top right corner of the desktop and open Settings:

enter image description here

  1. Go to the Sharing tab on the left
  2. Toggle the button on at the top right corner
  3. Click on the Off > next to Remote Desktop

You will see the Remote connection configuration window:

enter image description here

  1. Turn the Remote Desktop button on
  2. Turn the Remote Control button on
  3. Set up your RDP username. This can be your login username or something more complicated and harder to guess
  4. Note down the password by clicking on the "eye" icon

Test Remote Connection locally

Go to another computer and use RDP protocol to connect to the Ubuntu computer you just set up.

You will need three bits of information:

  1. The local IP address of the Ubuntu computer. This may look like 192.168.0.40. The last 2 digits will be different.
  2. The Username set up in the previous step
  3. The password set up in the previous step

If all goes well, you should be able to control the Ubuntu computer from another computer within your brother's home in Dubai.

Note: You must be locally logged in to the Ubuntu computer. If you are logged out, you will not be able to remotely log in by this method.

Port Forwarding 3389

The RDP protocol uses the port 3389. You will need to go to the setting of the home router in your brother's home in Dubai. This can be done in two ways:

  1. Using a phone app provided by the router company
  2. Using a browser like Chrome or Firefox from a computer connected to the router.

We will use the second method, as the phone app may not have all the options we need.

Open the router's settings page in a browser by going to the router's IP address. This may be something like 192.168.0.1.

You will need the router's userID and password (or just the password).

Go to the Advance Setup and look for the Port Forwarding tab.

Turn port forwarding on. Add a new entry like this:

enter image description here

The settings in your brother's home router may look different.

The values you will enter will also be different from the above picture:

  1. Service Type: RDP
  2. External Port: 3389
  3. Internal IP: The internal IP address of your Ubuntu computer.
  4. Internal Port: 3389
  5. Protocol: All or both TCP and UDP

Save the port forwarding settings and you may have to reboot the router to have them take effect.

Note, you may want to set up a reserved internal IP address for your Ubuntu computer from within the router settings. This is very important if your Ubuntu computer is connected to the router by WiFi and/or is often turned off. If you do not assign a reserved IP address to your Ubuntu computer, the router may assign a different internal IP address at a later date. If that happens, you will have to change the port forwarding rule to reflect the new IP address.

External IP

The external IP address is the IP address your brother will get when he googles what is my IP address. This IP address is assigned by the Internet service provider (ISP). If this is dynamic it will change from time to time. If this happens you will need to get the updated IP address from your brother.

When you use Remmina you will use the external IP address, and the userID and password you set up before.

You may look into Dynamic DNS (DDNS) services. They allow you to connect to your remote computer even if the external IP address changes.

Lock screen issue

Your remote computer (in Dubai) must be turned on and your username must be locally logged in for this to work. However, after a period of inactivity in the remote computer the screen may be locked. When this happens, the RDP connection will not work.

You will need a gnome-shell-extension to solve this problem.

First, install install gnome-shell-extension-manager with this command:

sudo apt install gnome-shell-extension-manager

The open the app called Extension and within this app search for and install the Allow locked Remote Desktop Gnome shell extension.

Source: Rdp on Ubuntu desktop 22.04

ssh tunnel

You may want to look into ssh tunnel if you want your remote computer to be more secure. Any hacker can try to guess (or brute force) your RDP password and if successful, gain access to your remote computer. An "ssh tunnel" allows key based authentication which is safer than passwords.

Some Limitations

As I have mentioned above, you have to locally logged in first to remotely access your computer. If for some reason the computer is restarted, your brother will have to login to the computer on your behalf before you can remotely access it.

If another user is using the computer the remote connection may not work.

Hope this helps

user68186
  • 33,360