码迷,mamicode.com
首页 > 其他好文 > 详细

vnc问题

时间:2018-08-17 20:08:56      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:ini   [1]   sys   lines   exe   image   pass   png   解决   

 

1、vnc连接rhel5.9后,注销系统后再次连接未能正常显示(桌面图标未能正常显示)

详情如下图:

 技术分享图片

 

解决方式:(重启vnc)

vncserver -kill :1     #关闭vnc端口
vncserver :1            #启动vnc端口1

 

 

介意方式:(点击vnc关闭按钮)

 技术分享图片

 

 

2、实现多用户登录

举例:

useradd cosmos           #添加用户shen

passwd cosmos            #设置用户的linux登录密码

 

su - cosmos                 #切换到用户shen

vncpasswd              #设置用户shen的vnc客户端登录密码

 

exit

vi /etc/sysconfig/vncservers       #添加vnc配置信息

在最后加上:

VNCSERVERS="1:root 2:cosmos"

VNCSERVERSVNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared" 

VNCSERVERSVNCSERVERARGS[2]="-geometry 1024x768 -alwaysshared"

vi /etc/sysconfig/iptables    #添加iptable信息:(端口号)

Vnc1:5901、5801

Vnc2:5902、5802

 

su – cosmos

find -name xstartup            #查找xstartup

vi ./.vnc/xstartup                 #解决vnc2灰屏问题

#!/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 &

gnome-session &

 

service vncserver stop         #关闭vnc

service vncserver start         #启用vnc

#停止某个vnc连接:

vncserver -kill :1        #关闭vnc端口1
vncserver :1               #启动vnc端口1

 

vnc问题

标签:ini   [1]   sys   lines   exe   image   pass   png   解决   

原文地址:https://www.cnblogs.com/cos235817497/p/9494930.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!