Remote into Linux

,

I am looking to remote into my linux machine (Mint), more specifically the gui. Ethernet or VPN to the machine is already established. I use the wake on lan function to boot the machine up and the next step is to login. The machine I’m connecting from is running Windows 10.

So far I have tried xrdp which does the job sort of but lacking a major feature - logging in, to my understanding the user has to be already logged in for the connection te be established. I don’t want to have autologin enabled on the server machine.

By looking on forum for solutions I came across vnc solutions but never gotten to really testing any because each time I install and run one they seem to take over the .Xauthority file and I end up with and login loop after restarting.

Last resort would be to build a PI KVM.

Any ideas?

First; Why mint? Stock Ubuntu on Wayland would probably be a much easier and forward-compatible option. Unfortunately Mint is almost as hell-bent as Nvidia on not supporting Wayland anytime soon, which means they will, at this point, be left in the dust and forced to start from scratch with Cinnamon.

Second; very rarely do you need to remote desktop on Linux. If you do, PuTTy allows you to SSH and display any X program on Windows, which is a far more elegant solution than VNC. This ability will disappear with Wayland however. If it is just a single app you want to run, I recommend going this route instead.

1 Like

Mint because is seemed as the best option for my transition from Windows. The more I look around I come to like the KDE platform the best so maybe will be switching to Kubuntu in the future.

What I need and what I would like are probably different things as with most cases. Ideally I would like the whole GUI but displaying a single program could be a start as well - in my case the web browser. Guess I have to google as to how to achieve this over ssh

Let’s start with the basics:
if you do not need the maximum performance, then SSH is the key. You do not need X server to use GUI. The application forwards what to show to an X server and that server does not have to be the same machine. You don’t even need KDE, which is there to help you manage multiple applications into what windows users call a desktop. Setup SSH, secure it with keys and server is ready.

For X over IP you have 2 options: Run the X locally (What would be recommended for a general purpose server) and run the X remotely (What you are trying to do.).

Spice or VNC is the best for low-latency and requires either SSH tunnel or de-militarized zone (DMZ) to be secure

I am going to describe the process for remote as the others are not something to recommend unless you plan to use the X as shared workspace.

  1. Make sure the applications you want to run are installed on the server.
  2. When using Windows 10 or newer I recommend using the Windows Subsystem for Linux instead of PuTTy, but both are possible.
  3. Set-up RSA keys on your Windows 10 machine.
  4. Use ‘ssh-copy-id’ to copy the public key to your server.
  5. Try connecting using only the key you have made.
  6. Disable password authentication for SSH.
  7. Use ssh user@server browsername or ssh -C user@server browsername for slower connections.

Now either you can run X applications from your remote terminal or even directly.

There are other options to consider, but you are the one that will have to drive them. Tell us what you are doing and where it is failing.

3 Likes

You don’t have to pass -X to enable x over ssh?

1 Like

I am using NoMachine.
Quite configurable, runs fast, and accessible from Linux, Windows, OSX, iOS, Android.

Not always, but yeah you can explicitly enable it in command line.

X-forwarding is decades old. I used ssh connections with -X since I was a teenager. Especially useful if you don’t want a seperate window with the whole desktop, but only selected GUI applications. And works with pretty much any Unixoid system since the 80s.

Very nice, only issue, after I reboot I cannot connect until the local user has logged in.

You should be able to get xrdp to be enabled on boot. Did you enable the service?

Sorry, I was talking about NoMachine, seemed like the most easy way to try first, service starts when I login

You should be able to connect without a local user logs in first. Check the server settings.

Have you tried x2go? you install the server, get the client

upon connecting, you create a configuration selecting the desired DE and it should be ready to share.

It seems to be a know issue

https://knowledgebase.nomachine.com/AR04R01083

not yet, will get to that tonight

xfreerdp should work.
theres also rdesktop

both can be installed with apt-get.

It is over a year old issue, that happens only with Wayland. X11 works out of the box.
But yes, if you are using Wayland, you may have to apply the workaround.
However the benefits of login from almost any device, surpassing any work to be done, at least for me.

will have a closer look, I am still more attracted to an option which provides me the full GUI

since I am somewhat of a noob I cant get further then installing the thing

Soooo in the end I did come to a solution and believe it or not its NoMachine.

As it turns out the first time I was connecting to the server from client NoMachine found the server on its own, automatically discovering it. That session never worked before I logged in.

When I added the server manually I can connect to the server as soon the PC boots, exactly what I was looking for.

Thanks to everyone contributing to the solution :slight_smile: :beers: