设置Solaris DomU的远程桌面环境

本文介绍如何配置VNC以提供远程图形登录。主要内容包括启用SSH端口转发、安装VNC、设置VNC随系统启动、禁用本地X服务器及启用远程登录等步骤。此外还提供了从客户端连接到VNC服务器的具体命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值