install vnc server on debian
download from : https://www.realvnc.com/download/vnc/
下载完成后,申请一个free版的license.
VNC-5.2.3-Linux-x64-DEB.tar.gz 解压
tar -zxvf VNC-5.2.3-Linux-x64-DEB.tar.gz
解开后,一个服务端,一个客户端
VNC-Server-5.2.3-Linux-x64.deb
VNC-Viewer-5.2.3-Linux-x64.deb
安装vnc服务端和客户端
安装文档 : https://www.realvnc.com/products/vnc/documentation/5.2/installing-removing/debian
dpkg -i VNC-Server-5.2.3-Linux-x64.deb VNC-Viewer-5.2.3-Linux-x64.deb
添加服务端的license
vnclicense -add KR2RH-246UK-NGAC4-AANX4-XXXXX
杀掉已经存在的vncserver
vncserver -kill :1
设置服务端要传送的远程桌面参数
vncserver :1 -geometry 1024x768 -depth 24
查看vncserver是否运行
ps aux | grep vnc
查看vncserver监听的端口
netstat -tulpn | grep vnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 4219/Xvnc-core
tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 3908/Xvnc-core
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 4219/Xvnc-core
tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 3908/Xvnc-core
tcp6 0 0 :::5901 :::* LISTEN 4219/Xvnc-core
tcp6 0 0 :::5902 :::* LISTEN 3908/Xvnc-core
tcp6 0 0 :::6001 :::* LISTEN 4219/Xvnc-core
tcp6 0 0 :::6002 :::* LISTEN 3908/Xvnc-core
可以看到我们连5901就可以了, vnc默认端口端口从5900开始.
在另外一台计算机上, 用vncview连接vncserver, 可以连上.
在vncserver上连接Window7, 不用另外设置, 直接就可以连上.
在win7上装的是 VNC-5.2.1-Windows.zip 的服务端和客户端
root@lsserver:~# vncviewer 192.168.100.60
可以看到,我们不用自己去制定vnc服务端的端口号码.
continue后,输入口令就连上了.
重新启动服务器后,发现vncserver没有启动, 做个.sh, 在/etc/rc.local中调用.
# /// @file /home/lostspeed/start_vncserver.sh
vncserver -kill :1
vncserver :1 -geometry 1024x768 -depth 24
如果 vncserver -kill : 1 没杀掉vncserver, 以root用户身份去/root/.vnc去看看, 有没有*.pid文件. e.g. lsserver:2.pid
然后执行 vncserver -kill :x, 杀掉对应数字的svnserver实例. e.g. vncserver -kill :2
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing./home/lostspeed/mount_my_disk.sh
/home/lostspeed/start_vncserver.shexit 0
这样连上vnc后,用户是root.
在vncview中开个控制台,将用户换成非root用户做实验.
root@lsserver:~# whoami
root
root@lsserver:~# su - lostspeed
lostspeed@lsserver:~$ whoami
lostspeed
lostspeed@lsserver:~$
觉得还是先用别的命令行工具连上服务器,再手工启动vncserver好些.
或者让vncserver以非root用户启动.
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.# because only root user can mount disk
su - root -c /home/lostspeed/mount_my_disk.sh# !!! first run vncpasswd on below user's environment to set password for vnc
su - lostspeed -c /home/lostspeed/start_vncserver.shexit 0
install vnc server on debian相关推荐
- 【转】How to install VNC server on ubuntu 14.04
转自:https://www.krizna.com/ubuntu/install-vnc-server-ubuntu-14-04/ VNC server is used to share graphi ...
- CentOS7.4下 VNC Server的搭建和客户端的连接配置
CentOS7.4下 VNC Server的搭建和客户端的连接配置 服务器版本:CentOS Linux release 7.4.1708 (Core) yum方式安装VNC server yum i ...
- Linux/ubuntu server 18.04 安装远程桌面--vnc server
此文首发于我的个人博客:Linux/ubuntu server 18.04 安装远程桌面–vnc server - zhang0peter的个人博客 想装桌面端在服务器上的原因是我在终端中开chrom ...
- CentOS 6.0安装VNC Server
2019独角兽企业重金招聘Python工程师标准>>> 环境 服务器:192.168.10.181 系统:CentOS 6.0 安装过程 1.切换至root用户 2.检测系统是否安装 ...
- CentOS Linux下VNC Server远程桌面配置详解
PS:偶以前基本不用Linux的远程图形桌面,前几天有开发的同事配置CentOS的vnc有问题,找我解决,就顺便记录总结一下,这个总结是比较完整的.下面的配置在CentOS5.x和6.x.SUSE企业 ...
- 一章: CentOS6.5 网络配置、修改主机名、添加硬盘、压缩——解压方法、VNC—server配置
1,配IP ,修改网络配置文件 配置网卡 # vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:50:56:83: ...
- CentOS中配置VNC Server
环境:CentOS 6.4 1.安装tigervnc-server及相关软件 首先检查系统中是否安装tigervnc-server安装包 rpm -qa tigervnc-server 如果没有就直接 ...
- CentOS 6.5安装VNC server
1. 安装桌面,安装时选择了Desktop可以忽略 # yum groupinstall Desktop # yum install gnome-core xfce4 firefox 2. 安装VNC ...
- Linux VNC server 安装配置
1.安装vnc server [root@pxe ~]# yum install tigervnc-server -y 2.设置 vnc server 开机启动 [root@pxe ~]# chkco ...
最新文章
- 【HTML5游戏开发】简单的《找不同汉字版》,来考考你的眼力吧
- 为什么计算机存储的是二进制补码?
- VTK:图片之ExtractComponents
- Hadoop集群(第3期)_VSFTP安装配置
- 手机软件项目管理(1)—软件供应商评判项
- resnet 25 训练人脸识别
- Advice只有切面化之后才能显现出AOP的巨大优势
- 无监督/自监督/半监督的景物分割方法
- xul 和xml区别_使用Atom XML和Firefox XUL实施Web剪切和粘贴
- 计算机无线网怎么安装教程,wifi怎么安装,教您电脑如何安装wifi
- ARM Cortex-M3 学习笔记(3)
- Six Sigma Basics
- 关于assert函数的调用警告:implicit declaration of function 'ASSERT' is invalid in C99
- python 自定义函数计算相应在不同k值时的cp值_Python版_实验二:K近邻算法分析与应用 - 作业.doc...
- 使用PlayCanvas制作一个简单的小游戏(二)
- Java - char型变量中能不能存贮一个中文汉字,为什么?
- [二分法]leetcode2187:完成旅途的最少时间(medium)
- Oracle 监听端口被占用,别的端口也提示占用
- Windows 10 系统下载网址推荐
- 推荐一个牛逼的资料!整理成了PPT版本(附链接),快来下载!