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");

  • 相关阅读:
    新的开始——3.3
    第一个周末——3.2
    恋爱知识大增——周五3.1
    相安无事——周四2.28
    好几天没写了。。。——周三2.27
    开学第二天——2.26
    开学第一天——2.25
    华为
    微软 Microsoft
    谷歌 google
  • 原文地址:https://www.cnblogs.com/cade/p/3491997.html
Copyright © 2011-2022 走看看