在RHEL 6.6中使用GNOME over VNC时的空白桌面

时间:2015-11-01 16:39:26

标签: linux gnome vnc

我可以VNC进入我的RHEL服务器,但是我得到的是一个空白的桌面,应用了某种壁纸,鼠标指针不响应鼠标左键或右键。

.vnc中的xstartup文件如下所示:

#!/bin/sh

[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

我在/ etc / X11 / xinit中甚至没有xinitrc可执行文件,我只有一个目录xinitrc.d,其中只有一个文件:00-start-message-bus.sh

-----更新----------------

我安装了GDM,现在至少我有一个xinitrc文件,而startx正在做“某事”。我使用的是虚拟化服务器平台,没有附加物理监视器。在安装GDM之前,startx给了我“命令未找到”。

现在,当我重新启动vncserver服务时,我会在日志文件中找到它。

Xvnc TigerVNC 1.1.0 - built Jul 22 2014 06:00:32
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11500000, The X.Org Foundation

Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension VNC-EXTENSION
Initializing built-in extension GLX

Mon Nov  2 22:07:07 2015
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5902
 vncext:      created VNC server for screen 0
gnome-session[4254]: WARNING: Unable to find provider 'gnome-panel' of required component 'panel'
gnome-session[4254]: WARNING: Unable to find provider 'nautilus' of required component 'filemanager'
GNOME_KEYRING_SOCKET=/tmp/keyring-u6bws2/socket
SSH_AUTH_SOCK=/tmp/keyring-u6bws2/socket.ssh
GNOME_KEYRING_PID=4268

** (gnome-settings-daemon:4267): WARNING **: Connection failed, reconnecting...
vmware-user: could not open /proc/fs/vmblock/dev
Failed to play sound: Not available

(polkit-gnome-authentication-agent-1:4285): GLib-GObject-WARNING **: cannot register existing type `_PolkitError'

(polkit-gnome-authentication-agent-1:4285): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
Xlib:  extension "VMWARE_CTRL" missing on display ":2".

** (gnome-settings-daemon:4267): WARNING **: Connection failed, reconnecting...

** (gnome-settings-daemon:4267): WARNING **: Connection failed, reconnecting...
me@server:~/.vnc$

------------更新2 ------------------

在/ etc / inittab中将运行级别从3设置为5似乎已经有效!!

------------更新3 ------------------

虽然情况比较好,但我不得不逐步安装Gnome。例如,在我浏览文件之前,我必须'yum install nautilus',然后我必须'yum install gnome-apps',这样我就可以获得垃圾桶和桌面图标。

在我通过gnome访问终端之前,我必须'yum install gnome-terminal'。

我无法安装“Gnome桌面环境”,因为我认为我们已被锁定在虚拟化企业平台上,但我已设法安装gdm,gnome-session,gnome-terminal,nautilus和gnome-apps。

1 个答案:

答案 0 :(得分:0)

您要连接哪个端口?默认情况下,vnc连接到端口5900 + N,其中N是xorg显示的编号。

如果您没有明确设置端口,则很可能您的客户端连接到下一个可用的未占用xorg显示器,即5001。

如果要连接到已在运行的显示器,请明确连接到端口5100,或使用x11vnc