Rdesktop: Access Windows Desktops Remotely From Linux [Quick Tip

Linux Remote desktop to Windows 7

Linux / October 4, 2018

Adding a forwarded port to PuTTY.Updated by James Stewart

Use promo code DOCS10 for $10 credit on a new account.

This guide has been deprecated and is no longer being maintained.

This guide details how to install a graphic desktop environment on your Linode running Ubuntu 12.04 and connect to it from your local computer using VNC.

Installing a Desktop and VNC on your Linode

  1. Before you begin it’s good practice to make sure your system is up to date:

    1 2

    sudo apt-get update sudo apt-get upgrade

  2. sudo apt-get install ubuntu-desktop

  3. Next install the VNC server:

    sudo apt-get install vnc4server

Securing your VNC connection

The default VNC connection is unencrypted. In order to secure your passwords and data, you will need to tunnel the traffic through an SSH connection to a local port.

Mac OS X and Linux

  1. Connecting through an SSH tunnel.Launch the VNC server manually to test your connection. You will need to specify a password to use:

  2. Initiate your connection as per the steps listed in the following section.

Windows

  1. Open PuTTY and navigate under the SSH menu to Tunnels. Add a new forwarded port as shown below, replacing example.com with your Linode’s IP address or hostname:
  2. Return to the ‘Session’ screen. Enter your Linode’s hostname or IP address and a title for your session. Click save to save your settings for future use, and then click open to initiate your SSH tunnel.
  3. Launch the VNC server manually to test your connection. You will need to specify a password to use:

Mac OS X and Windows

  1. After installing and opening the viewer, connect to the localhost through your VNC client :
  2. You will be warned that the connection is unencrypted, however if you have followed the steps above for securing your VNC connection, your session will be securely tunneled to your Linode. To proceed, press Continue.
  3. VNC Security Warning.You will be prompted to enter the password you specified in Step 4 of.
  4. After connecting you will be greeted with a terminal emulator window.

In the next section we will configure your Linode to launch a full desktop.

Linux

  1. Open Remmina.
  2. Click the button to Create a new remote desktop profile. Name your profile, specify the VNC protocol, and enter localhost :1 in the server field. Be sure to include the:1 in the Server section. In the password section fill in the password you specified in Step 4 of:
  3. Press Connect.

Configuring VNC for a Full Desktop

In the next few steps we’ll configure VNC to launch the full Gnome desktop.

  1. Once you’ve successfully connected, exit the connection. Close the VNC server:
  2. In your preferred text editor, open the xstartup file in your home folder under the .vnc directory:

    ~/.vnc/xstartup

    1 2 3 4 5 6 7 8 9 10 11 12

    #!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & x-window-manager &

  3. Edit the last line of the file, replacing it with the following:

  4. Save and exit the file. Begin another VNC session:

    You should now see the full Ubuntu Desktop:

The VNC password prompt. VNC connection to a terminal emulator. The Remmina Software. .

Source: www.linode.com