[BUG] Linux: in-app self-update always fails for .deb installs in /opt/unigetui (swap helper runs without elevation)

Open
#5,685 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
43/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp, debian, linux
Domain
desktop, devops

Research direction

Start by locating the Linux swap helper embedded in the UniGetUI binary and the self-update flow that invokes it; the issue does not name source files or tests. Check how updates are handled for root-owned /opt/unigetui installs and whether dpkg-managed installs have a supported update path. Done means the reported .deb update no longer fails silently and the installed package state is handled correctly.

Written by the indexing model from the issue text.

Description

bug priority: medium
Please confirm these before moving forward
  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).
UniGetUI Version

2026.3.1 (official .deb), updating to 2026.3.3. The swap helper is unchanged in 2026.3.3.

Windows version, edition, and architecture

Linux Mint 22.3 (Ubuntu 24.04 base), Cinnamon, x86_64, kernel 7.0.0-42-generic. Seen on two different machines.

Describe your issue

When UniGetUI is installed from the official .deb package (which installs to /opt/unigetui, owned by root), the in-app self-update never works:

  1. The update notification appears and I click Update now.
  2. UniGetUI downloads UniGetUI Updater.tar.gz to ~/.local/share/UniGetUI/ and extracts it to ~/.local/share/UniGetUI/update-staging/<guid>/. This step works, and the staged binary is 2026.3.3.
  3. UniGetUI closes, then reopens still on 2026.3.1 and says the update could not be installed.

Root cause (as far as I can tell): the Linux swap helper script embedded in the binary runs as the current (non-root) user and does:

rm -rf "$dir.old"
if mv "$dir" "$dir.old"; then
  if mv "$newroot" "$dir"; then
  ...
  else
    rm -rf "$dir"
    mv "$dir.old" "$dir"

With $dir = /opt/unigetui and /opt being root:root 755, mv /opt/unigetui /opt/unigetui.old fails with "permission denied". The helper then relaunches the old version. No sudo/pkexec prompt is shown, and the system journal has no elevation request from UniGetUI around the update.

There is also a second problem: even if the swap worked (e.g., with elevation), replacing /opt/unigetui behind dpkg's back would leave dpkg -l unigetui reporting the old version.

Steps to reproduce the issue
  1. Install UniGetUI.linux-x64.deb 2026.3.1 with sudo apt install ./UniGetUI.linux-x64.deb.
  2. Launch UniGetUI as a normal user.
  3. When the update to 2026.3.3 is offered, click Update now.
  4. UniGetUI restarts on 2026.3.1 and reports that the update failed. ~/.local/share/UniGetUI/update-staging/ still holds the extracted 2026.3.3 files, and no /opt/unigetui.old exists.

Workaround: download the new .deb and run sudo apt install ./UniGetUI.linux-x64.deb. That works fine.

UniGetUI Log
Not captured during the failed attempt. I can attach it if needed.
Package Managers Logs
Not relevant (the failure is in UniGetUI's own self-updater, not in a package manager operation).
Relevant information

Suggested fix: when the app runs from a directory the user cannot write to (or when it was installed by dpkg/rpm), either:

  • download the matching .deb/.rpm and install it via pkexec apt install ./file.deb (or the equivalent), or
  • run the swap helper through the existing elevation path (pkexec / sudo -A with askpass), or at least
  • skip self-update and show "Update via your package manager / download the new .deb" instead of failing silently.
Screenshots and videos

No response

Dominant language
C#
Stars
26.8k
Forks
970
Avg merge
17h 39m
Merged PRs (30d)
132

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Devolutions/UniGetUI

All issues in Devolutions/UniGetUI

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.