syn*_*sis 5 shutdown debian display x11vnc
我正在运行 Linux (Debian)。我最近在我的电脑上安装了 x11VNC 服务器。我发现启动服务器的命令是:
x11vnc -display :0
Run Code Online (Sandbox Code Playgroud)
我一直在搜索,但没有找到有关如何重新启动和关闭 x11VNC 服务器的任何信息。是否有执行此操作的命令?
ted*_*ted 13
既然你知道如何启动服务器,这里有一种优雅地停止它的方法:
x11vnc -R stop
Run Code Online (Sandbox Code Playgroud)
基本上,您向-remote
正在运行的实例发送一个远程命令(请参阅 参考资料)。
如果您正在使用,systemd
您应该能够将其设置为服务。我发现这个线程显示了设置x11vnc
为 Systemd 服务的类似任务。该线程的标题为:索引»新手角»如何在启动时使用 systemd 启用 x11vnc?.
来自该线程的评论
创建文件: /etc/systemd/system/x11vnc.service
[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=display-manager.service
[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -norc -forever -shared -bg -rfbauth /etc/x11vnc.pass -allow 192.168.1. -autoport 5900 -o /var/log/x11vnc.log
Run Code Online (Sandbox Code Playgroud)创建文件: /etc/systemd/system/graphical.target
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Graphical Interface
Documentation=man:systemd.special(7)
Requires=multi-user.target
After=multi-user.target
Conflicts=rescue.target
Wants=display-manager.service
Wants=x11vnc.service
AllowIsolate=yes
[Install]
Alias=default.target
Run Code Online (Sandbox Code Playgroud)启用 Systemd 服务
$ sudo systemctl enable graphical.target
Run Code Online (Sandbox Code Playgroud)
这应该创建一个这样的链接:
/etc/systemd/system/default.target -> /etc/systemd/system/graphical.target
重启
归档时间: |
|
查看次数: |
44953 次 |
最近记录: |