All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to Install VNC w/ GNOME on Debian VPS
VNC is a remote desktop sharing system that will allow you to connect your home PC to a GUI (graphical interface) hosted on your VPS, for easy remote management. This guide will walk you through the steps required to setup and access a VNC server hosted on a Debian VPS.
Before beginning, ensure you are logged in to your VPS as the root user, and run the following:
# apt-get update
# apt-get upgrade
- Install GNOME:
# apt-get install gnome-desktop-environment
- Install required fonts:
# apt-get install xfonts-100dpi
# apt-get install xfonts-100dpi-transcoded
# apt-get install xfonts-75dpi
# apt-get install xfonts-75dpi-transcoded
# apt-get install xfonts-base
- Install TightVNCServer:
# apt-get install tightvncserver
- Start TightVNCServer for the first time, it will copy config files and prompt you for a password:
# tightvncserver :1
- Stop the VNC server, so we can continue to configure it:
# tightvncserver -kill :1
- Edit the xstartup file:
# vi ~/.vnc/xstartup
Press "A" to enter edit mode. Replace the contents of the file with the following (or edit to match):
# !/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &
Press ESC, type :wq, then press enter to save and close the file.
- Start the VNC server with your desired resolution:
# tightvncserver -geometry 1024x768 :1
You can now access your server's remote GNOME desktop with a desktop VNC client. Enter your server's main IP address, Port 1 (or 5901, alternately), and the password you set earlier to connect to the desktop.
Rewritten from the VPS6.NET Knowledgebase: https://vps6.net/my/knowledgebase/52/How-to-Install-VNC-wor-GNOME-on-Debian-or-Ubuntu-VPS.html
Comments
apt-get install gnome-core tightvncserver
Wow, I've been doing it so wrong...
Well, maybe @Zetta is being sarcastic? :P
Yes, gnome-core ftw
lxde-common
Thanks for the guide!
Those fonts aren't actually required. I never have a problem with any of my servers that use VNC on debian without those fonts installed.
@Zetta and @yomero -- Admittedly, gnome-core is probably the 'better' (more robust) package to install, but I included gnome-desktop-environment since we usually end up installing the extra packages for clients, anyway!
Well, for a high latency network like US-CN, I prefer the Windows Remote Desktop and NX over the laggy VNC. But RDP is only for Windows and it's painful to configure NX in Debian/Ubuntu. Still finding an alternative.
Why would it be painful to configure NX on Debian/Ubuntu? Just downloads the .deb files and dpkg -i them?
That never worked for me actually, I confirmed it's running and the port is open, but I couldn't get it work like what I did in CentOS.
just forward the x session ? ive never had a problem with that
where do you find that deb? project debs from freenx seemed dead to me
how do you do that then?
if your on Windows install xming
http://sourceforge.net/projects/xming/
on your VPS install xserver-xorg-core though the package manager
in Putty click SSH then x11 then enable x11 forwarding.
Now just start up the GUI app - eg firefox and you have a firefox window on the PC running putty thats being run on the server. Minimal resources needed
if your running linux then just use -X when logging in
I applaud the effort you made for this but I don't really understand the purpose.
Assuming the VPS is a lowendbox, and is used for web/mail hosting, where are the GUI tools for managing:
Now I'm a Linux GUI neophyte, but as far as I can tell those GUI tools don't exist. Or they exist in web-based format which doesn't require the overhead of a GUI on the server. Which makes me ask, what's the purpose of establishing a VNC connection to a GUI on my server?
@sleddog, You're right, there really wouldn't be a reason to setup VNC on a web/mail hosting server; perhaps I overlooked the most common uses of LEBs. There are many ways you could make use of a remote desktop on a small VE, though... app development, remote administration (for the less technically inclined), or running a Windows desktop client via Wine are uses I see frequently.
@vps6net: thanks for that. Honestly I wasn't being critical Guess I'm just focused on the hosting side of things.
I wish you all the best with your company.
@sleddog Thanks! But you're right, VNC doesn't have many hosting applications (aside from file hosting, perhaps). It's just fun!
It is indeed. I use VNC to connect from my Linux desktop to a headless WinXP box that manages my webcam (bloody propriety capture card drivers).
@vps6net I followed the setup process (created this to run multiple times for testing https://gist.github.com/4011035) but after installation ram usage is 100MB something, after a reboot its back to 7MB; whats wrong?
That was easy, thanks
true
Ehhhh!! ????
@Asim Vnc isnt running when you restarted the VPS.
Why not use XRDP? saves you the hassle of installing a VNC client on windows / mac, since you can connect via RDP. Also, GNOME is RAM hungry, why not xfce, razor-qt or lxde?
I always use this one: http://rbgeek.wordpress.com/2012/06/25/how-to-install-vnc-server-on-ubuntu-server-12-04/
@Raymil any guides you know of / can recommend showing XRDP with lxde or other light weight GUI's ?
@vps6net
Very nice and I appreciate your contribution to this forum.
I can use this tutorial to create a bash script for autoinstallation?
I prefer Xfce
sudo apt-get update sudo apt-get install xfce4 xfce4-goodies vnc4server xinetd vnc4server vnc4server -kill :1 rm ~/.vnc/xstartup wget -O ~/.vnc/xstartup http://ompldr.org/vZzVzZw sudo chmod 755 /etc/X11/xinit/xinitrc vnc4server
complete newb here trying to learn ubuntu after I installed the vnc server and login all I see is a blank screen with an X is that normal?
Run: vncserver - kill :1
Run: nano ~/.vnc/xstartup
Add without quotations: "gnome-session &"
Press: control+x, y, enter
Run: vncserver
Make sure you're not using Ubuntu 12.10 also. No Unity 2D.
Run: nano ~/.vnc/xstartup
Add without quotations: "gnome-session &"
Press: control+x, y, enter
Run: vncserver
Make sure you're not using Ubuntu 12.10 also. No Unity 2D.
nice it works I followed the steps above and wasnt familiar with vi nano was much better I guess the changes didnt take when I did it in vi. But now it says "Failed to load session "ubuntu". Did I miss something more? Thanks jarland.
nevermind fixed it instead of using "gnome-session &" use "gnome-session --session=gnome-classic &"
No problem. Let me know if you need any tips. I'm a big fan of Ubuntu over VNC on a VPS.
I'm doing this using xrdp and standard gnome desktop. It's exceptionally laggy... Is that the xrdp or the desktop?
try connecting with vnc... i have seen lag with xrdp