Merge ~macg3/ubuntu/+source/gdebi:fix_pkexec into ubuntu/+source/gdebi:ubuntu/devel
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | ~macg3/ubuntu/+source/gdebi:fix_pkexec | ||||
Merge into: | ubuntu/+source/gdebi:ubuntu/devel | ||||
Diff against target: |
64 lines (+40/-4) 2 files modified
GDebi/GDebiGtk.py (+5/-4) GDebi/GDebiPkexec.py (+35/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Sponsors Team | Pending | ||
git-ubuntu import | Pending | ||
Review via email:
|
Description of the change
This fixes a longstanding issue that prevents GDebi from working properly when it is launched by a GUI app, such as Firefox or Chrome after downloading a deb file. Ever since Ubuntu 17.10, GDebi just quits immediately when you click Install. It works properly when you run it from a terminal window, but not when launched from Firefox or Chrome. The reason is because pkexec refuses to work if its parent process is init. This change adds an intermediate script that acts as the parent for pkexec.
To test:
- Download a deb file in Firefox/Chrome.
- Open it from within the browser's downloads screen, and choose to open it with GDebi.
- It will open fine. Now, click Install.
Without this change applied, GDebi will immediately quit and the package won't be installed.
After this change is applied, GDebi will successfully install the package.
Another way to test is by directly running GDebi with setsid:
setsid gdebi-gtk package.deb
Without this change, it will fail in the same way. With this change, it will succeed.
The bug that this fixes is Launchpad #1854588. Ideally this would be ported to all of the LTS releases. I'm brand new to this Launchpad workflow, so I'm not sure if there's anything I need to do in order to kickstart this process.
Unmerged commits
- 318f5d2... by Doug Brown <email address hidden>
> I'm brand new to this Launchpad workflow, so I'm not sure if there's anything I need to do in order to kickstart this process.
Sorry, we don't really have a formal way for third parties to submit into this workflow yet - in that there are no reviewers at the other end. To connect the dots, I'm going to link this MP to the bug, and then subscribe ~ubuntu-sponsors to the bug. That way the request will end up in the old sponsorship queue.