Because of the recent special needs, I need to build a remote through the GUI for the maintenance of the cluster, of course, although the cluster, but the machine is only 7 PCs, plus the network environment restrictions, the real cluster is not a good place, so also on each Taiwan to deal with it.
Ubuntu's own VNC service is vino-server This service can be opened directly under the graphical interface, but unfortunately, after the reboot you have to log in again before you can login through VNC, this is not applicable to my environment, so need to install other VNC services, There are a lot of explanations in this wiki, but it doesn't even apply to me, so I install vnc4server myself:
1. Install Service:
2. Set the VNC password:
sudo vncpasswd ~/.vncpasswd
3 Setting Xstartup
CD ~/.VNC
ls./
#这里你会看到passwd Xstartup These two files, if there is no xstartup, you can start the first vncserver it will be generated, and then edit the
VI Xstartup
So you can see these things:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset Session_manager
# Exec/etc/x11/xini T/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 &
You don't have to call it the description of the annotation, directly modify the following line:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset Session_manager
# exec/etc/x11/x INIT/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-session &
So we can telnet to the Gnome interface via the VNC viewer.
4. Test:
Vncserver:1-geometry 1280x800
This allows you to log on to VNC using a yourip:1 connection. No problem, just OK.
5. Auto Start:
sudo vi/etc/rc.local
#添加这一行:
su-yourusername-c "cd/home/yourusername/&& vncserver:1-geometry 1280x 2>/dev/null&; "