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

  • 相关阅读:
    React Native 安卓 程序运行报错: React Native version mismatch(转载)
    RN用蓝牙接入热敏打印机和智能电子秤(转载)
    安装加密用包
    React Native 调用 Web3(1.x) 的正确姿势
    Unable to resolve module crypto
    点击<tr>表格行元素进行跳转
    Phonegap环境配置
    登录记住密码功能的实现
    php+sqlserver实现分页效果
    php日期格式转换
  • 原文地址:https://www.cnblogs.com/cade/p/3491997.html
Copyright © 2011-2022 走看看