Repository navigation
Conversation
- Add dde-session-environment.service (oneshot, Before=graphical-session-pre.target) to inject XDG_CURRENT_DESKTOP=DDE into systemd user manager and D-Bus activation environment early, preventing a race where xdg-desktop-portal starts before EnvironmentsManager::init() runs and FileChooser interface is missing. - Add dde-session-environment.sh script with error handling (both commands run, exit code reports failure if either fails). - Add RefuseManualStart/RefuseManualStop/CollectMode for consistency with existing services. - Install service into graphical-session-pre.target.wants/ for auto-pull. - Add comment in main.cpp explaining the relationship between the early service and EnvironmentsManager::init(). PMS: https://pms.uniontech.com/bug-view-382063.html Log: 在 graphical-session-pre.target 之前注入 XDG_CURRENT_DESKTOP=DDE,修复门户前端启动竞态 Influence: 修复冷启动后 Electron 应用选择文件夹闪退问题
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's Guide通过新增并提前启动 systemd user oneshot 服务,将 XDG_CURRENT_DESKTOP=DDE 同时注入 user manager 与 D-Bus activation 环境,从启动时序上避免 xdg-desktop-portal 竞态;原有会话初始化继续负责完整环境变量配置及当前进程的 qputenv。 Sequence diagram for early desktop environment injectionsequenceDiagram
participant Session as dde-session
participant Systemd as systemd_user_manager
participant EnvService as dde-session-environment.service
participant Script as dde-session-environment.sh
participant DBus as D-Bus_activation_environment
participant Portal as xdg-desktop-portal
participant EnvManager as EnvironmentsManager
EnvService->>Script: execute
Script->>Systemd: set-environment XDG_CURRENT_DESKTOP=DDE
Script->>DBus: dbus-update-activation-environment XDG_CURRENT_DESKTOP=DDE
EnvService-->>Systemd: complete before graphical-session-pre.target
Systemd->>Portal: activate with XDG_CURRENT_DESKTOP=DDE
Session->>EnvManager: init()
EnvManager->>Session: set full environment and qputenv()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复说明
开机后
XDG_CURRENT_DESKTOP环境变量注入晚于门户前端(xdg-desktop-portal)启动,导致FileChooser接口缺失,Electron 应用选择文件夹时整窗闪退。变更内容
dde-session-environment.service(oneshot),在graphical-session-pre.target之前执行,提前将XDG_CURRENT_DESKTOP=DDE注入 systemd user manager 和 D-Bus activation environmentdde-session-environment.sh脚本,通过systemctl --user set-environment和dbus-update-activation-environment设置环境变量main.cpp中添加注释说明环境变量的双重注入策略关联
Summary by Sourcery
Inject XDG_CURRENT_DESKTOP=DDE earlier in the user session to prevent xdg-desktop-portal startup races.
Bug Fixes:
Enhancements:
Build: