Remote desktop connection to linux computer

12,516

The Remote Desktop Protocol belongs to Microsoft, which is why Linux has a different protocol to the same effect, called Virtual Network Computing (=VNC). This has many different implementations, including, among others, chicken of the VNC (that's right, that's not Children of the VNC), UltraVNC, PocketVNC, RealVNC, Remmina, TightVNC. They perform exactly the same task as rdesktop, i.e., they speed up graphical connections to remote machines.

You can find here on Wikipedia an enlightening comparion of the different remote-access-softwares.

It should be noticed however that RDP now exists also for Linux-to-Linux communications. Possibly, the reason why you were unable to get this to work is that you will have to setup an RDP server on one of the Linux machines before being able to rdp into it: in most (all?) distros such server is not installed at system installation.

The instructions to do this depend on distro, on Debian and derivatives you would install a package called xrdp, which...

apt-cache show xrdp
.............
Description-en: Remote Desktop Protocol (RDP) server
Based on research work by the rdesktop project, xrdp uses the Remote
Desktop Protocol to present a graphical login to a remote client.
xrdp can connect to a VNC server or another RDP server.

Microsoft Windows users can connect to a system running xrdp without
installing additional software.

You should check your distro's intructions to setup a proper xrdp server, then you will be able to connect to it with the same xrdp client you are using to connect to Windows hosts.

Share:
12,516

Related videos on Youtube

Alexander Cska
Author by

Alexander Cska

Updated on September 18, 2022

Comments

  • Alexander Cska
    Alexander Cska over 1 year

    I am frequently using ssh to connect to remote linux machines. Using ssh -X it is even possible to use the gui. Unfortunately, this is very slow, when done over the internet. The gui is very sluggish, and frankly speaking quite annoying to use. It is also not really what I would like to have, since I don't see the desktop, and opening multiple programs via the ssh -X, makes the connection even slower.

    Linux has one very handy tool named rdesktop. I can use rdesktop to log to my windows machine. In this case everything runs smoothly and results in no sluggish gui. Even better, is that I can actually see the same screen, as if I am sitting on the remote computer, which is my final goal. My question is, whether such option exists to connect form linux to linux and have similar features like rdesktop. Or even better, is it possible to use rdesktop to connect to a linux machine? I tired to do this, but I failed. To log on the windows machine I use Local port forwarding on an intermediate machine, since my desktop is on a local network and not directly visible from the internet. But I don't see why dis works with windows and not with linux.

    Thank you for your help

    With some help form the experts on this forum and some internet research I found a solution.

    Solution: It is possible to use rdesktop with Linux. For this xrdp is needed. The steps to use it are:

    1) install xrdp

    2) open /etc/xrdp/xrdp.ini and

    2.1) check on which port xrdp is listening

    2.2) to be able to resume sessions change port=-1 to port=ask-1 3) if xrdp is not on do service xrdp start if it is on you have to do service xrdp restart to load the new configuration.

    4) add rule to sudo iptables -I INPUT 1 -p tcp --dport XRDP_PORT -j ACCEPT

    5) rdesktop ip_remote_pc:XRDP_PORT -f -u "username"

    6) Enjoy

    Thanks for the help!

    • Admin
      Admin over 8 years
      If you want to connect from Linux to Linux and for personal use, If in you would check nomachine nx. Always server + client.
    • Admin
      Admin over 8 years
      I am doing this experiments on my home network, and was curious how to do the equivalent of remote desctop on Linux. xrdp seems to do the job fine, unfortunately it is a bit slower than doing rdesktop to a windows machine. Perhaps I will have to look at some fine tuning for speedup or use another tool.
    • Admin
      Admin over 8 years
      Check nomachine nx... and let me know if you find it better...
  • Alexander Cska
    Alexander Cska over 8 years
    Well that turned out to be a nightmare. I installed xrdp the service is running but I am getting connection refused. Since I am connecting via a login computer, I made local port forwarding to port 22. But I am getting connection refused with rdesktop.
  • MariusMatutiae
    MariusMatutiae over 8 years
    @AlexanderCska Of course it is a nightmare: xrdp works on port 5900, not 22. You ought to read the instructions before trying things blindly; there is no one who can help you if you do not learn a little about the software you install and use.
  • Alexander Cska
    Alexander Cska over 8 years
    Solved it! It is not Port 5900. Port is 3389.