Install Gnome basic desktop.
Reboot
To keep the desktop and login window from opening in Ubuntu everytime it starts we want to mask out the few lines which start the service.
The first few lines of the script should look like this once you've edited it:
esc :wq to save the changes or :q! to start over. Now the desktop and login won't start in Ubuntu.
NOTE: This only installs a basic desktop, if you want to be able to use programs from your virtual desktop, network manager, media players, office, etc, they will need to be installed after vnc server is installed.
Reboot
We need to install VNC server to be able to interact with the gnome components for the desktop.
When prompted type Y and press Enter. This will install VNC Server which is required for running a virtual desktop on another machine.
Next type:
You'll then be prompted to create and verify a new password.
We now need to kill the session we just created and make change the startup script for VNCServer to make it work properly.
So, type the following command to kill the session:
Now type the following command to open up the file we need to edit:
Change it to look like this:
When you're done editing the file press the Esc key once and type :wq
This should save the changes and bring you back to the command line. If you make a mistake editing the file then issue :q! instead of :wq to abort your changes.
Next type the following command to create the VNC Session once more:
Now you can access the ubuntu box using:
ubuntubox.example.com:1
Cheers
sudo apt-get install gnome-core
when prompted type Y and then press Enter. This will install the gnome desktop components.
Reboot
sudo reboot now -h
To keep the desktop and login window from opening in Ubuntu everytime it starts we want to mask out the few lines which start the service.
sudo vim /etc/init/gdm.conf
The first few lines of the script should look like this once you've edited it:
# gdm - GNOME Display Manager
#
# The display manager service manages the X servers running on the
# system, providing login and auto-login services
description "GNOME Display Manager"
author "William Jon McCann <mccann@jhu.edu>"
#start on ((filesystem
# and runlevel [!06]
# and started dbus
# and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
# or stopped udev-fallback-graphics))
# or runlevel PREVLEVEL=S)
stop on runlevel [016]
emits login-session-start
esc :wq to save the changes or :q! to start over. Now the desktop and login won't start in Ubuntu.
NOTE: This only installs a basic desktop, if you want to be able to use programs from your virtual desktop, network manager, media players, office, etc, they will need to be installed after vnc server is installed.
Reboot
sudo reboot now -h
We need to install VNC server to be able to interact with the gnome components for the desktop.
sudo apt-get install vnc4server
When prompted type Y and press Enter. This will install VNC Server which is required for running a virtual desktop on another machine.
Next type:
vncserver
You'll then be prompted to create and verify a new password.
We now need to kill the session we just created and make change the startup script for VNCServer to make it work properly.
So, type the following command to kill the session:
vncserver -kill :1
Now type the following command to open up the file we need to edit:
sudo vim .vnc/xstartup
Change it to look like this:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
gnome-session --session=gnome-classic &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
When you're done editing the file press the Esc key once and type :wq
This should save the changes and bring you back to the command line. If you make a mistake editing the file then issue :q! instead of :wq to abort your changes.
Next type the following command to create the VNC Session once more:
vncserver -geometry 1366x750
Now you can access the ubuntu box using:
ubuntubox.example.com:1
Cheers