TightVNC on Debian linux
- February 7th, 2009
- Posted in Linux . Server
- By Jason Zerbe
- Write comment
Introduction
I have been wanting to run a Halo Custom Edition dedicated server on one of my OpenVZ nodes for quite some time, so this afternoon I finally started on a fun little bit of research. Running Halo (full featured edition or dedicated server) on Linux requires Wine, which if run headless over a network requires VNC. Virtual Network Computing (VNC) is a graphical desktop sharing system which uses the RFB protocol to remotely control another [wikipedia]. Unfortunately as I found out later, the Halo dedicated servers require some OpenGL stuffs (specifically an extension by the name of “GLX”). In an upcoming post I guess I’ll try again and get an install that will be able to run the Halo client/dedicated server on linux. Ah well, in any case I’ve now got a X-Window system set up. Now all that I will have to do is install KDE or Gnome. Although maybe next time I’ll go with xorg-server instead; from what I have read it has a much easier setup procedure and integrates various OpenGL drivers.
The following assumes that:
- you have a functioning Debian or Ubuntu – like system
- you are logged in as root or are capable or running “sudo” commands. add in “sudo” where necessary, typically on the apt-get commands.
Installation
Now that the basics are out of the way, it is time to install some dependencies for vnc.
apt-get install xutils xbase-clients xfonts-base xfonts-75dpi xfonts-100dpi xterm
What just happened: X11, required X11 fonts, and the X-Window terminal emulator just got installed. All that is left to do is install your vnc server of choice (I personally prefer TightVNC): apt-get install tightvncserver
Cool so everything should be ready to start-up properly. So start tightvncserver for the first time: tightvncserver :1 -geometry 1024x768 -depth 16. If all goes according to plan it should ask you to enter a password, this will be your login password via vnc for the account you are currently logged in through (root). You can always modify the screen resolution and depth commands to match whatever resolution and pixel depth you please. Login via a vnc client (I suggest TightVNC viewer), to check if you can login, then close the session and kill the vnc server: tightvncserver -kill :1. We have some customizations to do yet.
If you execute “cat .vnc/xstartup” in your terminal session, you should probably get something like the following outputted to your terminal session.
#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 160×50+10+10 -ls -title “$VNCDESKTOP Desktop” &
x-window-manager &
This is the current start up script for your vnc server. Be sure to have the line starting with “x-terminal-emulator” in your start up script, because we will be needing terminal access via vnc to mess around with the Halo dedicated server. If you want to have your terminal window larger, modify that line accordingly (160×50+10+10 is plenty for me).
Now start the (tight)vncserver again and get into your cool graphical terminal session screen. For more information on VNC commands check out this article about vnc servers on the TWiki.
Conclusion
This setup is a great starting point. VNC and X-Window sessions are ready to go, and even will auto-restart after a power cycle. Unfortunately my goal of having a Halo dedicated server running on this setup, did not come to fruition. It requires some other dependencies and/or a completely different X-Window setup.
Jason,
I Read your artical. http://www.lizardking.biz/2009/02/tightvnc-on-debian-linux/
I was wondering if you have further guidance or the time to answer a few questions. I am currently running some halo servers. I am doing this locally on my own PCs. While this is great, I dont want to use MY bandwidth. I would much prefer to use the bandwidth of the company that I have my website through. I have a package for unlimited everything. I have made several attempts to get my Halo Dedicated servers to run server side but have constantly met with negative results.
Would you be willing to assist in this matter? There is no profit involved as the servers which I put up are not generating any monies. I already fork out enough as it is. If you are still interested please return an email one way or the other and let me know your answer.
Thank you for your article and time.
Ryan
I thought I would include some of my correspondence with Ryan, for those of you wishing to run the Halo dedicated server in a headless server environment.
“Hey just thought I’d let you know officially what became of my research. I played around trying to get wine working, but the video drivers that I tried don’t render OpenGL stuffs over VNC too well. Odd that OpenGL is needed for a command line program, but it’s true. So I gave up on that.
Instead I installed vmware (you are going to need a dedicated server) [http://www.lizardking.biz/2009/03/vmware-on-debian-5/] and then created a windows xp home vmware node. That setup worked great and was relatively easy to setup as well.”
The conclusion:
1) the Halo Dedicated server cannot be run in an OpenVZ node, but runs well in a Windows VMware node.
2) Halo Dedicated server requires OpenGL bindings that do not work over text-based SSH. “GLX” extension requires low-level kernel/dev access that an OpenVZ node does not have.