It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
Howdy, Stranger!
It looks like you've been lurking for a while.
If you register, we also will remember what you have read and notify you about new comments. You will also be able to participate in discussions.
So if you'd like to get involved, register for an account, it'll only take you a minute!
apt-get update
apt-get upgrade2. Install the required packages for the VNC connection (choose one):
apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminalIf you want to install only the essential packages:
apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal3. Essential step is to stop and then disable the NetworkManager service. With this service active the server would not be accessible:
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service4. Install vncserver packets:
apt-get install vnc4server5. After the vncserver packets are installed, start the vncserver service. After initiation, the console will require you to provide a password for VNC connection and repeat it (up to 8 characters):
vncserver :1You will receive the following message:
xauth: file /root/.Xauthority does not exist
New 'localhost:1 (root)' desktop is localhost:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log
vncserver -kill :17. Edit the ~/.vnc/xstartup file (for this we use nano, however you can use alternate text editor).
nano ~/.vnc/xstartupThe mentioned file contents should be edited into following:
#!/bin/sh8. After saving changes to ~/.vnc/xstartup, start the vncserver service once more:
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
vncserver :19. Now the VNC access to the server is possible. In addition we recommend to set up your crontab, so that after server reboot the vncservice would start automatically:
crontab -e9.1. In the bottom of opened cron task file add the following line:
@reboot /usr/bin/vncserver :1
Comments