dev-vnc 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dev_vnc-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2026 Henry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
dev_vnc-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,281 @@
1
+ Metadata-Version: 2.4
2
+ Name: dev-vnc
3
+ Version: 1.0.0
4
+ Summary: 通用开发用远程桌面服务 - 用于 SSH 远程连接时的 GUI 应用调试
5
+ Author-email: Henry <henry@example.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/HenryHenry-Space/dev-vnc
8
+ Project-URL: Repository, https://github.com/HenryHenry-Space/dev-vnc
9
+ Project-URL: Documentation, https://github.com/HenryHenry-Space/dev-vnc/blob/main/README.md
10
+ Keywords: vnc,remote-desktop,development,gui,novnc,xvfb
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Desktop Environment
23
+ Classifier: Topic :: System :: Systems Administration
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0; extra == "dev"
29
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
30
+ Requires-Dist: black>=23.0; extra == "dev"
31
+ Requires-Dist: isort>=5.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.0; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # Dev VNC Server
36
+
37
+ 🖥️ 通用开发用远程桌面服务 - 用于 SSH 远程连接时的 GUI 应用调试
38
+ 🖥️ A general-purpose remote desktop service for development, designed for GUI debugging over SSH
39
+
40
+ ## 功能特点 / Features
41
+
42
+ - 🚀 一键启动虚拟桌面环境 / One-click virtual desktop startup
43
+ - 🌐 支持浏览器访问 (noVNC) / Browser access via noVNC
44
+ - 🔌 支持 VNC 客户端连接 / VNC client support
45
+ - ⚙️ 可配置分辨率、端口、窗口管理器 / Configurable resolution, ports, and window manager
46
+ - 🐍 提供 Python CLI 接口 / Python CLI included
47
+ - 📦 易于安装和管理 / Easy to install and manage
48
+
49
+ ## 快速开始 / Quick Start
50
+
51
+ ### 安装 / Install
52
+
53
+ ```bash
54
+ # 克隆项目 / Clone repository
55
+ cd /home/henry/workspace/dev_app_vnc
56
+
57
+ # 运行安装脚本 / Run install script
58
+ ./scripts/install.sh
59
+ ```
60
+
61
+ ### 使用 / Usage
62
+
63
+ ```bash
64
+ # 启动远程桌面 / Start remote desktop
65
+ dev-vnc start
66
+
67
+ # 查看状态 / Show status
68
+ dev-vnc status
69
+
70
+ # 查看访问信息 / Show access info
71
+ dev-vnc info
72
+
73
+ # 在 VNC 环境中运行程序 / Run command in VNC
74
+ dev-vnc run python my_gui_app.py
75
+
76
+ # 停止服务 / Stop service
77
+ dev-vnc stop
78
+ ```
79
+
80
+ ## 访问方式 / Access
81
+
82
+ ### 浏览器访问 (推荐) / Browser (recommended)
83
+
84
+ 启动服务后,打开浏览器访问 / After starting the service, open in browser:
85
+ - `http://localhost:6080/vnc.html`
86
+ - `http://<服务器IP>:6080/vnc.html`
87
+
88
+ ### VNC 客户端 / VNC Client
89
+
90
+ 使用任意 VNC 客户端连接 / Connect with any VNC client:
91
+ - 地址 / Address: `localhost:5999` 或 `<服务器IP>:5999`
92
+ - 密码 / Password: `devvnc123` (可配置 / configurable)
93
+
94
+ ## 配置 / Configuration
95
+
96
+ ### 配置文件 / Config file
97
+
98
+ 配置文件位于 `~/.config/dev-vnc/config.env` / Config file location: `~/.config/dev-vnc/config.env`
99
+
100
+ ```bash
101
+ # 显示器编号 / Display number
102
+ DEV_VNC_DISPLAY=99
103
+
104
+ # VNC 端口 / VNC port
105
+ DEV_VNC_PORT=5999
106
+
107
+ # noVNC Web 端口 / noVNC web port
108
+ DEV_VNC_NOVNC_PORT=6080
109
+
110
+ # 分辨率 / Resolution
111
+ DEV_VNC_RESOLUTION=1920x1080x24
112
+
113
+ # VNC 密码 / VNC password
114
+ DEV_VNC_PASSWORD=devvnc123
115
+
116
+ # 窗口管理器 (fluxbox, openbox, i3) / Window manager
117
+ DEV_VNC_WM=fluxbox
118
+ ```
119
+
120
+ ### 环境变量 / Environment variables
121
+
122
+ 也可以通过环境变量覆盖配置 / Override with environment variables:
123
+
124
+ ```bash
125
+ DEV_VNC_RESOLUTION=2560x1440x24 dev-vnc start
126
+ ```
127
+
128
+ ## 命令参考 / Command reference
129
+
130
+ | 命令 / Command | 说明 / Description |
131
+ |------|------|
132
+ | `dev-vnc start` | 启动远程桌面服务 / Start remote desktop |
133
+ | `dev-vnc stop` | 停止远程桌面服务 / Stop remote desktop |
134
+ | `dev-vnc restart` | 重启服务 / Restart service |
135
+ | `dev-vnc status` | 显示服务状态 / Show status |
136
+ | `dev-vnc info` | 显示访问信息 / Show access info |
137
+ | `dev-vnc logs [type]` | 显示日志 (vnc/novnc/all) / Show logs |
138
+ | `dev-vnc run <cmd>` | 在 VNC 环境中运行命令 / Run command in VNC |
139
+ | `dev-vnc config` | 显示当前配置 / Show configuration |
140
+ | `dev-vnc install-deps` | 安装系统依赖 / Install dependencies |
141
+ | `dev-vnc help` | 显示帮助信息 / Show help |
142
+
143
+ ## Python CLI
144
+
145
+ 也可以使用 Python CLI / You can also use the Python CLI:
146
+
147
+ ```bash
148
+ # 安装 / Install
149
+ pip install -e .
150
+
151
+ # 使用 / Usage
152
+ devvnc start
153
+ devvnc status
154
+ devvnc run python my_app.py
155
+ ```
156
+
157
+ ## 系统要求 / System requirements
158
+
159
+ ### 支持的操作系统 / Supported OS
160
+
161
+ - Ubuntu / Debian
162
+ - Fedora / CentOS / RHEL
163
+ - Arch Linux
164
+
165
+ ### 依赖 / Dependencies
166
+
167
+ - Xvfb
168
+ - x11vnc
169
+ - fluxbox (或其他窗口管理器)
170
+ - noVNC
171
+ - websockify
172
+ - Python 3.8+
173
+
174
+ ## 典型使用场景 / Typical use cases
175
+
176
+ ### 远程 GUI 开发 / Remote GUI development
177
+
178
+ 在 SSH 连接的远程服务器上调试 GUI 应用 / Debug GUI apps over SSH:
179
+
180
+ ```bash
181
+ # SSH 连接到服务器 / SSH into server
182
+ ssh user@server
183
+
184
+ # 启动远程桌面 / Start remote desktop
185
+ dev-vnc start
186
+
187
+ # 在本地浏览器打开 / Open in local browser
188
+
189
+ # 运行 GUI 应用 / Run GUI app
190
+ dev-vnc run python my_gui_app.py
191
+ ```
192
+
193
+ ### CI/CD 中的 GUI 测试 / GUI testing in CI/CD
194
+
195
+ 在无头环境中运行 GUI 测试 / Run GUI tests in headless environments:
196
+
197
+ ```bash
198
+ # 启动虚拟桌面 / Start virtual desktop
199
+ dev-vnc start
200
+
201
+ # 运行 GUI 测试 / Run GUI tests
202
+ dev-vnc run pytest tests/gui/
203
+ ```
204
+
205
+ ### 容器中的 GUI 应用 / GUI apps in containers
206
+
207
+ 在 Docker 容器中运行 GUI 应用 / Run GUI apps in Docker:
208
+
209
+ ```dockerfile
210
+ FROM ubuntu:22.04
211
+
212
+ # 安装依赖 / Install dependencies
213
+ RUN apt-get update && apt-get install -y \
214
+ xvfb x11vnc fluxbox novnc websockify
215
+
216
+ # 复制 dev-vnc / Copy dev-vnc
217
+ COPY . /app/dev-vnc
218
+ RUN /app/dev-vnc/scripts/install.sh
219
+
220
+ EXPOSE 5999 6080
221
+
222
+ CMD ["dev-vnc", "start"]
223
+ ```
224
+
225
+ ## 项目结构 / Project structure
226
+
227
+ ```
228
+ dev_app_vnc/
229
+ ├── README.md
230
+ ├── pyproject.toml
231
+ ├── config/
232
+ │ └── config.env.example
233
+ ├── devvnc/
234
+ │ ├── __init__.py
235
+ │ ├── cli.py
236
+ │ ├── server.py
237
+ │ └── config.py
238
+ ├── scripts/
239
+ │ ├── dev-vnc-server.sh
240
+ │ └── install.sh
241
+ ├── tests/
242
+ │ └── test_server.py
243
+ └── docs/
244
+ └── ...
245
+ ```
246
+
247
+ ## 故障排除 / Troubleshooting
248
+
249
+ ### 服务无法启动 / Service won't start
250
+
251
+ 1. 检查依赖是否安装 / Check dependencies:
252
+ ```bash
253
+ dev-vnc install-deps
254
+ ```
255
+
256
+ 2. 检查端口是否被占用 / Check port usage:
257
+ ```bash
258
+ netstat -tlnp | grep -E '5999|6080'
259
+ ```
260
+
261
+ 3. 查看日志 / View logs:
262
+ ```bash
263
+ dev-vnc logs
264
+ ```
265
+
266
+ ### 无法连接 / Cannot connect
267
+
268
+ 1. 检查防火墙设置 / Check firewall:
269
+ ```bash
270
+ sudo ufw allow 5999
271
+ sudo ufw allow 6080
272
+ ```
273
+
274
+ 2. 确认服务正在运行 / Confirm service is running:
275
+ ```bash
276
+ dev-vnc status
277
+ ```
278
+
279
+ ## License
280
+
281
+ MIT License
@@ -0,0 +1,247 @@
1
+ # Dev VNC Server
2
+
3
+ 🖥️ 通用开发用远程桌面服务 - 用于 SSH 远程连接时的 GUI 应用调试
4
+ 🖥️ A general-purpose remote desktop service for development, designed for GUI debugging over SSH
5
+
6
+ ## 功能特点 / Features
7
+
8
+ - 🚀 一键启动虚拟桌面环境 / One-click virtual desktop startup
9
+ - 🌐 支持浏览器访问 (noVNC) / Browser access via noVNC
10
+ - 🔌 支持 VNC 客户端连接 / VNC client support
11
+ - ⚙️ 可配置分辨率、端口、窗口管理器 / Configurable resolution, ports, and window manager
12
+ - 🐍 提供 Python CLI 接口 / Python CLI included
13
+ - 📦 易于安装和管理 / Easy to install and manage
14
+
15
+ ## 快速开始 / Quick Start
16
+
17
+ ### 安装 / Install
18
+
19
+ ```bash
20
+ # 克隆项目 / Clone repository
21
+ cd /home/henry/workspace/dev_app_vnc
22
+
23
+ # 运行安装脚本 / Run install script
24
+ ./scripts/install.sh
25
+ ```
26
+
27
+ ### 使用 / Usage
28
+
29
+ ```bash
30
+ # 启动远程桌面 / Start remote desktop
31
+ dev-vnc start
32
+
33
+ # 查看状态 / Show status
34
+ dev-vnc status
35
+
36
+ # 查看访问信息 / Show access info
37
+ dev-vnc info
38
+
39
+ # 在 VNC 环境中运行程序 / Run command in VNC
40
+ dev-vnc run python my_gui_app.py
41
+
42
+ # 停止服务 / Stop service
43
+ dev-vnc stop
44
+ ```
45
+
46
+ ## 访问方式 / Access
47
+
48
+ ### 浏览器访问 (推荐) / Browser (recommended)
49
+
50
+ 启动服务后,打开浏览器访问 / After starting the service, open in browser:
51
+ - `http://localhost:6080/vnc.html`
52
+ - `http://<服务器IP>:6080/vnc.html`
53
+
54
+ ### VNC 客户端 / VNC Client
55
+
56
+ 使用任意 VNC 客户端连接 / Connect with any VNC client:
57
+ - 地址 / Address: `localhost:5999` 或 `<服务器IP>:5999`
58
+ - 密码 / Password: `devvnc123` (可配置 / configurable)
59
+
60
+ ## 配置 / Configuration
61
+
62
+ ### 配置文件 / Config file
63
+
64
+ 配置文件位于 `~/.config/dev-vnc/config.env` / Config file location: `~/.config/dev-vnc/config.env`
65
+
66
+ ```bash
67
+ # 显示器编号 / Display number
68
+ DEV_VNC_DISPLAY=99
69
+
70
+ # VNC 端口 / VNC port
71
+ DEV_VNC_PORT=5999
72
+
73
+ # noVNC Web 端口 / noVNC web port
74
+ DEV_VNC_NOVNC_PORT=6080
75
+
76
+ # 分辨率 / Resolution
77
+ DEV_VNC_RESOLUTION=1920x1080x24
78
+
79
+ # VNC 密码 / VNC password
80
+ DEV_VNC_PASSWORD=devvnc123
81
+
82
+ # 窗口管理器 (fluxbox, openbox, i3) / Window manager
83
+ DEV_VNC_WM=fluxbox
84
+ ```
85
+
86
+ ### 环境变量 / Environment variables
87
+
88
+ 也可以通过环境变量覆盖配置 / Override with environment variables:
89
+
90
+ ```bash
91
+ DEV_VNC_RESOLUTION=2560x1440x24 dev-vnc start
92
+ ```
93
+
94
+ ## 命令参考 / Command reference
95
+
96
+ | 命令 / Command | 说明 / Description |
97
+ |------|------|
98
+ | `dev-vnc start` | 启动远程桌面服务 / Start remote desktop |
99
+ | `dev-vnc stop` | 停止远程桌面服务 / Stop remote desktop |
100
+ | `dev-vnc restart` | 重启服务 / Restart service |
101
+ | `dev-vnc status` | 显示服务状态 / Show status |
102
+ | `dev-vnc info` | 显示访问信息 / Show access info |
103
+ | `dev-vnc logs [type]` | 显示日志 (vnc/novnc/all) / Show logs |
104
+ | `dev-vnc run <cmd>` | 在 VNC 环境中运行命令 / Run command in VNC |
105
+ | `dev-vnc config` | 显示当前配置 / Show configuration |
106
+ | `dev-vnc install-deps` | 安装系统依赖 / Install dependencies |
107
+ | `dev-vnc help` | 显示帮助信息 / Show help |
108
+
109
+ ## Python CLI
110
+
111
+ 也可以使用 Python CLI / You can also use the Python CLI:
112
+
113
+ ```bash
114
+ # 安装 / Install
115
+ pip install -e .
116
+
117
+ # 使用 / Usage
118
+ devvnc start
119
+ devvnc status
120
+ devvnc run python my_app.py
121
+ ```
122
+
123
+ ## 系统要求 / System requirements
124
+
125
+ ### 支持的操作系统 / Supported OS
126
+
127
+ - Ubuntu / Debian
128
+ - Fedora / CentOS / RHEL
129
+ - Arch Linux
130
+
131
+ ### 依赖 / Dependencies
132
+
133
+ - Xvfb
134
+ - x11vnc
135
+ - fluxbox (或其他窗口管理器)
136
+ - noVNC
137
+ - websockify
138
+ - Python 3.8+
139
+
140
+ ## 典型使用场景 / Typical use cases
141
+
142
+ ### 远程 GUI 开发 / Remote GUI development
143
+
144
+ 在 SSH 连接的远程服务器上调试 GUI 应用 / Debug GUI apps over SSH:
145
+
146
+ ```bash
147
+ # SSH 连接到服务器 / SSH into server
148
+ ssh user@server
149
+
150
+ # 启动远程桌面 / Start remote desktop
151
+ dev-vnc start
152
+
153
+ # 在本地浏览器打开 / Open in local browser
154
+
155
+ # 运行 GUI 应用 / Run GUI app
156
+ dev-vnc run python my_gui_app.py
157
+ ```
158
+
159
+ ### CI/CD 中的 GUI 测试 / GUI testing in CI/CD
160
+
161
+ 在无头环境中运行 GUI 测试 / Run GUI tests in headless environments:
162
+
163
+ ```bash
164
+ # 启动虚拟桌面 / Start virtual desktop
165
+ dev-vnc start
166
+
167
+ # 运行 GUI 测试 / Run GUI tests
168
+ dev-vnc run pytest tests/gui/
169
+ ```
170
+
171
+ ### 容器中的 GUI 应用 / GUI apps in containers
172
+
173
+ 在 Docker 容器中运行 GUI 应用 / Run GUI apps in Docker:
174
+
175
+ ```dockerfile
176
+ FROM ubuntu:22.04
177
+
178
+ # 安装依赖 / Install dependencies
179
+ RUN apt-get update && apt-get install -y \
180
+ xvfb x11vnc fluxbox novnc websockify
181
+
182
+ # 复制 dev-vnc / Copy dev-vnc
183
+ COPY . /app/dev-vnc
184
+ RUN /app/dev-vnc/scripts/install.sh
185
+
186
+ EXPOSE 5999 6080
187
+
188
+ CMD ["dev-vnc", "start"]
189
+ ```
190
+
191
+ ## 项目结构 / Project structure
192
+
193
+ ```
194
+ dev_app_vnc/
195
+ ├── README.md
196
+ ├── pyproject.toml
197
+ ├── config/
198
+ │ └── config.env.example
199
+ ├── devvnc/
200
+ │ ├── __init__.py
201
+ │ ├── cli.py
202
+ │ ├── server.py
203
+ │ └── config.py
204
+ ├── scripts/
205
+ │ ├── dev-vnc-server.sh
206
+ │ └── install.sh
207
+ ├── tests/
208
+ │ └── test_server.py
209
+ └── docs/
210
+ └── ...
211
+ ```
212
+
213
+ ## 故障排除 / Troubleshooting
214
+
215
+ ### 服务无法启动 / Service won't start
216
+
217
+ 1. 检查依赖是否安装 / Check dependencies:
218
+ ```bash
219
+ dev-vnc install-deps
220
+ ```
221
+
222
+ 2. 检查端口是否被占用 / Check port usage:
223
+ ```bash
224
+ netstat -tlnp | grep -E '5999|6080'
225
+ ```
226
+
227
+ 3. 查看日志 / View logs:
228
+ ```bash
229
+ dev-vnc logs
230
+ ```
231
+
232
+ ### 无法连接 / Cannot connect
233
+
234
+ 1. 检查防火墙设置 / Check firewall:
235
+ ```bash
236
+ sudo ufw allow 5999
237
+ sudo ufw allow 6080
238
+ ```
239
+
240
+ 2. 确认服务正在运行 / Confirm service is running:
241
+ ```bash
242
+ dev-vnc status
243
+ ```
244
+
245
+ ## License
246
+
247
+ MIT License