arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up a Ubuntu-CentOS Server from scratch: Remote Desktop Access & x2go
#1
*This tutorial is part of a series, visit the main thread to learn more*

Thanks to @"Hidden Refuge" suggestion, I successful set up a x2go sever to remote desktop access. I find the set up of x2go A LOT OF EASIER compared to the installation of VNC, you can find a step-by-step guide of VNC installation by @"Hidden Refuge"  here.

On this tutorial we will learn what is a remote desktop access, why we are using x2go and how set up a x2go server/client.

Let's start with some information:

  • What is remote desktop access?
    It is a feature that allow us to run and display a desktop environment session of a server (o personal computer) from a different device, often far from the server location. You will be able to remote graphically control a system using its own native UI. To develop this features a lot of protocols has been created and here a list of them (source Wikipedia):
    • Apple Remote Desktop Protocol (ARD): Proprietary protocol for Apple Remote Desktop on macOS machines.
    • Appliance Link Protocol (ALP): A protocol for Sun Microsystems featuring audio (play and record), remote printing, remote USB, accelerated video.
    • HP Remote Graphics Software (RGS): A proprietary protocol designed by Hewlett-Packard specifically for high end workstation remoting and collaboration.
    • Independent Computing Architecture (ICA): A proprietary protocol designed by Citrix Systems.
    • NX technology (NoMachine NX): A cross platform protocol featuring audio, video, remote printing, remote USB, H264-enabled.
    • PC-over-IP (PCoIP): A proprietary protocol used by VMware.
    • Remote Desktop Protocol (RDP): A Windows-specific protocol featuring audio and remote printing.
    • Remote Frame Buffer Protocol (RFCool: A framebuffer level cross-platform protocol that VNC is based on.
    • SPICE (Simple Protocol for Independent Computing Environments): A remote-display system built for virtual environments by Qumranet, now Red Hat.
    • Splashtop: A high performance remote desktop protocol developed by Splashtop, fully optimized for hardware (H.264) including Intel / AMD chipsets, NVIDIA / ATI GPU & APU, Qualcomm Snapdragon, and NVIDIA Tegra. By optimizing for different profiles of media codecs, Splashtop can deliver high frame rates with low latency, and also low power consumption.
    • Xpra: A protocol originally developed for forwarding X11 application seamlessly with audio, video, remote printing, etc - extended to support Windows and macOS servers.
    • X Window System (X11): A cross-platform protocol mainly used for displaying local applications.
  • Why use x2go instead of VNC?                                                                                  
    • x2go uses NX 3 protocol instead of RFB(VNC) protocol.
    • When connecting hosts across the network, the NX protocol works as a generic tunnel, with additional framing and flow control information, and dynamically adapts compression and bandwidth according to network speed and capacity. For compatibility, multiplexing is based on the version 3 schema. [from Wikipedia, I couldn't express so good as it).
    • The connection is established via SSH
    • Works at full with 2D graphics.
    • x2go uses client-rendering
    • x2go-server is started on demand when a connection is established
  • These aren't all the good things of x2go but I listed the main important information.

  • Installing x2go-server (The commands should be runned as sudo or root):
    • Connect to your server and login as root;
    • Make sure that your system is up to date with the following command: (* reboot after the update process is optional *)
    • Now we need to add the x2go repository
      • UBUNTU: x2go is available on x2go official PPA, to add the ppa run the following command:
        add-apt-repository ppa:x2go/stable
        On latest ubuntu versions, this command will automatically trigger a update but if you are on a <18.XX version you need to:
        apt-get update
      • CENTOS: x2go is available on EPEL repository, so we need to add EPEL on our system:
        yum install epel-release
    • Now we can install x2go using the following command:
      • UBUNTU:
        apt-get install x2goserver x2goserver-xsession
      • CENTOS:
        yum install x2goserver x2goserver-xsession
    • Installing a desktop environment (The commands should be runned as sudo or root):
      Now you can install whatever DE you want, but a server's resources are very valuable so I recommend to install a lightweight DE such as XFCE or LX.DE:
      • To install XFCE use the following command:
        • UBUNTU:
          apt-get install xfce4
        • CENTOS: xfce is available on EPEL repository, but we have already installed it, so we need just to run this command:
          yum groupinstall xfce
      • To install LX.DE use the following command:
        • UBUNTU:
          apt-get install lxde
        • CENTOS: lx.de isn't available on official repository so I reccomend to don't install it.
      • Extra: LX.DE developers are now focused on the their newest project, LXQT, based on Qt. You can install LXQT on UBUNTU using the following command:
        apt-get install lxqt
      @"Hidden Refuge" reported us that if your VPS is using OpenVZ you will get some problems:
      WARNING: If you use this guide on OpenVZ keep the following in mind! The desktop environment installs a network manager. This network manager is not capable of supporting and configuring network adapters on OpenVZ! What will happen is that it will override the network adapters with nonsense and the network will stop working after the first reboot.

    • To fix this problem follow the instructions by @"Hidden Refuge" here 

    • Installing x2go client and creating a session:
      • Download the official x2go client for your OS from here
      • Install and open the program and go to Session->New session... to create a new session
      • A windows pop-up will show up, there are few tabs: Session, Connection, Input/Output, Media, Shared Folder. We will focus only on Session tab, the others contains setting that are easy to understand.
      • On "Session name" set a name that will help you to identify on which server are you going to log in
      • On "Host" set your VPS IP address or domain
      • On "Login" set a linux user name which can SSH into the server
      • If you changed the SSH port you need to set it on "SSH port"
      • If you are using SSH keys to connect to your server, select your key on "Use RDA/RSA key for connection"
      • Lastely, on "Session Type" select the DE that you installed on your server. The commons DEs don't require a "command".
      • Click OK to save your session.
      • Now by clicking on your session you will start the connection. If you are using SSH password, you will be asked to insert the password.
Thanks to Post4VPS and Bladenodefor VPS 14
#2
Great tutorial @LightDestory! A reputation well deserved.

A lot of quotes you're taking from me there Wink. Better stay safe than sorry though. I think in general everyone should issue such warnings in their tutorials. Sometimes out of the blue everything can go really wrong even during the most trivial operations. Or at least issue such warnings when you know that something could go wrong. In situations where maybe you even experienced it yourself when writing the guide, like I did when I made the VNC guide you linked to. Well, or rather said when I have been actually solving a issue for a user that wanted to use VNC on their CentOS 7 VPS.

Regarding installing the WM and DE components. I got to know of FreeNX/x2Go through a good old friend from FreeVPS.us who initially wrote a guide for this kind of remote desktop. He basically however only installed the "core" components of the WM and DE. I believe that this might slim down the needed resources disk space wise and even RAM usage wise. However don't quote me on that! I didn't really do benchmarking. I remember using this setup myself a few times and RAM usage has been lower (than what you mentioned in the shoutbox) but I used Debian 8 which by default has a quite low memory usage (the blank OS without stuff installed).

That is the guide I'm talking about: https://freevps.us/thread-11689.html (notice how he only installed xfce-core instead of the whole XFCE environment).

And about the network manager issue. Thanks for bringing that up actually! It is very important for OpenVZ VPSs. Especially for users here that have a VPS without a control panel. When their network breaks for this reason they have no means to access the VPS at all anymore and need help from staff at the end actually. So everyone should keep that in mind and possibly do what I suggested here before they reboot their server!.
[Image: zHHqO5Q.png]
#3
Quote:Regarding installing the WM and DE components. I got to know of FreeNX/x2Go through a good old friend from FreeVPS.us who initially wrote a guide for this kind of remote desktop. He basically however only installed the "core" components of the WM and DE. I believe that this might slim down the needed resources disk space wise and even RAM usage wise. However don't quote me on that! I didn't really do benchmarking. I remember using this setup myself a few times and RAM usage has been lower (than what you mentioned in the shoutbox) but I used Debian 8 which by default has a quite low memory usage (the blank OS without stuff installed).
@"Hidden Refuge"
Thanks for your report. I tried to search about a "core" package list but I didn't find anything. I tried the following package name:
  • xfce
  • xfce-core
  • xfce4-minimal
  • xfce4-core
But let me explain a thing: by using the command
Quote:apt-get install xfce4

We are installing only the XFCE desktop environment, we are not installing others application, activing sessions.
Meanwhile by using the command
  • apt-get install xubuntu-desktop , you will install a full working xfce environment with standards application such as firefox, editors, ect...
  • apt-get install xubuntu-minimal , you will install a xfce environment with only system applications.
But if you use the previous 2 command you will install and activate windows manager and your server will start up with a XFCE session.
Regarding the Network Manager I am going to edit the warning to be more clear.
Thanks to Post4VPS and Bladenodefor VPS 14
#4
all fine and dandy. buut no android client !! that is bad.
If any of you guys know of any alternative or workaround to make it work on android, please let me know. Till then, vnc is the main option on android.
Sincere Thanks to VirMach for my VPS9. Also many thanks to Shadow Hosting and cubedata for the experiences I had with their VPSs.
#5
(09-01-2019, 02:53 PM)rudra Wrote: all fine and dandy. buut no android client !! that is bad.
If any of you guys know of any alternative or workaround to make it work on android, please let me know. Till then, vnc is the main option on android.

You are right, x2go is lacking of support for Android or iOS, but remember that NX protocol is very powerful compared to RFB. Moreover VNC isn't secure by default like x2go, when using VNC you need to tunnel your communication by yourself, meanwhile x2go uses SSH by default.

I agree with your complain about cross-platform support but let me explain why: x2go uses NX protocol with advanced libs for graphics and other features, so you must use official x2go client. According to x2go developers, their software uses these libs (not present on 3rd party clients) and authenticate via SSH in a particular way, so it is not compatible with other NX clients, such as NoMachine clients that is available for desktop and mobile OS.
Thanks to Post4VPS and Bladenodefor VPS 14
#6
The tutorial has been updated to be used on my tutorial series.
Improves tutorial formatting and added CentOS support.
Thanks to Post4VPS and Bladenodefor VPS 14



person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting