Hacker News new | past | comments | ask | show | jobs | submit login

Can someone explain to me how Xrdp is so much simpler to use than VNC? I setup a new CentOS workstation the other day and ended up trying to follow long tutorials with config files and services. I gave up, installed the Xrdp package and seconds later I had a remote session going.



I haven't fully traced how it works, but Xrdp is built on top of a vnc backend (you can see the vnc folder in the github directory structure), but it manages all of the configuration and negotiations automatically.

If you do a `ps -ef | grep vnc` while you're connected via Xrdp you should find the underlying vnc sessions. Something like:

Xvnc :32 -auth .Xauthority -geometry 1920x1080 -depth 24 -rfbauth....

It's been a bit mixed for us. As a sysadmin for non-technical users who need some linux access, it's wonderful because it's so much easier for them to connect. The stability has left quite a bit to be desired though - I have to nuke quite a few sessions and have them start from scratch.


>long tutorials with config files and services

On the server:

    x11vnc -display :0 -noxdamage -shared -repeat -forever
On the client:

    ssh -T server 'nc 127.0.0.1 5900'
    vncviewer 127.0.0.1:5900


    ssh -N -L5900:127.0.0.1:5900 user@server
is usually cleaner than using nc, it doesn't require running any commands on the remote system and lets you do any port changing that you need to make things work between each side.


Right, I had to use `nc` instead of forwarding the port from SSH itself because I use systemd socket activation for that ssh command, with

    ExecStart=ssh -T server 'nc 127.0.0.1 5900'
    StandardInput=socket
    StandardOutput=socket
in the service file and

    ListenStream=0.0.0.0:5900
in the socket file.

The socket has to be connected to stdin/stdout instead of using SSH forwarding since SSH doesn't support fd-based socket activation.


Yea that's definitely a bit more of an edge case. and for the downvoted sibling commentor, this is the same kind of setup that previously would be done with inetd or xinetd and the lack of security or monitoring or logging that that usually entails. I'd be surprised if there's not some other way to do it but this seems like a perfectly fine work around otherwise.


Why must systemd break everything?

It is like a vandal with a baseball bat.


x11vnc for the win. A really useful and somewhat underappreciated tool.


I've never had a problem setting up tightvnc or tigervnc. I've even run it to get an X session going on Android devices.

Xrdp has an advantage in that it allows Windows to talk to Linux servers with its own Terminal Services client stack.


I guess YMMV; I couldn't make it work. VNC on the other hand is terribly slow.

The only solution that worked for me, both configuration and performance wise, is sadly closed source - NX Server (which is excellent).


Xrdp also used to be difficult to setup on Linux, but (ironically) systemd + modern session management has made RDP on linux behave pretty well.

Also, if you look carefully at the default config mechanism, Xrdp does RDP to VNC translation internally, and runs Xvnc for each login.


> ...ironically...

Why is it ironic? I've been using systemd since before it was part of any distribution; it has been extremely convenient and helpful from the very start, and every year it gets even better (as new components mature enough to enable, e.g. systemd-timesyncd).


Ironically because the opinionated consistency Systemd's session + login management brought made Xrdp saner to operate, while changing traditional things like persistent process after log off (by default), and device-console/session attachment.


Same here - CentOS 8 + VNC, tried to setup myself for a couple of hours, then asked admin to help, ended up with Xrdp in 5 minutes.


what setup is there to do for VNC ? just run x11vnc and connect to your ip:5900... or directly X11 forwarding




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: