Add environment variables editing module to Control Center (src/plugin-environment) #14202
greatjackzhou
started this conversation in
Features Request & Ideas | 特性请求 & 头脑风暴
Replies: 1 comment
|
你可以告诉你的agent自己写一个这样的控制中心模块来为你所用。控制中心本身就支持插件化扩展添加模块的。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
概述 / Overview
新增一个控制中心内置插件
plugin-environment,提供图形化的环境变量管理,读写 Linux 标准的
~/.pam_environment(用户级)与/etc/environment(系统级)。目前控制中心缺少这一入口,用户只能手工编辑文本文件。
功能 / Features
[A-Za-z_][A-Za-z0-9_]*)与写入前合法性检查qputenv+systemctl --user set/unset-environment+(系统级)helper 内
loginctl set/unset-environmentparentName: "system")集成方式 / Integration
src/plugin-environment/,官方风格插件(复用根 CMake 的${DCC_FRAME_Library}/ `### 概述 / Overview新增一个控制中心内置插件
plugin-environment,提供图形化的环境变量管理,读写 Linux 标准的
~/.pam_environment(用户级)与/etc/environment(系统级)。目前控制中心缺少这一入口,用户只能手工编辑文本文件。
功能 / Features
[A-Za-z_][A-Za-z0-9_]*)与写入前合法性检查qputenv+systemctl --user set/unset-environment+(系统级)helper 内
loginctl set/unset-environmentparentName: "system")集成方式 / Integration
src/plugin-environment/,官方风格插件(复用根 CMake 的${DCC_FRAME_Library}/${QT_NS}/${DTK_NS},插件自身不find_package)CMakeLists.txt增加一行add_subdirectory(src/plugin-environment)DCC_FACTORY_CLASS注册、dccData入口、org.deepin.dcc1.0 QMLDccObject.icon引用 freedesktop 标准主题名preferences-system,运行时由deepin-icon-theme提供需你确认 / To confirm
polkit 提权(本仓库插件首例):系统级写入
/etc/environment需要一个最小权限的 root helper(
dde-env-write)+ action policy,经pkexec授权;目标路径硬编码、单参数、原子替换。helper 安装在
/usr/libexec/dde-control-center/,其绝对路径由单一CMake 变量派生,C++ 宏、policy
exec.path注解、install 目标三处一致。请确认:是否接受插件自带 polkit policy/helper?若贵方更倾向复用某个既有的统一提权
D-Bus 服务,请告知,我改用它、不引入新 policy。
验证 / Verification
已在依赖齐备环境完成官方整树
cmake --build(配置与编译全部通过,含本插件environment/environment_qml),并在实机加载运行验证。如方向可行,我可整理为 PR(
src/plugin-environment/+ 根 CMakeLists 的一行改动)。${QT_NS}/${DTK_NS},插件自身不find_package`)CMakeLists.txt增加一行add_subdirectory(src/plugin-environment)DCC_FACTORY_CLASS注册、dccData入口、org.deepin.dcc1.0 QMLDccObject.icon引用 freedesktop 标准主题名preferences-system,运行时由deepin-icon-theme提供需你确认 / To confirm
polkit 提权(本仓库插件首例):系统级写入
/etc/environment需要一个最小权限的 root helper(
dde-env-write)+ action policy,经pkexec授权;目标路径硬编码、单参数、原子替换。helper 安装在
/usr/libexec/dde-control-center/,其绝对路径由单一CMake 变量派生,C++ 宏、policy
exec.path注解、install 目标三处一致。请确认:是否接受插件自带 polkit policy/helper?若贵方更倾向复用某个既有的统一提权
D-Bus 服务,请告知,我改用它、不引入新 policy。
验证 / Verification
已在依赖齐备环境完成官方整树
cmake --build(配置与编译全部通过,含本插件environment/environment_qml),并在实机加载运行验证。如方向可行,我可整理为 PR(
src/plugin-environment/+ 根 CMakeLists 的一行改动)。All reactions