查看: 93|回复: 0

deepin安装vnc服务

[复制链接]

2

主题

0

回帖

0

积分

热心网友

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2009-5-3
发表于 2020-5-21 09:53:00 | 显示全部楼层 |阅读模式

测试环境

  • deepin 20.3, deepin 20.9

安装x11vnc

sudo apt install x11vnc

设置x11vnc密码

  • 设置密码
    x11vnc -storepasswd
  • 复制到系统目录
    sudo mv ~/.vnc/passwd /etc/x11vnc.pwd

创建服务

sudo vim /etc/systemd/system/x11vnc.service

[Unit]
Description=Remote desktop service (VNC)
Requires=display-manager.service
After=display-manager.service
 
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared
ExecStop=/usr/bin/killall x11vnc
 
[Install]
WantedBy=multi-user.target

启动服务

  • 刷新服务配置
    sudo systemctl daemon-reload
  • 启动服务
    sudo systemctl restart x11vnc
  • 服务设置为自启动
    sudo systemctl enable x11vnc

查看服务状态

启动成功见以下提示
sudo systemctl status x11vnc

● x11vnc.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/x11vnc.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2022-01-14 23:48:25 CST; 6s ago
 Main PID: 10169 (x11vnc)
    Tasks: 1 (limit: 4915)
   Memory: 6.1M
   CGroup: /system.slice/x11vnc.service
           └─10169 /usr/bin/x11vnc -auth guess -forever -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared

1月 14 23:48:29 john-PC x11vnc[10169]: 14/01/2022 23:48:29
1月 14 23:48:29 john-PC x11vnc[10169]: The VNC desktop is:      john-PC:0
1月 14 23:48:29 john-PC x11vnc[10169]: PORT=5900
1月 14 23:48:29 john-PC x11vnc[10169]: ******************************************************************************
1月 14 23:48:29 john-PC x11vnc[10169]: Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
1月 14 23:48:29 john-PC x11vnc[10169]: The scheme stores pixel data offscreen on the VNC viewer side for faster
1月 14 23:48:29 john-PC x11vnc[10169]: retrieval.  It should work with any VNC viewer.  Try it by running:
1月 14 23:48:29 john-PC x11vnc[10169]:     x11vnc -ncache 10 ...
1月 14 23:48:29 john-PC x11vnc[10169]: One can also add -ncache_cr for smooth 'copyrect' window motion.
1月 14 23:48:29 john-PC x11vnc[10169]: More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

使用vnc viewer远程

  • 下载地址:
    https://www.realvnc.com/

  • 深度商店下载,搜索realvnc



来源:https://www.cnblogs.com/jiftle/p/12928697.html
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

圆梦公社,专注于为全球华人提供纯粹技术交流的地方,请勿发布任何政治及违法的言论。如有相关侵权、举报、投诉及建议等,请发 E-mail:dzh188@hotmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部