• vnc 登录后只有终端 没有桌面 黑屏


    1, start vnc server: vncserver :1

    issue:

    connect it with pc and only display one terminal.

    2, stop vnc server: vncserver -kill :1

    3, modify file(/home/your name/.vnc/xstartup) like below:

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

    verify vnc server works ok or not with step 1 and 2, if not go to next step.

    4, modify file(/home/your name/.vnc/xstartup) like below:

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

    verify vnc server works ok or not with step 1 and 2, if not go to next step.

    5, modify file(/home/your name/.vnc/xstartup) like below:

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

    startkde &
    #gnome-session &

    verify vnc server works ok or not with step 1 and 2, if not go to next step.

    6, Bad luck, I do not know either. :)

    ps: if you want to change the root content for every vnc server instance, you can try to modify below file:

    /usr/bin/vncserver

    $defaultXStartup 
    = ("#!/bin/shnn". 
    "# Uncomment the following two lines for normal desktop:n". 
    "unset SESSION_MANAGERn". 
    "exec /etc/X11/xinit/xinitrcnn". 
    "#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesn". 
    "#xsetroot -solid greyn". 
    "#vncconfig -iconic &n". 
    "#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &n". 
    "#twm &n");

  • 相关阅读:
    cestos7安装zookeeper
    Cestos7安装Elasticsearch5.4.3
    debian使用nginx创建静态文件存储
    tomcat优化
    tomcat停止和启动脚本
    linux中shell变量$#,$@,$0,$1,$2的含义解释
    redis设置bind
    Jenkins send build artifacts over ssh配置
    nginx 负载均衡5种配置方式
    Jenkins tomcat打包启动脚本,待完善
  • 原文地址:https://www.cnblogs.com/cade/p/3491997.html
Copyright © 2020-2023  润新知