首页操作系统Ubuntu下开启vnc的tip方法

Ubuntu下开启vnc的tip方法

时间2024-03-13 01:35:03发布访客分类操作系统浏览738
导读:收集整理的这篇文章主要介绍了Ubuntu下开启vnc的tip方法,觉得挺不错的,现在分享给大家,也给大家做个参考。 安装方法复制代码代码如下:sudo apt-get install VNC4server vnc-java默认端口...
收集整理的这篇文章主要介绍了Ubuntu下开启vnc的tip方法,觉得挺不错的,现在分享给大家,也给大家做个参考。

安装方法


复制代码代码如下:
sudo apt-get install VNC4server vnc-java

默认端口从5901开始
修改 ~/.vnc/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-server-manager &

这个配置是不能进入桌面的

把最后一行x-server-manager 修改为GNOME-session

配置文件修改后


复制代码代码如下:
# 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" &
gnome-session &

这时候重启服务即可


复制代码代码如下:
[root@fancyos ~]# vncserver -kill :1
[root@fancyos ~]# vncserver :1

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: Ubuntu下开启vnc的tip方法
本文地址: https://pptw.com/jishu/647569.html
在Ubuntu系统上使用apt-fast来加快apt-get下载的教程 升级Ubuntu Server系统版本的建议

游客 回复需填写必要信息