In the two-day security test environment, Ubuntu10.10 was installed on VMware. (I used it before. It seems like 6 series were used first ). After installation, you want to use remote desktop control. After all, the interface shown on VMware is relatively small and inconvenient. After vnc is installed and some configuration (vnc is started using gnome-seeion), two problems occur during use: 1. after connecting from the remote end using vncviewer, there is only one terminal, there is no graphical interface, there is "couldnotacquirena
We installed Ubuntu 10.10 On VMware in a two-day security test environment. (We used Ubuntu in the past. It seems that we were using it as early as 6 series ). After installation, you want to use remote desktop control. After all, the interface shown on VMware is relatively small and inconvenient.
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 and the words "cocould not acquire name on session bus" are available;
2. Solve the problem above. After the vnc is mounted, press "d" 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 gray
Vnccon **-iconic &
X-terminal-emulator-geometry 80 × 24 + 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 (it can also be modified to/etc/X11/Xsession, xinitrc Remote Desktop may be a snowflake http://www.linuxidc.com when there is no modification permission)
[-X/etc/vnc/xstartup] & exec/etc/vnc/xstartup
[-R $ HOME/. Xresources] & xrdb $ HOME/. Xresources
# Xsetroot-solid gray
# Vnccon **-iconic &
# X-terminal-emulator-geometry 80 × 24 + 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:
The Windows key is defined in ubuntu 10.10 as the Super key. When you press the letter "d" under vnc, "d" cannot be input due to incorrect desktop return shortcuts. 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". Set the default value D D.