Skip to content

fix: Element issues#1379

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
enesoztrk:fix/element
Sep 12, 2025
Merged

fix: Element issues#1379
brianmcgillion merged 1 commit intotiiuae:mainfrom
enesoztrk:fix/element

Conversation

@enesoztrk
Copy link
Copy Markdown
Contributor

@enesoztrk enesoztrk commented Sep 4, 2025

Description of Changes

  • Element-web patch (Location sharing) has been disabled for now due to the version conflict with the current element-desktop
  • Latest element-desktop version tries to open an external URL to sign in/create accounts. That's why xdg handlers have been implemented.

Current issues

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

  1. Launch the element-desktop
  2. Sign in/Create an account, and it will open the URL in chrome
  3. Sign in/Create an account in chrome, and it will redirect to element-desktop app

Note: element-desktop location sharing functionality does not work for this PR.

@enesoztrk enesoztrk marked this pull request as ready for review September 8, 2025 06:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses Element desktop application issues by implementing proper XDG handlers for URL redirection and temporarily disabling the element-web patch due to version conflicts.

Key changes:

  • Element-web package temporarily disabled due to version conflicts with element-desktop
  • Added comprehensive XDG handlers for URL and Element desktop protocol handling
  • Improved element-desktop integration with proper URL redirection support

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/own-pkgs-overlay.nix Commented out element-web package due to version conflicts
overlays/custom-packages/element-desktop/element-main.patch Updated patch with new URL loading and XDG utilities integration
overlays/custom-packages/element-desktop/default.nix Enhanced element-desktop with XDG utilities and GPU/logging configuration
overlays/custom-packages/default.nix Re-enabled element-desktop overlay
modules/reference/appvms/zathura.nix Refactored XDG handlers from boolean to specific handler types
modules/reference/appvms/google-chrome.nix Removed redundant Wayland flags for consistency
modules/reference/appvms/comms.nix Added element-desktop XDG handler and logging flags
modules/microvm/common/xdgitems.nix Major refactor to support URL and Element desktop XDG handling
modules/microvm/common/xdghandlers.nix Converted from single enable flag to individual handler types
Comments suppressed due to low confidence (1)

modules/microvm/common/xdgitems.nix:1

  • Variable name confusion: filePath is being assigned the result of realpath on itself. This should be filePath=$(realpath "$file" || true) to get the real path of the original file parameter.
# Copyright 2022-2025 TII (SSRC) and the Ghaf contributors

@enesoztrk enesoztrk added the Needs Testing CI Team to pre-verify label Sep 10, 2025
* disabling element-web patch due to conflict with latest version
* xdg handler for external urls
* xdg handler for element-desktop

Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
@leivos-unikie
Copy link
Copy Markdown
Contributor

Also Orins are in the list of applicable targets. Does this mean that Element should launch also on Orins?

I checked on Orin NX that clicking the Element icon does nothing. I don't see any element related logs in journalctl or related process starting.

@leivos-unikie
Copy link
Copy Markdown
Contributor

leivos-unikie commented Sep 12, 2025

Tested on Lenovo-X1

  • Launching Element app works (just have to press "Use weaker encryption" at the pop-up)
  • Singing in to matrix server works, it opens chrome window (running in chrome-vm) for typing account credentials, then need to press "Open Ghaf Element Desktop" at pop-up on chrome to open the Element account on element app window (running in comms-vm).
  • Login state of Element app survives reboot
  • Also login state to matrix account in chrome-vm survives reboot
  • No regression found in basic GUI operation

NOTE:

  • Is it ok to launch the sign-in page on chrome in chrome-vm (less secure vm)? Could the sign-in page be launched in another chrome instance within comms-vm?

@leivos-unikie leivos-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon and removed Needs Testing CI Team to pre-verify labels Sep 12, 2025
@brianmcgillion brianmcgillion merged commit 1dfbb27 into tiiuae:main Sep 12, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants