How to Install a VNC Server in Ubuntu
2016-05-07 14:52
615 查看
1Open a Terminal window. The Terminal window can be found under "Start" > "Utilities."2Download vnc4server and xinetd:
sudo apt-get install vnc4server xinetd3Start the vnc4server:
vnc4server
You will be prompted for a password. This password will be used to log into the VNC session.
After providing a password, you will get output that looks like:
New 'laptop:3 (laptop)' desktop is laptop:3
Take notice of the number after the colon (:), in this case it is "3."
Starting the vnc4server will cause a .vnc directory to be placed in your home directory.4Stop the vnc4server
vnc4server -kill :3
Replace the number "3" with the number from Step 3.5Open the .vnc/xstartup file for editing:
gedit ~/.vnc/xstartup
The file will look like:
#!/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
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &6Change the .vnc/xstartup file and save it.
Uncomment the lines that start with unset and exec. Comment out the lines that start with xsetroot, vncconfig, xterm and twm.
The final file should look like:
#!/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
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &7Change the permissions on the /etc/X11/xinit/xinitrc file to make it executable:
sudo chmod 755 /etc/X11/xinit/xinitrc8Start the vnc4server:
vnc4server
Again, remember the number after the colon (:).9Log into your remote desktop to check the configuration:
vncviewer localhost:3
Provide the password that you chose in Step 3.
sudo apt-get install vnc4server xinetd3Start the vnc4server:
vnc4server
You will be prompted for a password. This password will be used to log into the VNC session.
After providing a password, you will get output that looks like:
New 'laptop:3 (laptop)' desktop is laptop:3
Take notice of the number after the colon (:), in this case it is "3."
Starting the vnc4server will cause a .vnc directory to be placed in your home directory.4Stop the vnc4server
vnc4server -kill :3
Replace the number "3" with the number from Step 3.5Open the .vnc/xstartup file for editing:
gedit ~/.vnc/xstartup
The file will look like:
#!/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
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &6Change the .vnc/xstartup file and save it.
Uncomment the lines that start with unset and exec. Comment out the lines that start with xsetroot, vncconfig, xterm and twm.
The final file should look like:
#!/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
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &7Change the permissions on the /etc/X11/xinit/xinitrc file to make it executable:
sudo chmod 755 /etc/X11/xinit/xinitrc8Start the vnc4server:
vnc4server
Again, remember the number after the colon (:).9Log into your remote desktop to check the configuration:
vncviewer localhost:3
Provide the password that you chose in Step 3.
相关文章推荐
- Ubuntu内核编译简单过程
- Codeforces 165D Beard Graph 【树链剖分】
- 剑指offer刷题—替换空格
- UIcontrol中touch事件uicontrolevents的一点东东
- c++ 类型转换
- ubuntu NFS sfu配置指南
- “cunit” package in Ubuntu
- python readline()函数
- Ubuntu环境变量设置
- NetBSD环境变量的设置
- Linux下 格式化U盘和挂载
- Ubuntu 头文件
- 收集的一些站点,方便查看
- 关于怎样搭建企业网盘及WEB服务器
- Ubuntu samba设置
- Ubuntu ftp设置
- Ubuntu语言设置
- Codeforces 165C Another Problem on Strings 【二分】
- Ubuntu网络配置
- Ubuntu配置ssh server