zoukankan      html  css  js  c++  java
  • 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");

  • 相关阅读:
    基于ADO的远程Oracle连接
    oracle中的定时任务
    关于C++ const 变量
    堆排序和选择排序
    插入排序
    多线程的两种启动方式
    多尺度变换去噪的阈值选择
    jstree
    JS中call、apply、bind使用指南,带部分原理。
    六. JavaScript时间日期格式化
  • 原文地址:https://www.cnblogs.com/cade/p/3491997.html
Copyright © 2011-2022 走看看