-1

I wanted to run an idea by the experts here. I have a VPS (Debian 7.7, 1GB RAM), which is purely a web server (hosts some important stuff), no desktop installed. But there are some graphical tools I find useful that would be nice to be able to use (via ssh -X from my Mac). I'm thinking how great it would be to use Sublime Text. :) Two part question:

  1. What is the most barebones way to install X11 on the server? (no extra fluff)
  2. How much of a resource hit would the server take? When I run Sublime, I just see a 20MB increase in RAM use, that's about it. Actually, as I scroll around and make selections, one of my 4 CPU cores gets rather busy (up to 50-80%). That's expected, I guess. Other GUI apps such as meld take about 20MB RAM and are very low on CPU use.

I'm open to hearing some perspectives on this idea. Anything from "sure, people do this all the time" or "this is the dumbest idea ever."

9
  • 1
    Why would you even consider running ST from your server? That's a development tool, and should be run on your workstation. With regards to other apps, the only X11 apps I've seen that are worthwhile running on a server is Veritas (now Symantec) Netbackup. Really, everything should be done on the CLI or by your configuration management tool.
    – EEAA
    Oct 27, 2014 at 21:00
  • I edit a ton of config files on the server, and while vim gets the job done, sometimes it would be nice to have something I can navigate through a lot more quickly. Actually, I just found out that if I do :set mouse=a in vim, I can use my mouse scroll wheel and drag to select text, which is helpful. Oct 27, 2014 at 21:03
  • 2
    Use SSHFS or something and mount the VPS filesystem over SSH, edit locally.
    – Zoredache
    Oct 27, 2014 at 21:07
  • This is more of a development question - should probably be on SO, not here. Oct 27, 2014 at 21:18
  • 1
    @AveryPayne Not at all. It's a question about server resource consumption. I'm not asking any questions about actual programming. Oct 27, 2014 at 21:43

2 Answers 2

0

I would recommend against this as X11's LAN-oriented traffic will make it painful. You can easily run X11 applications on the remote end. However, unless you have extremely high bandwidth between both locations, you will have laggy response times. X11 is a synchronous protocol and every little event generates a stream of traffic. It is one of the driving reasons that there have been replacement protocols to deal with this, i.e. NX (NoMachine) or VNC.

A place where using X11 would make sense is on a local LAN, using a shared box for everyone to do development on. In this context, the security of the box is assured (or at least monitored), the latency is extremely low, and you are re-using resources efficiently. Having 2-3 people connect to a dev box and running jobs and editing and compiling and etc. on the box in this context is just fine. Not GREAT, but fine.

You will NEED to enable compression on your SSH connection to make this viable. You do NOT need to install the xorg video drivers. Installation through apt-get will most likely pull the minimum libraries required to make this work. So don't bother installing x.org stuff or anything else; just pull the tool that you need and if the package maintainer did their job, it will pull the rest.


A Note:

With regard to how you use it, I reserve judgement. I see people hating the question not so much because it's taboo (yes, it is) but because they are giving knee-jerk reactions. Example: running a server-based tool like gsmartmoncontrol, which is directly aimed at montoring drive health, is a strange but valid example. The tool is strictly meant for the server and only augments your command line experience (in this context, I'm thinking of a traditional file server). Running development tools on a production box is probably not the greatest idea. Hint: if you have a break-in event, you just gave your attackers plenty of tools to play with.

0

X11 tends to work poorly when there is any latency. Your connection to your VPS is almost certainly going to have more latency than what is going to be acceptable.

In any case you don't need to install must for X11 forwarding. On a Debian system just install the xauth, and xbase-clients packages.

In any case I strongly advise against running apps on your production servers that is a recipe for failure. Just don't do it. If you want to setup a VM dev VM that wouldn't to bad, but as I mentioned I suspect it won't perform nearly as well as I think you are hoping it will.

Not the answer you're looking for? Browse other questions tagged .