Ubuntu10.10 install and use vnc and ubuntu10.10vnc

Source: Internet
Author: User

Ubuntu10.10 install and use vnc and ubuntu10.10vnc

Original article published on:
Reprinted to cu on: 2012-07-21

In a security test environment, ubuntu10.10 was installed on vmware (I used it in college, and it seems that I was using 6 series at the earliest ). After installation, you want to use remote desktop control. After all, the interface shown on vmware is relatively small and inconvenient.

Vnc is used, please refer to the http://www.realvnc.com/

After vnc is installed and some configuration (vnc is started using gnome-seeion), two problems occur:

1. After using vncviewer to connect to the remote end, there is only one terminal with no graphical interface. The words "cocould not acquire name on session bus" are displayed;

2. Solve the problem above. After the vnc is mounted, press the "d" button to make it unavailable.

Find a solution from the Internet and record it for later use.

1. install on ubuntu:

sudo apt-get install vnc4server

2. Start vncserver:

vncserver

The password must be set at the first startup. You can use vncpasswd to modify the password later;

When you see new' *****: 1 (*****) 'desktop is *****: 1 (***** indicates that the vnc is successfully started, generate. vnc directory;

In this case, you can connect remotely. Pay attention to the above number "1", which represents the terminal number. Use the web page to log on to http: // ip: 5901, and use vncviewer as ip: 1;

3. Disable vnc:

vncserver -kill :1

Note that there are spaces after kill;

4. I thought it would have been time to call gnome-session by modifying the graphical interface started by vnc in centos, but unfortunately the problem occurred. The problem is described above. The solution is as follows (from the network:

Back up the original xstartup file:

mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

Copy a new xstartup file:

cp /etc/X11/Xsession ~/.vnc/xstartup

(There is also one method in the above two steps:

sudo gedit ~/.vnc/xstartup

Original file content:

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

After modification:

#! /Bin/sh
# Uncomment the following two lines for normal desktop:
Unset SESSION_MANAGER
Exec/etc/X11/xinit/xinitrc (you can also change it to/etc/X11/Xsession. If xinitrc does not have modification permission, the Remote Desktop may be a snowflake)
[-X/etc/vnc/xstartup] & exec/etc/vnc/xstartup
[-R $ HOME/. Xresources] & xrdb $ HOME/. Xresources
# Xsetroot-solid gray
# Vnccon **-iconic &
# X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
# X-window-manager &

Modify the permissions of the/etc/X11/xinit/xinitrc file to run the following commands:

sudo chmod 755 /etc/X11/xinit/xinitrc

)

5. The first problem can be solved after the above configuration. The second problem is as follows:

Windows keys are defined in ubuntu 10.10 and are defined as Super keys. When you press the letter "d" under vnc, "d" cannot be entered because it is treated as a shortcut to return to the desktop. You can modify the shortcut key to avoid this bug. Open a new terminal and enter:

gconf-editor

In the displayed dialog box, go to "Apps-> Metacity-> Global keybingdings" and find "show desktop". Change the default value <Super> D to <Ctl> D.

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.