[Bug 1958055] Re: sudo apport-kde is in a different design (stripped XDG_CURRENT_DESKTOP)
Benjamin Drung
1958055 at bugs.launchpad.net
Fri Jul 29 08:39:36 UTC 2022
Upstream plugins/sudoers/env.c defines:
static const char *initial_keepenv_table[] = {
"COLORS",
"DISPLAY",
"HOSTNAME",
"KRB5CCNAME",
"LS_COLORS",
"PATH",
"PS1",
"PS2",
"XAUTHORITY",
"XAUTHORIZATION",
NULL
};
Debian adds DPKG_COLORS to it.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/1958055
Title:
sudo apport-kde is in a different design (stripped
XDG_CURRENT_DESKTOP)
Status in sudo package in Ubuntu:
Confirmed
Bug description:
Running ubuntu-bug as normal user has the correct theme (see
screenshots attached to bug #1881640), but running "sudo ubuntu-bug"
has a different, non-matching theme (see attached screenshot).
This problem can be reproduce by running a KDE application on Ubuntu
Desktop (GNOME):
1. Launch ubuntu-22.04-desktop-amd64.iso
2. Install apport-kde
3. Run: /usr/share/apport/apport-kde -f
4. Run: sudo /usr/share/apport/apport-kde -f
5. Compare both windows. They have different icons and font size.
Same result with KDE:
1. Use kubuntu-22.04-desktop-amd64.iso
2. Run ubuntu-bug -f
3. Run: sudo ubuntu-bug -f
[Analysis]
Qt needs XDG_CURRENT_DESKTOP to be set to determine the correct theme,
but XDG_CURRENT_DESKTOP is not in the list of environment variables to
preserve (and not in env_keep in /etc/sudoers).
On other other hand, sudo preserves the DISPLAY environment variable:
$ sudo env | grep -Ev '^(LC|LS|SUDO|LANG|COLOR|TERM|PATH)'
XAUTHORITY=/run/user/1000/gdm/Xauthority
DISPLAY=:0
MAIL=/var/mail/root
LOGNAME=root
USER=root
HOME=/root
SHELL=/bin/bash
[Workaround]
Prevent sudo from dropping XDG_CURRENT_DESKTOP by running: sudo
XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP /usr/share/apport/apport-kde
-f
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apport 2.20.9-0ubuntu7.27
ProcVersionSignature: Ubuntu 5.4.0-94.106~18.04.1-generic 5.4.157
Uname: Linux 5.4.0-94-generic i686
ApportVersion: 2.20.9-0ubuntu7.27
Architecture: i386
CurrentDesktop: KDE
Date: Sun Jan 16 05:04:24 2022
InstallationDate: Installed on 2022-01-15 (0 days ago)
InstallationMedia: Kubuntu 18.04.5 LTS "Bionic Beaver" - Release i386 (20200806.1)
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1958055/+subscriptions
More information about the foundations-bugs
mailing list