Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How Do You Run a Desktop Linux from a VPS Remotely?
New on LowEndTalk? Please Register and read our Community Rules.

How Do You Run a Desktop Linux from a VPS Remotely?

emgemg Member

There was a recent thread about what people do with idle VPSs. It occurred to me to setup a VPS as a headless desktop computer and bring back the display over the internet. Possibly slow, but we'll see.

**Do you have a headless Linux desktop computer on a VPS or other network or internet server? **
-> How do you have it configured?
-> What works for you?
-> What doesn't work?
-> What advice can you share with others who want to try it?

«13

Comments

  • cpsdcpsd Member

    I use x2go.

    Thanked by 2default bdl
  • I have used "NoMachine" in the past, and it has been pretty snappy, can even watch videos without much (or any) lag (all depends on latency between you and the host obviously).

    Thanked by 1emg
  • i just run xrdp, but it is sometimes slow(might be my ping)

    Thanked by 3crilla emg Pwner
  • emgemg Member
    edited November 3

    Sharing my limited experience so far, still working on it:

    • I haven't configured Unix/Linux / VNC / X-Windows over a network or internet in at least 15-20 years. This is a "newbie do-over".
    • I am familiar with Windows and Apple's implementations of their "remote desktops." Those implementations are different than a headless Linux desktop. Honestly, they do not apply here.

    Accomplishments so far:

    • I setup a testbed virtual network and a new Debian 11 server in a virtual machine on that network. It is configured just like a VPS on the internet.
    • I used DigitalOcean's tutorial for configuration VNC over SSH under Debian 11 as a guideline for my own setup and configuration. A web search for "digital ocean vnc ssh [yourlinuxdistro]" will show you many OS-specific tutorials with similar information - many clones with minor tweaks. (Adding later: I found other tutorials and sources as well. They varied in clarity, quality, but were helpful to see other perspectives and approaches. Don't limit yourself to DigitalOcean tutorials alone.
    • I use the built-in macOS "Screen Sharing" application for the VNC display. It works, but there are issues, see below.
    • I got VNC running over SSH with all my preferred SSH settings (e.g., different port, public key, etc.).

    Historical Observation:

    • People have given up trying to settle on VNC terminology. A long time ago, there was one very confusing standard: The headless VPS was called the "VNC Client" and the remote display on your desk was the "VNC Server". In their weird way of thinking, the display on your desk is "serving" the headless VPS by showing what the VPS asks to be displayed for you to see. For the people who worked with it, the terminology standard felt wrong and should have started out the other way. It was "bass-ackwards".
    • These days, there is no standard. You must divine from context what "client", "server", "display", and other ambiguous terms mean.
    • Most of the time, I see sensible (but officially backwards) usage where "server" means the headless Linux VPS, and "client" means your display. It makes perfect sense, and I bet that the VNC designers regret their early terminology decisions today.

    ISSUES to solve, a work in progress:

    • There is no login prompt. The VNC-displayed desktop runs all the time. If you log out, the display closes, then reopens, ready to run. I can open files, etc. (True, SSH "guards" it, but I would rather see a login prompt.)
    • You cannot switch users in the desktop. I had created an unprivileged user strictly for remote connections. I wanted to switch users to the proper working account for normal desktop work, or switch users to an "admin" account when "sudo" or "root" privileges are needed. I can open a Terminal window and use "su" from within the unprivileged account, but I cannot switch desktops between user accounts. Likewise, the "Reboot" and "Shutdown" menu items are grayed out.
    • Some desktop stuff is broken and I am fixing it as I go. In my installation, there was no browser installed. If you click on the browser icon, you see a dialog box referring to input/output error. I opened a terminal and used "apt" to install Firefox (esr), and then it worked. You get the idea.
    • Performance is very good, but it all runs on one local computer. I have not yet tried it on a true VPS with real-world latency. I want to solve the basic configuration issues first.
  • How: install XFCE/LXDE/KDE/... and install VNC server. Run VNC server at 127.0.0.1:5901 and use SSH port forwarding to get the traffic encrypted.

    Advice: be ready for crappy performance

    Does it work? Yes it works but it's virtually impossible to use the browser smoothly in a 100ms connection. Maybe other protocols will work better though.

    Thanked by 1emg
  • emgemg Member

    @Kousaka said:
    How: install XFCE/LXDE/KDE/... and install VNC server. Run VNC server at 127.0.0.1:5901 and use SSH port forwarding to get the traffic encrypted.

    Advice: be ready for crappy performance

    Does it work? Yes it works but it's virtually impossible to use the browser smoothly in a 100ms connection. Maybe other protocols will work better though.

    That's what I am doing, at least so far. See my detailed notes, above.

    P.S. Thanks to everyone for their quick and helpful responses so far. I am looking at the alternatives that you are using, too.

    Thanked by 1Arkas
  • Imma test Teamviewer and let you know of performance!

    Thanked by 2Arkas emg
  • AnyDesk works great

    Thanked by 2Arkas emg
  • emreemre Member
    edited November 3

    1- install a desktop on your vps, preferably a lightweight one. Xubuntu will work.
    If provider does not offer full desktop images. for example install ubuntu lts minimal then install desktop with $ sudo apt install xubuntu-desktop

    2- install a service that allows remoting to that vps, there are some services you can choose.

    a- vnc - a legacy and slow solution
    b- xrdp - working over vnc or like legacy and slow
    c- x2go pretty easy to install but somewhat poor performance to use as an exact replacement of desktop but works wonders if you only check this remote vps as your remote thunderbird appliance for example.
    d- https://www.cendio.com/ thinlinc. I tested this for some time and works wonders. youtube etc desktop browsing etc even works but needs a full pipe at least 100 mbits download speed from your vps.
    e- if you can afford a proxmox server- install your own vps's and use built in spice client. very fast and very secure. works easily with nat and anything because you are basically proxying everything form you host node.
    at the end nothing is perfect. even nospice have it's limitations using a vps as a full daily desktop.

    on windows side basic rdp is veyr much perfect for everything and you have tons of other options.
    but this is what it is,

    there are also some other stuff like nomachine etc but i will not add these other stuff to my list because these are the easiest them all..

    so in conclusion:

    use nospice and virtviewer or if you dont care about foss use thinlinc if you have a fast pipe between you and your vps.

  • mrs92mrs92 Member

    x11vnc on backend and vncviewer on client. Sometimes I use chrome remote desktop but too much delay.

  • FalzoFalzo Member

    lxde+xrdp , use with normal rdp client.

    Thanked by 2emg Pwner
  • Step 1: find a VPS that has single digit latency. Rest of it doesn’t really matter as there are many options.

    Thanked by 2emg cheapdave
  • this is exactly how i do it too. Picked a VPS thats in my area less that ~50 miles away. No issues.

    Thanked by 1emg
  • I have used xrdp on different VPS and it was slow. Plus if I just disconnect without logging off then I cannot login next time unless VPS is restarted. Found some solutions on different forums and sites for this problem but none of them worked.

    Thanked by 1emg
  • AXYZEAXYZE Member

    I've used xrdp multiple times and it was unusable. Very laggy.

    Installed NoMachine and didnt looked back. Very snappy. Try it out and be ready to be blown away by difference. Also clipboard copy, drag n drop file transfers work flawlessly

    Thanked by 1emg
  • I run xrdp with guacamole

    Love having a full desktop on any web browser from work.

    Thanked by 3crilla emg dahartigan
  • wilbowilbo Member

    NoMachine FTW!!

    Thanked by 1emg
  • NoMachine is the best no lag

    Thanked by 1emg
  • emgemg Member
    edited November 3

    I have been busy all day, but following the posts in this thread. There are lots of new ideas to try here - thanks and keep them coming.

    -> I want to add that in general, I would prefer self-managed, self-contained solutions rather than relying on third-party servers, management, or coordination services.

    Example: TeamViewer is popular, but you must have an account, and it relies on their servers for management.

  • I use xpra for everything. https://github.com/Xpra-org/xpra

    It can efficiently forward a whole desktop to your xpra client through ssh or within a web browser, but you can also run single programs without the overhead of installing and running a whole desktop.

    For example this initiates a :100 screen and starts a firefox in it

    server$ xpra start :100  
    server$ DISPLAY=:100 firefox &
    

    and xpra attaches to it through ssh

    client$ xpra attach ssh/my.server.com:22/100
    

    Then you will see the firefox on your desktop like being any another local window, although it runs on the server

    If you kill the xpra connection, the firefox will stay running.

  • rm_rm_ Member

    @emg said: People have given up trying to settle on VNC terminology. A long time ago, there was one very confusing standard: The headless VPS was called the "VNC Client" and the remote display on your desk was the "VNC Server". In their weird way of thinking, the display on your desk is "serving" the headless VPS by showing what the VPS asks to be displayed for you to see. For the people who worked with it, the terminology standard felt wrong and should have started out the other way. It was "bass-ackwards".

    That was never the case with VNC. You're mixing it up with X. In there, yes, the local display is the X server, and the actual applications, some of which may be running remotely, are X clients.

    Thanked by 3emg angstrom bakageta
  • @NobodyInteresting said:
    I have used "NoMachine" in the past, and it has been pretty snappy, can even watch videos without much (or any) lag (all depends on latency between you and the host obviously).

    I second this

  • @TerokNor said:
    I use xpra for everything. https://github.com/Xpra-org/xpra

    Is xpra html5 client fully usable on Android smartphone browsers?

    I used it years ago, back then it was nice on desktops but terrible on Android. Maybe times has changed...

    Thanked by 1emg
  • nomachine vs x2go, any experience which one better?
    xrdp was too slow for me

    Thanked by 1emg
  • emgemg Member

    @rm_ said:

    That was never the case with VNC. You're mixing it up with X. In there, yes, the local display is the X server, and the actual applications, some of which may be running remotely, are X clients.

    You are right. Thanks for the correction.

  • mzltestmzltest Member
    edited November 4

    xrdp+pulseaudio+guacamole (for browser access).Slow but it works and most importantly it has sound as RDP protocol has native sound support,VNC have to use an alternative channel.

    https://github.com/m1k1o/neko may be a choice if you simply want cloud browser for entertainment purposes,I think they have other choices like shared desktop but I haven't tried those.

    Thanked by 2kaz050457 emg
  • tuctuc Member

    I had tried all x2go, vnc (novnc, tigervnc); but now using xrdp with either xorg or xvnc for remote Linux, and mstsc for client (Windows). xrdp built from source with advanced features for audio and video compression works pretty well, making possible mic and cam to remote. Through xrdp server, I can also use mstsc to work with VMs using vnc connection provided by VMs' providers. Will try !machine sometime :)

    Thanked by 1emg
  • emgemg Member

    I started on this well-written blog entry, but got stuck at the step with the command "apt-get install vnc4server". The error message in my Debian 11 installation reads, "Package vnc4server is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source".

    I searched on the web, and there is surprisingly little info about "vnc4server". One person ran into the same issue. Their suggestion was to add an old Ubuntu package source to the sources.list. That seems like a poor choice.

    In the web searches, I found references to other available VNC server packages. It would help me to understand the differences, how to choose between them, and how to modify @raindog308's tutorial to match an alternate VNC server.

    -> Hints or suggestions, anyone?

  • tuctuc Member

    @emg said:

    I started on this well-written blog entry, but got stuck at the step with the command "apt-get install vnc4server". The error message in my Debian 11 installation reads, "Package vnc4server is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source".

    I searched on the web, and there is surprisingly little info about "vnc4server". One person ran into the same issue. Their suggestion was to add an old Ubuntu package source to the sources.list. That seems like a poor choice.

    In the web searches, I found references to other available VNC server packages. It would help me to understand the differences, how to choose between them, and how to modify @raindog308's tutorial to match an alternate VNC server.

    -> Hints or suggestions, anyone?

    please try: apt-get install tigervnc-standalone-server tigervnc-common

    Thanked by 1emg
Sign In or Register to comment.