[ubuntu]ubuntu安装vncserver后,windows连接灰屏解决方法

修改配置文件~/.vnc/xstartup为如下内容:

bash 复制代码
#!/bin/bash
export $(dbus-launch)  
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
 
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
 
# [ -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" &
gnome-session &
 
VNCSERVERS="2:root"
VNCSERVERARGS[1]="-GEOMETRY 800×600"

tightvncser -kill :1

tightvncser :1

然后你会发现登录上去正常但是关闭窗口后就又变成灰色

其实这个是正常的,因为 tightvncser这个并不是和系统共用一套图形系统。你只需要点击左上角应用程序或者位置就可以调用文件夹了

相关推荐
平生不喜凡桃李1 天前
Linux网络:UDP
linux·网络·udp
weixiao04301 天前
Linux网络 网络层
linux·网络·智能路由器
从零开始的ops生活1 天前
【Day 80】Linux-NAS 和 SAN 存储
linux·运维·php
_Aaron___1 天前
List.subList() 返回值为什么不能强转成 ArrayList
数据结构·windows·list
Wang's Blog1 天前
Linux小课堂: 输入重定向与管道操作详解
linux·运维·服务器
迎風吹頭髮1 天前
Linux内核架构浅谈49-Linux per-CPU页面缓存:热页与冷页的管理与调度优化
linux·缓存·架构
jason.zeng@15022071 天前
centos中安装redis
linux·redis·centos
magic334165631 天前
Springboot整合MinIO文件服务(windows版本)
windows·spring boot·后端·minio·文件对象存储
w23617346011 天前
Linux 服务器安全巡检与加固:从命令到实操(CentOS/Ubuntu 通用)
linux·服务器·安全·安全加固·安全巡检
xiaogg36781 天前
阿里云k8s1.33部署yaml和dockerfile配置文件
java·linux·kubernetes