Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
vps:x-server-vnc [2011-05-14 00:03:22] garrett.plasky Approved |
vps:x-server-vnc [2015-10-06 16:55:12] rory.blanchard |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== How To Install X Server on a VPS (with VNC access) ===== | + | ====== How To Install X Server on a VPS (with VNC access) |
This guide is intended to provide those users who desire it instructions on how to install a graphical user environment on their VPS. Because the usual method of access your VPS (SSH) does not support a graphical environment, | This guide is intended to provide those users who desire it instructions on how to install a graphical user environment on their VPS. Because the usual method of access your VPS (SSH) does not support a graphical environment, | ||
Before we begin, we would like to caution users that a graphical user environment such as the X server (X windows) consumes significantly more resources than a typical SSH-based access system, and as such is not recommended for use in an environment where resources are scarce. We also do not recommend running a GUI on a server with any less than 512MB of memory. | Before we begin, we would like to caution users that a graphical user environment such as the X server (X windows) consumes significantly more resources than a typical SSH-based access system, and as such is not recommended for use in an environment where resources are scarce. We also do not recommend running a GUI on a server with any less than 512MB of memory. | ||
- | ==== Installing the Components ==== | ||
- | Our VPS images are intended to be very minimal to allow the most user customization, | + | ===== Installing |
- | <sxh bash>yum groupinstall "X Window System" | + | Our VPS images are intended to be very minimal to allow the most user customization, |
+ | |||
+ | Use **SSH** to log in to your server and run the following: | ||
+ | |||
+ | For CentOS: | ||
+ | |||
+ | <code>yum groupinstall "X Window System" | ||
For Ubuntu (as root): | For Ubuntu (as root): | ||
- | <sxh bash>apt-get install ubuntu-desktop gdm vnc4server</ | + | <code>apt-get install ubuntu-desktop gdm vnc4server</ |
For Debian (as root): | For Debian (as root): | ||
- | <sxh bash>apt-get install xorg gdm gnome vnc4server</ | + | <code>apt-get install xorg gdm gnome vnc4server</ |
You will also need a VNC viewer for your PC. If you are on Microsoft Windows, you can try one of the free VNC viewers such as [[http:// | You will also need a VNC viewer for your PC. If you are on Microsoft Windows, you can try one of the free VNC viewers such as [[http:// | ||
- | ==== Running VNC Server ==== | + | ===== Running VNC Server |
Out of the box, the X server should come configured properly. We will however need to configure the VNC server to start automatically as well as start a new X server session when it is started as well. | Out of the box, the X server should come configured properly. We will however need to configure the VNC server to start automatically as well as start a new X server session when it is started as well. | ||
Line 26: | Line 31: | ||
First, we'll make sure VNC is working OK: | First, we'll make sure VNC is working OK: | ||
- | <sxh bash> | + | <code> |
This will start the VNC server for the first time, create some configuration files, and start the VNC server listening on port 5091 (make sure to open this port in your firewall if necessary). You can now use your VNC viewer to connect to your server to make sure it is working properly. You can use the syntax // | This will start the VNC server for the first time, create some configuration files, and start the VNC server listening on port 5091 (make sure to open this port in your firewall if necessary). You can now use your VNC viewer to connect to your server to make sure it is working properly. You can use the syntax // | ||
- | ==== Running X Server ==== | + | ===== Running X Server |
Once you have logged in for the first time, you will notice VNC only launches an xterm window with a very basic interface by default. We want to change its configuration to start a Gnome graphical environment when launched so we have a nice GUI to work with. | Once you have logged in for the first time, you will notice VNC only launches an xterm window with a very basic interface by default. We want to change its configuration to start a Gnome graphical environment when launched so we have a nice GUI to work with. | ||
Line 36: | Line 41: | ||
What we need to do is first stop the running VNC server: | What we need to do is first stop the running VNC server: | ||
- | <sxh bash> | + | <code> |
Next we need to edit < | Next we need to edit < | ||
- | <sxh bash># | + | <code># |
# Uncomment the following two lines for normal desktop: | # Uncomment the following two lines for normal desktop: | ||
Line 53: | Line 58: | ||
unset SESSION_MANAGER | unset SESSION_MANAGER | ||
- | gnome-session &</sxh> | + | gnome-session &</code> |
If this file doesn' | If this file doesn' | ||
Line 59: | Line 64: | ||
Once done, we can restart our VNC server: | Once done, we can restart our VNC server: | ||
- | <sxh bash> | + | <code> |
Now you can log in as you did before, however this time you will be presented with a Gnome Desktop environment! | Now you can log in as you did before, however this time you will be presented with a Gnome Desktop environment! | ||
Line 65: | Line 70: | ||
{{ : | {{ : | ||
- | ==== Starting on Boot ==== | + | ===== Starting on Boot ===== |
If you would like your VNC server to start with the system boot, we will need to modify the init startup scripts. For CentOS: | If you would like your VNC server to start with the system boot, we will need to modify the init startup scripts. For CentOS: | ||
- | <sxh bash> | + | <code> |
For Debian/ | For Debian/ | ||
- | <sxh bash> | + | <code> |
- | ==== Securing VNC ==== | + | ===== Securing VNC ===== |
By default, VNC only encrypts the initial password communication then results to unencrypted transmission of the data stream. This can lead to problems if someone is able to sniff your network traffic, as could be the case communicating over the 'net with your VPS. To secure VNC, we will use an SSH tunnel to encrypt the VNC traffic: | By default, VNC only encrypts the initial password communication then results to unencrypted transmission of the data stream. This can lead to problems if someone is able to sniff your network traffic, as could be the case communicating over the 'net with your VPS. To secure VNC, we will use an SSH tunnel to encrypt the VNC traffic: |