startx Linux RDP

Would you want to access with RDP  a virtual machine?

It certainly is not a requirement. You can set the app to trade live from within your personal machine too. A VM on the cloud may be convenient or not, depending on your approach to trading and particular needs.

I use my PC all day for all sorts of stuff, and wouldn’t want to mix running trading bots with the rest of my work. I prefer the bots to run in a stable environment.

A second machine at home would be an option too. That would entail having a PC on at all times, which is a bit inconvenient.

Also, a virtual machine on the cloud should be a lot more reliable than a machine at home, at the very least in terms of network connectivity. My Internet connection at home is fine for Netflix, but I wouldn’t trust my hard-earned cash to it.

It’s up to you to decide what is best for you.

Why Linux?

Linux is by far a lot more reliable than any other OS.

It requires less maintenance and does not present any of the abusive and annoying features you would encounter on Windows systems, such as mandatory Windows Updates, uncontrollable reboots and so on.

Last but not least, you don’t need to pay Microsoft a license for the software.

Is a Linux VM the right choice for me?

If you are not familiar with Linux, a Command Line Interface (CLI) or are at least a technical person, then I would say a Linux VM is not for you. You may be better off with a Windows machine, which is usually accessible via Remote Desktop right after deployment.

Not that you can’t try it, though, if you feel adventurous enough and are willing to learn a thing or two.

The Set-Up

I will assume you are starting with a fresh Ubuntu Server 18.04 installation. That is what you will get from most cloud providers like Amazon AWS, Microsoft Azure or DigitalOcean, to name a few.

You will need a CLI (Command Line Interface) or Terminal application during the setup process. I’m currently using Putty, but you may use whatever you have at hand.

Let’s get started!

You will start by logging in the machine with the credentials you provided the cloud provider portal when deploying the VM. Putty comes with an interface to connect to the remote machine before actually opening the CL. If your CLI doesn’t have a log in feature, you will use the following command:

ssh username@vm_ip_address

Now you’ll make sure the system is up to date and that repositories are synchronized:

sudo apt update

Installing a visual environment

Linux is mostly managed via CL. A basic installation is usually deprived of a GUI (Graphic User Interface). That is, Linux comes out of the box without a “desktop” interface.

Because the app runs on the web browser and is visual in nature, we will need to install a visual environment to put it to trade live.

There are several environments available. I chose Xfce because it’s simple and lightweight. This machine is meant for running  Desktop App, so you won’t need much more than very basic functionality in your desktop. A lightweight solution is desirable as you don’t want all the bells and whistles of higher-end solutions draining resources from the machine, which don’t come off cheap.

To install Xfce, use the following command:

sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

It may take a while to install, so be patient.

Installing a remote desktop application

Xrdp is an open-source solution that you can install on a Linux machine so that it may accept remote desktop connections from other machines, even when the client machine runs a different operating system.

To install Xrdp, run the following command:

sudo apt install xrdp

Now you need to configure Xrdp so that it works with Xfce. This involves opening a configuration file on a file editor, adding a line to the file, and saving it.

Let’s start with opening the file on an editor:

sudo vi /etc/xrdp/xrdp.ini

The file will open and show something like this:

You will use your keyboard to move the cursor to the bottom of the file and click the Insert key on your keyboard to toggle from Replace to Insert mode. Now hit Enter twice to leave a blank line and type exec startxfce4.

Then click Ctrl + C to get back the CL and use the following command to save the file:

:w

And the following to exit:

:q

Finally, you need to restart the Xrdp service:

sudo systemctl restart xrdp

Opening Xrdp port

By default, Xrdp uses port 3389. You need to make sure that your local machine can access the VM through this port.

Cloud service providers tend to have features in their resource administration portal to handle basic network setups and connectivity, and that is the best place to look into.

In the case of Microsoft Azure, they call this feature the Network Security Group. Azure presents this as a resource associated with the VM. Other providers may call it differently, but the underlying concept is the same.

Look for the Inbound security rules settings and add a new rule with the following settings. The ones with a yellow marking are the settings that matter to establish the connection.

 

he following command to open port 3389 to a certain IP address or range (replace 0.0.0.0 with your IP):

sudo ufw allow from 0.0.0.0/24 to any port 3389

This other command will open up the port to anyone trying to access it:

sudo ufw allow 3389

Bear in mind these commands will have no effect if your cloud provider handles network security independently from the VM itself, which is the case most of the time.

Connecting via remote desktop

You are all set to fire up your Remote Desktop Connection app if you are on a Windows system. If you are on Mac, you will need to install the Microsoft Remote Desktop app from the app store.

Simply fill in the form with the IP address of your Linux VM and the user name you set up while deploying the machine and click Connect.

If everything goes well, you should be asked for credentials and maybe to acknowledge that the remote host is unknown and that should be added to your list of trusted hosts.

After confirmations, you should be logged in and asked if you wish to use the default config. Say yes.

 

 

  • 0 Users Found This Useful
這篇文章有幫助嗎?

相關文章

How to install cPanel?

cPanel is a #1 Hosting Control Panel in the web hosting industry and you can easily install...

How to Install Plesk or Onyx on Linux CentOS?

Plesk is a popular website control panel and it makes managing your website easy. Although it is...

How to Install DirectAdmin on Linux CentOS?

DirectAdmin(DA) is a Commercial Hosting Control Panel and is used for selling shared and reseller...

How to Install Webmin on CentOS 7 Linux?

Webmin is a free hosting control panel with an easy installation. It takes only 5 to 10 minutes...

How to Install SolusVM Master on CentOS 7 Linux?

SolusVM is a popular VPS hosting control panel and SolusVM master is used for controlling Slave...