linux 远程桌面的配置
root根用户登录在/root目录下
#rpm -q vnc vnc-server查询已安装vnc的客户端和服务器端
vnc-4.1.1-36
vnc-server-4.1.1-36
#vi /etc/sysconfig/vncservers将developer用户名加入vncservers文件中
如下所示:
# VNCSERVERS="2:myusername"
VNCSERVERS="2:developer"
创建一个vnc的口令
#vncpasswd
Password:
Verify:
启动vnc服务
#sudo /sbin/service vncserver start
Starting VNC server:2:developer [FAILED]
后来改为用户developer,并在/home/developer目录下创建vnc的口令
[developer@developer ~]$vncpasswd
Password:
Verifty:
$ls -d .vnc
.vnc
$ls .vnc
passwd
$/sbin/service vncserver start
Starting VNC server:2:developer runuser:cannot set groups:Operation not permitted [FAILED]
$sudo /sbin/service vncserver start
developer is not in the sudorers file.This incident will be reported.
退出仍用root用户
#sudo /sbin/service vncserver start
Starting VNC server:2:developer xauth:creating new authority file /home/developer/.Authority
New 'developer.fw:2(developer)'desktop is developer.fw:2
Creating default startup script. /home/developer/.vnc/xstartup
Starting applications specified in /home/developer/.vnc/xstartup
Log file is /home/developer/.vnc/developer.fw:2.log [OK]
这次成功了.
#cd .vnc
(/home/developer/下)
#ls
developer.fw:2.log
developer.fw:2.pid passwd xstartup
#vi xstartup
下面两行的注释去掉。
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
保存退出
重启vncserver
#sudo /sbin/service vncserver restart
Shutting down VNC server:2:developer [OK]
Starting VNC server:2:developer
New 'developer.fw:2(developer)'desktop is developer.fw:2
Starting application specified in /home/developer/.vnc/xstartup
Log file is /home/developer/.vnc/developer.fw:2.log [OK]
在本机上试连接到vncserver
#vncviewer localhost:2
成功,打开了一个vnc窗口,输入口令,进入。
客户端的配置
如客户端为windows ,用putty或vnc客户端
客户端为linux:
1.vncviewer localhost:2 在本机执行
2.用ssh
ssh -L 5901:localhost:5901 -l foo myserver
需在sudo vi /etc/sysconfig/iptables中打开5901端口,
然后重启iptables
sudo /sbin/service iptables restart
或者直接用ip地址ssh -L 5901:localhost:5901 -l foo 192.168.x.x
linux 远程桌面的配置的更多相关文章
- linux 远程桌面连接
我们知道在windows下面我们可以用远程桌面连接来控制其它电脑, 但linux 远程桌面连接?不过在说怎样连接之前还是要先明确一个概念,为什么我标题没有用linux中的远程桌面连接呢, 这是因为Li ...
- CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面并安装火狐浏览器
CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面并安装火狐浏览器 vnc客户端地址:https://files.cnblogs.com/files/MYSQLZOUQI/vnc- ...
- window用Xmanager4.0的Xstart连接linux远程桌面
安装包: xorg-x11-xauth xterm.x86_64 0:253-1.el6 Execute command path:/usr/bin/xterm Xstart连接Linux远程桌面有一 ...
- Linux远程桌面(三)
上一篇中的vnc配置已经很方便了,这一篇介绍更为简单的xmanager的配置,xmanager画面好一丢丢. Xmanager服务器配置 Linux远程桌面(二):vnc之xi ...
- Linux远程桌面(二)
上一篇远程桌面采用的独立服务配置不适用于过多用户,这一篇采用超级Internet服务器搭建vnc服务可以解决多用户问题. vnc之xinetd服务搭建配置 Linux远程桌面(一):vnc之独立服务 ...
- Xrdp - 通过Windows的RDP连接Linux远程桌面(Ubuntu/CentOS/Redhat 7)(转载)
您多久访问一次Linux桌面? 您使用什么工具来访问远程桌面? Xrdp是一个开源工具,允许用户通过Windows RDP访问Linux远程桌面. 除了Windows RDP之外,xr ...
- Xrdp - 通过Windows的RDP连接Linux远程桌面(Ubuntu/CentOS/Redhat 7)
Xrdp - 通过Windows的RDP连接Linux远程桌面(Ubuntu/CentOS/Redhat 7) 您多久访问一次Linux桌面? 您使用什么工具来访问远程桌面? Xrdp是一个开源工具, ...
- Windows Server 2019远程桌面服务配置和授权激活
参考Windows Server 2016远程桌面服务配置和授权激活方法可适用于Windows Server 2019 Server 2016默认远程桌面连接数是2个用户,如果多余两个用户进行 ...
- centOS5.5 配置vnc,开启linux远程桌面
如何远程控制centOS桌面? 如何使用windows远程控制centOS桌面? 1.查看本机是否有安装vnc(centOS5默认有安装vnc) rpm -q vnc vnc-server 如果显示结 ...
随机推荐
- 【翻译五】java-中断机制
Interrupts An interrupt is an indication to a thread that it should stop what it is doing and do som ...
- Big Data, MapReduce, Hadoop, and Spark with Python
此书不错,很短,且想打通PYTHON和大数据架构的关系. 先看一次,计划把这个文档作个翻译. 先来一个模拟MAPREDUCE的东东... mapper.py class Mapper: def map ...
- .NET Expression Tree
Expression Tree 第一个简单的例子. [TestMethod] public void GodTest() { Expression<Func<int, int, int&g ...
- phpcms v9 黄页实现手机访问手机版,电脑访问电脑版(双模板)
第一步.模板文件夹下,yp复制一份,改名字 ypwap 第二步.修改phpcms/modules/yp/index.php和phpcms/modules/ypwap/index.php //判断客户端 ...
- hdu 4025 2011上海赛区网络赛E 压缩 ***
直接T了,居然可以这么剪枝 题解链接:点我 #include<cstdio> #include<map> #include<cstring> #define ll ...
- ios编码转换 国标 UTF-8
我们知道,使用NSURLConnection的代理方法下载网页,存到一个NSData中, NSMutableData *pageData; [pageData appendData:data]; 如果 ...
- CmRegisterCallback使用方法
部分代码 #include "my_sys_fun.h"#ifdef __cplusplusextern "C"{#endif //驱动加载函数 NTSTATU ...
- Android px、dp、sp之间相互转换
dp(dip): device independent pixels(设备独立像素). 不同设备有不同的显示效果,这个和设备硬件有关,一般我们为了支持WVGA.HVGA和QVGA 推荐使用这个,不依赖 ...
- 关于MFC OpenGL环境配置的一点总结
复制include时要小心..看vs给你load哪一个..名字一样..东西可不一定一样哦 http://www.cppblog.com/wicbnu/archive/2010/09/30/128123 ...
- 自己yy的fulkson最大流算法
#include <iostream> #include <cstdio> #include <vector> using namespace std; ; //m ...