Debian8.3VNC连接后灰屏幕[已解决:变相方案]
发表于 : 2016-03-02 13:32
Debian DVD安装的,桌面环境选的是Gnome
安装了 vnc4server
VNC客户端连接显示 .vnc/xstartup配置文件内容 网上能查看的各种方法都试过了,还是没用呀。
安装了 vnc4server
VNC客户端连接显示 .vnc/xstartup配置文件内容 网上能查看的各种方法都试过了,还是没用呀。
代码: 全选
ls -l /etc/alternatives/x-window-manager
代码: 全选
/etc/X11/Xsession &
代码: 全选
gnome-session &
代码: 全选
gnome-session-fallback &
代码: 全选
gnome-session --session=gnome-fallback &
請提供VNC客户端
代码: 全选
drwxr-xr-x 2 losdab losdab 4096 3月 2 19:17 .
drwxr-xr-x 20 losdab losdab 4096 3月 2 19:16 ..
-rw-r--r-- 1 losdab losdab 1581 3月 2 19:16 bis-losdab-debian:1.log
-rw-r--r-- 1 losdab losdab 4 3月 2 19:16 bis-losdab-debian:1.pid
-rw-r--r-- 1 losdab losdab 870 3月 2 12:36 bis-losdab-debian:2.log
-rw------- 1 losdab losdab 8 3月 2 10:03 passwd
-rwxr-xr-x 1 losdab losdab 361 3月 2 13:28 xstartup
-rwxr-xr-x 1 losdab losdab 377 3月 2 13:38 xstartup.save
代码: 全选
losdab@bis-losdab-debian:~$ ls -l /etc/alternatives/x-window-manager
lrwxrwxrwx 1 root root 15 3月 2 08:20 /etc/alternatives/x-window-manager -> /usr/bin/mutter
代码: 全选
#!/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 &
#/etc/X11/Xsession &
#gnome-session &
#gnome-session-fallback &
gnome-session --session=gnome-fallback &
代码: 全选
losdab@bis-losdab-debian:~$ sudo lshw -numeric -class video
*-display
description: VGA compatible controller
product: GF106 [GeForce GTS 450] [10DE:DC6]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nouveau latency=0
resources: irq:44 memory:f4000000-f4ffffff memory:e0000000-e7ffffff memory:e8000000-e9ffffff ioport:e000(size=128) memory:f6000000-f607ffff
代码: 全选
#!/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 &
#/etc/X11/Xsession &
#gnome-session &
#gnome-session-fallback &
gnome-session --session=gnome-fallback &
代码: 全选
Xvnc Free Edition 4.1.1 - built Apr 2 2015 21:54:27
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40300000, The XFree86 Project, Inc
Wed Mar 2 19:39:19 2016
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
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!
gnome-session-is-accelerated: No composite extension.
gnome-session-check-accelerated: Helper exited with code 256
gnome-session-is-accelerated: No composite extension.
gnome-session-check-accelerated: Helper exited with code 256
** (process:2200): WARNING **: software acceleration check failed: Child process exited with code 1
Wed Mar 2 19:39:34 2016
Connections: accepted: 0.0.0.0::53766
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VncAuth(2)
Wed Mar 2 19:39:36 2016
VNCSConnST: Server default pixel format depth 16 (16bpp) little-endian rgb565
VNCSConnST: Client pixel format depth 6 (8bpp) rgb222
VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565
Wed Mar 2 19:39:40 2016
Connections: closed: 0.0.0.0::53766 (Clean disconnection)
SMsgWriter: framebuffer updates 26
SMsgWriter: hextile rects 25, bytes 61284
SMsgWriter: ZRLE rects 2, bytes 3352
SMsgWriter: raw bytes equivalent 4048618, compression ratio 62.637199
1. 你的 Server 端 顯卡硬件/驅動 必須支援 3D桌面环境选的是Gnome
安装了 vnc4server
1-1. 如果上述顯卡驅動是 Server 端sudo lshw -numeric -class video
configuration: driver=nouveau latency=0
被登录的那个系统是Debian8.3DVD安装的选的是Gnome环境。
2. 沒有查到 VNC Viewer for windows 支援 3D 的資料VPN的客户端就是这个了
VNC Viewer for windows
3. Windows 支援 3D 但是基於 Direct3DVPN的客户端 操作系统是 win8.1 amd64
4. 2D 支援良好 3D 可能無法充分支援我在 Debian 8 用 GNOME3 弄 VNC 也不行,KDE也不行,改用 Xfce 或者 MATE 桌面就好了。
代码: 全选
aptitude install gnome-panel
代码: 全选
#!/bin/sh
#unset SESSION_MANAGER
#unset DBUS_SESSION_BUS_ADDRESS
#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-flashback &
gnome-panel &
代码: 全选
#!/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 &
xfce4-session &
如果你执行了losdab 写了:最终安装了Xfce桌面解决了问题。
还是需要修改xstartup
把x-window-manager & 替换成 xfce4-session &
修改后如下:
代码: 全选
#!/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 & xfce4-session &
还有其他方案,因为我不知道x-session-manager是不是还有其他的地方要调用,所以不敢修改,不过可以修改这里。zhangjint5 写了: 如果你执行了
sudo ln -f -s /usr/bin/xfce4-session /etc/alternatives/x-session-manager
把xfce设置成默认session就不用手工修改每用户的.xstartup了
我以前也是改.xstartup,后来创建了很多的账号和桌面分别给别人用,一个一个用户的改.xstartup太麻烦了,后来就改用这种方法了!
代码: 全选
$defaultXStartup
= ("#!/bin/sh\n\n".
"# Uncomment the following two lines for normal desktop:\n".
"# unset SESSION_MANAGER\n".
"# exec /etc/X11/xinit/xinitrc\n\n".
"[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
"[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
"xsetroot -solid grey\n".
"vncconfig -iconic &\n".
"x-terminal-emulator -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
"#x-window-manager &\n".
"xfce4-session &\n");
我的意思是我不知道x-session-manager这个东西到底是做什么用的从字面意思理解是图形会话管理,但是还是不明白zhangjint5 写了:嗯 看个人喜好了
系统原始 /etc/alternatives/x-session-manager 就只是一个软连接而已,如果你没有装 GNOME,只有xfce,那么他就是指向 xfce 的
再说了,软连接而已,出了问题大不了在连接回 GNOME 上。
/etc/alternatives/ 下几乎全部都是软连接,这个目录功能就是当同一种类型软件装了不同版本时指定默认版本