设置Solaris DomU的远程桌面环境

662人阅读 评论(0) 收藏 举报

How to Set Up VNC

You can set up VNC to provide a domU graphical login.

  • Enable sshd tcp port forwarding.
  • Install VNC (this example is tightvnc)
  • Set up VNC to auto start on boot:
     # echo 'vnc 5900/tcp' >>/etc/services
# echo 'vnc stream tcp nowait nobody /opt/vnc/bin/Xvnc-1152' > /tmp/vnc.inetd.conf
# inetconv -i /tmp/vnc.inetd.conf
# svcadm restart inetd

  • Create the following executable script file:
     # cat /opt/vnc/bin/Xvnc-1152
#!/bin/sh
/opt/vnc/bin/Xvnc -inetd -query localhost -once -localhost -geometry 1152x720 -depth 16

  • Turn off Xserver on display 0, enable remote login. Set up gdm/custom.conf as shown in following file.

     # cat /etc/X11/gdm/custom.conf
[daemon]
RemoteGreeter=/usr/lib/gdmgreeter

[security]
AllowRemoteRoot=true

[xdmcp]
Enable=true

[gui]

[greeter]
SystemMenu=true

[chooser]

[debug]

# Note that to disable servers defined in the defaults.conf file (such as
# 0=Standard, you must put a line in this file that says 0=inactive, as
# described in the Configuration section of the GDM documentation.
#
[servers]
0=inactive

  • Disable CDE/Enable gdm:
     # svcadm disable cde-login
# svcadm enable gdm

  • Log in to your domU from one shell on a client machine (i.e., the machine with your graphical console):
     # ssh -g -L5900:127.0.0.1:5900 <domU ip>

  • From another shell on the client machine, type:
     # vncviewer 127.0.0.1 :0

  • You should now have a Solaris login console. For security reasons, the session is not persistent. If you quit the client, you end the session. If you want a persistent VNC session, you should start a VNC server on a different port (a regular VNC server, not one that uses inetd).

For additional information on VNC (Virtual Network Computing), visit this site.

Copyright 2007 Sun Microsystems, Inc.

 
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:589075次
    • 积分:10376
    • 等级:
    • 排名:第1603名
    • 原创:445篇
    • 转载:3篇
    • 译文:0篇
    • 评论:11条
    最新评论