Ubuntu 12.04 Unity desktop environment vnc configuration note [zz]

Source: Internet
Author: User
Note: This description only applies to ubuntu 12.04 unity desktop. For other versions, see

Install vnc:
Sudo apt-get install vnc4server

Run the server:
Run vncserver directly after installation. For more parameters, see man vncserver. For the first operation, you must set a password to generate the configuration file in ~ /. The vnc directory has unlimited root permissions.

On another computer, you can connect to the desktop through remote vnc:
Example: vncviewer 1.2.3.4: 1 connect to the Remote Desktop

Configuration problems:
Default Configuration File ~ /. Vnc/xstartup is as follows:


#! /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 &
X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
X-window-manager &


Possible problems with using the default configuration:
1. Use the default configuration. After you log on to the vnc desktop, you can only see the desktop background and a terminal. There is nothing else, for example.


2. A Counld not acquire name on session bus Error occurs during login, as shown in.



The following is my correct configuration to solve the above problem, with instructions:
Modified ~ /. Vnc/xstartup


#! /Bin/sh

# Uncomment the following two lines for normal desktop:
Unset SESSION_MANAGER
Unset DBUS_SESSION_BUS_ADDRESS
# Exec/etc/X11/xinit/xinitrc

[-X/etc/vnc/xstartup] & exec/etc/vnc/xstartup
[-R $ HOME/. Xresources] & xrdb $ HOME/. Xresources
Xsetroot-solid gray
Vncconfig-iconic &
X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
# X-window-manager &

Export top_session = ubuntu-2d # This ubuntu-2d reference/usr/share/gnome-session/sessions/file name is set to a different value
Export GDMSESSION = ubuntu-2d
Export STARTUP = "/usr/bin/gnome-session = ubuntu-2d"

$ STARTUP


The final effect is as follows:


For vnc configurations in other ubuntu versions, use the default configuration.

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.