Ubuntu11.04 VNC-Server Configuration

Source: Internet
Author: User
Tags ssh server

From: http://nuclear-imaging.info/site_content/2011/05/11/vnc-server-setup-for-ubuntu-11-04-natty-narwhal/

 

 

For the first time I was able to get VNC to work with Ubuntu with Gnome session instead of a xterm on gray background. the steps involved were exactly the same as I was following earlier, with one exception: the setup of xstartup IN ~ /. VNC folder.

For your xstartup file in ~ /. VNC (the ". VNC" folder in

Your home directory), you need the following:

#----------

#! /Bin/sh

# 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 gray

Vncconfig-iconic &

Xterm-geometry 80 × 24 + 10 + 10-ls-title "$ vncdesktop desktop "&

Gnome-session &

# TWM &

#--------

Instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

Make sure restart vnc4server

The line which got gnome working was "gnome-session &"

==========================================================

Now for all the steps involved (works in karmic koala Alpha 2, UBUNTU 9.10, kernel 2.6.30-10)

1. Install SSH server, SSH client, VNC Viewer, VNC Server, and xinetd

Sudo apt-Get install OpenSSH-server openssh-client vnc4server xinetd vncviewer

2. setup the SSH password for your login

Ssh-keygen

3. test out the SSH server by typing in

SSH localhost or SSH your_login @ your_ip_address

4. then create a VNC Password

Sudo vncpasswd ~ /. Vncpasswd

5. Edit the xstartup file in ~ /. VNC directory

For your xstartup file in ~ /. VNC (the ". VNC" folder in

Your home directory), you need the following:

----------

#! /Bin/sh

# 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 gray

Vncconfig-iconic &

Xterm-geometry 80 × 24 + 10 + 10-ls-title "$ vncdesktop desktop "&

Gnome-session &

# TWM &

--------

Instead of uncommenting the lines as the script suggests, you change the window manager to gnome-session

6. Create a VNC Desktop

Vnc4server: 1-geometry 1024 × 768

7. Then to tunnel into your VNC desktop, first create a SSH tunnel by logging into SSH with the Comand:

Ssh-l 5901: your_ip_address: 5901 your_username @ your_ipaddress

8. Finally, load up your VNC Desktop

Vncviewer localhost: 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.