Calamares fails to open any links (such as "Donate" or links in the "About" dialog)

Bug #1981473 reported by Leó Kolbeinsson
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Calamares
New
Unknown
calamares-settings-ubuntu (Ubuntu)
Fix Released
High
Lubuntu Developers

Bug Description

Calamares fails to open "donate" or "Lubuntu support" in the Welcome to Lubuntu installer (see attached screen shot -

When selecting either option - nothing occurs - no error message and no web site opened

Testing Lubuntu Kinectic daily ISO 12-07-2022

ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: calamares 3.3.0-alpha1-0ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
.etc.calamares.modules.after_bootloader_context.conf:
 ---
 dontChroot: false
 timeout: 120
 firmwareType:
     "*": "-rm ${ROOT}/home/${USER}/Desktop/lubuntu-calamares.desktop"
.etc.calamares.modules.finished.conf:
 ---
 restartNowMode: user-checked
 restartNowCommand: "systemctl -i reboot"
.etc.calamares.modules.fstab.conf:
 crypttabOptions: luks,keyscript=/bin/cat
 efiMountOptions: umask=0077
.etc.calamares.modules.shellprocess_logs.conf:
 ---
 dontChroot: true
 timeout: 30
 script:
     - calamares-logs-helper ${ROOT}
.etc.calamares.modules.unpackfs.conf:
 ---
 unpack:
     - source: "/cdrom/casper/filesystem.squashfs"
         sourcefs: "squashfs"
         destination: ""
ApportVersion: 2.22.0-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.472
CurrentDesktop: LXQt
Date: Tue Jul 12 18:04:03 2022
LiveMediaBuild: Lubuntu 22.10 "Kinetic Kudu" - Alpha amd64 (20220712)
RelatedPackageVersions:
 calamares-settings-ubuntu-common 1:22.10.9
 calamares-settings-lubuntu 1:22.10.9
 xfsprogs 5.16.0-1ubuntu1
 btrfs-progs 5.18.1-1
SourcePackage: calamares
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Leó Kolbeinsson (leok) wrote :
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1981473

tags: added: iso-testing
Revision history for this message
Simon Quigley (tsimonq2) wrote :

This is still an issue.

2023/12/23 22:36:28.806739 cmd_run.go:1055: WARNING: cannot start document portal: write unix @->/run/user/1000/bus: write: broken pipe
mkdir: cannot create directory ‘/run/user/0’: Permission denied
Authorization required, but no authorization protocol specified
Error: cannot open display: :0
2023/12/23 22:36:28.988120 cmd_run.go:1055: WARNING: cannot start document portal: write unix @->/run/user/1000/bus: write: broken pipe
mkdir: cannot create directory ‘/run/user/0’: Permission denied
Authorization required, but no authorization protocol specified
Error: cannot open display: :0
xdg-open: no method available for opening 'https://lubuntu.me/donate/'

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in calamares (Ubuntu):
status: New → Confirmed
Simon Quigley (tsimonq2)
Changed in calamares (Ubuntu):
importance: Undecided → High
assignee: nobody → Lubuntu Developers (lubuntu-dev)
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Sadly it sounds like this is going to be a tough problem to solve:
https://github.com/calamares/calamares/issues/1447

As one comment reads, the issue is described simply like this:

   * you have a live system, running as some user
   * calamares runs as root
   * calamares starts a web browser, which (sensibly!) refuses to run as root

summary: - Calamares fails to open "donate" or "Lubuntu support"
+ Calamares fails to open any links (such as "Donate" or links in the
+ "About" dialog)
Changed in calamares (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Calamares is ran using sudo -E

If I run `sudo -E env` on my local system, I can see this env var:
SUDO_USER=tsimonq2

Which means a `sudo -u tsimonq2 firefox` would probably do the trick

Changed in calamares:
status: Unknown → New
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

As it turns out, we were setting $BROWSER to `sudo -H -u lubuntu firefox' all the way up until Jammy:
https://git.lubuntu.me/Lubuntu/calamares-settings-ubuntu/src/branch/ubuntu/jammy/lubuntu/lubuntu-calamares.desktop.in

As you can see in the upstream bug that's mentioned in the upstream bug linked to this report, we then switched to using pkexec, which kind of ruined everything:
https://github.com/calamares/calamares/issues/1217

For Noble, we've kind of clobbered over that, too, so I put us back to setting $BROWSER, which should solve this:
https://git.lubuntu.me/Lubuntu/calamares-settings-ubuntu/commit/27850a5f222287d65ace653cf24f3eaf9995dd07
There are some other unrelated changes that will get wrapped up with this and should be released as calamares-settings-ubuntu 1:24.04.21.

We can't reasonably backport this to Mantic, but that's not too bad given it's only supported for a few more months.

In the end, this is a bit of a workaround. There is talk upstream of either changing how Calamares internally handles URLs or making it so that Calamares doesn't have to run as root.

Changed in calamares-settings-ubuntu (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Lubuntu Developers (lubuntu-dev)
milestone: none → ubuntu-24.04
no longer affects: calamares (Ubuntu)
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Fixed:

calamares-settings-ubuntu (1:24.04.21) noble; urgency=medium

  [ Simon Quigley ]
  * Revamp pkgselect and enable it for everyone (LP: #2056061).
  * Wraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaap.
  * No-network UX improvements for pkgselect (LP: #2048727).

  [ Aaron Rainbolt ]
  * Don't try to start Unity after the OEM environment exits on Ubuntu Unity,
    this has to be done by logging in via LightDM.
  * Fix a couple of goofs with post-install package purging.

  [ Walter Lapchynski ]
  * Make links work. (LP: #1981473)

 -- Simon Quigley <email address hidden> Thu, 28 Mar 2024 23:30:34 -0500

Changed in calamares-settings-ubuntu (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.