zoukankan      html  css  js  c++  java
  • centos vnc配置

    将用户名称加入到配置文件

    vi /etc/sysconfig/vncservers

      #
     
      # Uncomment the line below to start a VNC server on display :1
     
      # as my 'myusername' (adjust this to your own)。 You will also
     
      # need to set a VNC password; run 'man vncpasswd' to see how
     
      # to do that.
     
      #
     
      # DO NOT RUN THIS SERVICE if your local area network is
     
      # untrusted! For a secure way of using VNC, see
     
      # http://www.uk.research.att.com/vnc/sshvnc.html>.
     
      # VNCSERVERS="1:myusername"
     
      # VNCSERVERS="1:gavin 2:john" # use the method for more user
     
      VNCSERVERS="1:gavin 2:root 3:root"
     
      # VNCSERVERARGS[1]="-geometry 800x600"
     
      VNCSERVERARGS[1]="-geometry 1024x768"

    启动vncserver服务

    /sbin/service vncserver start

    输入命令:

    cd ~/.vnc/
    vi xstartup

      #!/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" &
     
      gnome-session & #set starting GNOME desktop
     
      #startkde & #kde desktop
     
      #twm & #Text interface

    重启vncserver

    /sbin/service vncserver restart


     

  • 相关阅读:
    Hibernate 笔记 之 三 基础优化方面
    Hibernate 笔记 之 二 查询
    Hibernate 笔记 之 一 创建与配置
    hibernate初次配置及测试
    CentOS 7.3 安装MySQL--Java--Tomcat
    Spring AOP:自动注入参数值
    Spring AOP:实现Request信息获取
    IntelliJ IDEA导出项目文档
    IntelliJ IDEA:Shortcut Key
    iText生成PDF
  • 原文地址:https://www.cnblogs.com/jifeng/p/1902897.html
Copyright © 2011-2022 走看看