OptionsApp

OptionsApp on Linux, part 2: Remote Desktop and file transfer

3 min read

This is part 2 of 4 of the guide OptionsApp on Linux. You connect to the server via Remote Desktop and bring files to it. The guide is meant for users who already work with Linux. It builds on part 1; placeholders such as IP-ADDRESS and USERNAME are listed in the overview.

Step 6: Connect via Remote Desktop

  1. On Windows, start "Remote Desktop Connection" (Start menu or mstsc).
  2. Enter the IP address under "Computer" and click "Connect" (first image). The image shows the dialog after a click on "Show Options"; the field "Computer" is all you need to connect. How to save the password is described below under "Optional: connect without the login window".
  3. Confirm the certificate warning ("The identity of the remote computer cannot be verified") with "Yes" (second image). The server uses a self-signed certificate, which is normal.
  4. In the login window of xrdp, leave "Session: Xorg" selected, enter the user name and password from step 4 and click "OK" (third image).

You now see the Xfce desktop. To open a terminal, use the menu at the top left ("Applications", then "Terminal Emulator").

Closing the window and logging out are not the same. If you close the Remote Desktop window, the session keeps running on the server: OptionsApp and TWS continue to work, and the next time you connect, you are back in the same session. If you log out in the Xfce menu instead, all programs are closed, including OptionsApp and TWS.

Optional: connect without the login window

With a Linux server, Remote Desktop Connection does not ask for the password itself, so it does not save it either. To avoid typing your user name and password every time you connect, store them in Windows once. Windows then sends them when you connect, and the server's login window is skipped.

Run this in PowerShell, replacing IP-ADDRESS and USERNAME first:

cmdkey /generic:TERMSRV/IP-ADDRESS /user:USERNAME /pass

cmdkey asks for the password. Enter the password of your user from step 4; it is not displayed while you type. After TERMSRV/, use exactly the address that you enter under "Computer" in Remote Desktop Connection.

You can also do this without PowerShell, in the Windows interface: open the Control Panel, then "Credential Manager", "Windows Credentials" and "Add a generic credential". Enter TERMSRV/IP-ADDRESS under "Internet or network address", plus the user name and password.

To connect with a double-click, save the connection as a file: in Remote Desktop Connection, click "Show Options", enter the IP address under "Computer" and USERNAME under "User name", choose "Save As" and save the file, e.g. on your desktop.

If you change the password on the server, run the command again with the new password. To delete the entry, use cmdkey /delete:TERMSRV/IP-ADDRESS.

The password is then stored encrypted in your Windows user account. Programs running under your Windows user can read it, and anyone sitting at your unlocked PC can connect to the server without a password. Only set this up on a PC that you use alone, and lock it with Windows key+L when you leave it.

Step 7: Transfer files

scp runs over SSH (port 22), so you do not need another port. In PowerShell, change to the folder that contains the file and copy it into the home directory of your user on the server:

cd $HOME\Downloads
scp -i $HOME\.ssh\optionsapp_vps file.zip USERNAME@IP-ADDRESS:~/

The other way round, this fetches a file from the server into the current folder on your PC:

scp -i $HOME\.ssh\optionsapp_vps USERNAME@IP-ADDRESS:~/file.zip .

To transfer whole folders, use scp -r. With the SSH configuration from step 5, scp file.zip optionsapp-vps:~/ is enough.

You can also do this without PowerShell, in a program with a window: in WinSCP (protocol SFTP, port 22) you drag the files back and forth with the mouse. WinSCP can use the same key. When you select the key file there, WinSCP offers to convert it to its own format.

Method B: download directly on the server

Files from the internet are easiest to download directly in Firefox in the Remote Desktop session. They end up in the folder ~/Downloads. You find the OptionsApp installation file for Linux and the matching installers for TWS and IB Gateway on the "Downloads" page of the OptionsApp user portal.

Clipboard

You copy text back and forth between Windows and the Remote Desktop session with Ctrl+C and Ctrl+V. In the terminal, you paste with Ctrl+Shift+V. Files copied via the clipboard or via shared Windows drives do not arrive reliably with xrdp. Use method A for files.

Back to part 1: set up the Ubuntu server. Continue with part 3: install OptionsApp and TWS or IB Gateway. All parts at a glance: OptionsApp on Linux.

More in the article Remote access via RDP: Windows PC, macOS, iPhone & iPad.

Was this article helpful?