3

I have two machines:

1 - $Clients:

dual-boot of

  • Linux Mint 18.2 Cinnamon 64-bit
  • Windows 10 Pro 64-bit

on a laptop.

2 - $Server:

  • GNU/Linux Debian 9 Cinnamon 64-bit

I would like to connect from $Clients to the $Server via Remote desktop to view the main desktop.

Rationale: I opt for RDP protocol because it is integrated both in Windows and Linux (rdesktop).

But hey: It could be VNC for what it matters, I just need to replace the slow TeamViewer with a local connection to server's desktop.

Note: The server is usually running headless, but now I need to do several time-consuming things in the Desktop environment.

I personally used both VNC and RDP when I used Windows, so I have experience with them, but what all do I have to do for this to work on Linux is so far a mystery to me. I googled many guides, but they all differ more or less. And that's where you step in, I hope for a coherent answer to guide me with all aspects.

  • 1
    Non an answer to your question, but you don't need RDP. It's easier (and to some point safer) to use SSH with X11 forwarding. You need an X server on Windows to open remote windows on $Server over SSH. – Satō Katsura Oct 30 '17 at 8:39
  • Were you using compression with X forwarding? That can speed up things considerably. See xmodulo.com/how-to-speed-up-x11-forwarding-in-ssh.html for details – sapensadler Nov 1 '17 at 11:33
3
+100

SSH into debian from linux-mint

Update

There are some problem to connect through VNC to a remote host with cinnamon desktop using the regular way. The problem can be solved by installing x11vnc on the server and using vncviewer to connect.

Install and configure x11vnc:

apt install x11vnc

To configure the password for remote access :

x11vnc -storepasswd

By default the password will be stored under ~/.vnc/passwd

To force connecting using the password run :

x11vnc -rfbauth ~/.vnc/passwd 

To connect without password run x11vnc.

sample output:

The VNC desktop is:      cinnamon:1
PORT=5901

To connect use the following command:

vncviewer ip.address:1

On debian

Install tightvncserver :

apt-get install tightvncserver

Then run :

vncserver

to set up your password.

Adjust your parametres :

vncserver :1 -geometry 1024x600 -depth 16 -pixelformat rgb565

On linux mint:

install xtightvncviewer :

apt install xtightvncviewer

Connect:

vncviewer IP-SERVER:5901

To exit run:

vncserver -kill :1
1

rdesktop is a client for Remote Desktop Protocol (RDP) thus it is used to view remote Microsoft desktops so it won't be suitable for viewing your $server desktop.

X11 was designed for sharing displays from a server to various clients - either locally or remotely. For security reasons X11 forwarding is, or should be, disabled.

So from the Linux client you can just ssh in using the -X or -Y command line arguements and then just run the window application, eg:

ssh -X -Y $SERVER
echo $DISPLAY

the echo $DISPLAY should return something like myserver:10.0 so you can then just run which ever program you want on the server and it will display on your client.

If you see an error like:

X11 forwarding request failed on channel 0

Then you will need to edit your sshd_config file on your server, and allow X11Forwarding and then restart sshd.

However, this won't work out of the box on Windows unless you install Cygwin which is why people often use VNC, as their are Windows native VNCviewers.

I have always found the Arch Linux Wiki a good place for guiding you through setting up VNC - although this guide uses TigerVNC (this available as a debian package) you can use x11vnc, or tightvnc instead of tigervnc.

The reason it might seems so confusing is that Unix was designed as a multiuser system - thus it was always assumed that each user would have their own desktop and thus the idea of a single desktop for the machine doesn't make sense - you can run a different X server and display manager for each user on the system.

hth

  • @Vlastimil does ssh -X USER@SERVER gnome-calculator work after xforwarding? – GAD3R Nov 1 '17 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.