我的Vncserver设置有什么问题?

时间:2018-07-19 06:05:20

标签: linux ubuntu-16.04 vnc-server

大家好,霍尔:

我想在ubuntu 16.04服务器中安装“ vncserver”,但是当我通过“ VNC Viewer”连接时,它始终显示灰屏。我不知道问题是什么,有人可以帮助解决吗? 非常感谢!

vnaserver启动日志:

Xvnc Free Edition 4.1.1 - built Feb 25 2015 23:02:21
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40300000, The XFree86 Project, Inc

Thu Jul 19 13:38:01 2018
vncext:      VNC extension running!
vncext:      Listening for VNC connections on port 5904
vncext:      created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
Error:            XKB extension not present on :4
XKB extension not present on :4
                  Exiting
Starting session: /etc/X11/Xsession
Session terminated with return code 1

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 &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

2 个答案:

答案 0 :(得分:0)

import nltk
from nltk.tokenize import PunktSentenceTokenizer    #Unsupervised machine learning tokenizer.
#This is the custom tagger I created. To use it in future projects, simply import it from Learn_NLTK and call it in your project.
def custom_tagger(training_file, target_file):
    tagged = []
    training_text = open(training_file,"r")
    target_text = open(target_file,"r")
    #Use the trained tokenizer to tag your target file.
    for i in PunktSentenceTokenizer(training_text.read()).tokenize(target_text.read()): tagged.append(nltk.pos_tag(nltk.word_tokenize(i)))        
    training_text.close()   #ALWAYS close opened files! This is why I have included the extra code to this function!
    target_text.close()     #ALWAYS close opened files! This is why I have included the extra code to this function!
    return tagged

将这些行更改为-

#x-window-manager &

gnome-terminal &

我认为这应该有效。 还要检查是否已安装gnome-panel,metacity和nautilus软件包(如果未安装的话)。

答案 1 :(得分:0)

这对我有用。

yum install gnome* xterm* xorg* -y