Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766653 - net-print/hplip[qt5]: bad desktop file /usr/share/applications/hp-uiscan.desktop
Summary: net-print/hplip[qt5]: bad desktop file /usr/share/applications/hp-uiscan.desktop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-23 11:27 UTC by i.Dark_Templar
Modified: 2021-01-25 18:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
hp-uiscan-desktop-file-gentoo-bug-766653.patch (hp-uiscan-desktop-file-gentoo-bug-766653.patch,448 bytes, patch)
2021-01-25 17:02 UTC, i.Dark_Templar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description i.Dark_Templar 2021-01-23 11:27:40 UTC
One of hplip desktop files, hp-uiscan.desktop, looks bad: it's located in separate group "Other" in menu, has no icon and no description.

Reproducible: Always

Steps to Reproduce:
1. emerge hplip[hpcups,-minimal]
2. open main menu in DE (KDE, specifically, but other DE/WMs might be affected as well)

Actual Results:  
hp-uiscan is located in separate "Other" category and doesn't have a valid icon or a description.

Expected Results:  
hp-uiscan should be located in one of existing groups, should have icon, and it'd be good if it'd have a description as well.

Desktop file in question:

$ cat /usr/share/applications/hp-uiscan.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=hp-uiscan
Exec=/usr/bin/hp-uiscan
Icon=/usr/share/icons/Humanity/devices/48/printer.svg

Icon is hardcoded, and it doesn't exist on my machine. No groups, generic name or comments values specified.

Another desktop file from same package for comparison:

$ cat /usr/share/applications/hplip.desktop 
[Desktop Entry]
Type=Application
Name=HP Device Manager
GenericName=Printer Management Application
Comment=View device status, ink levels and perform maintenance.
Exec=hp-toolbox
Icon=/usr/share/hplip/data/images/128x128/hp_logo.png
Terminal=false
Categories=Utility;
X-KDE-StartupNotify=false
StartupNotify=false

This one has values "GenericName", "Comment" and "Categories", and while icon is hardcoded as well, this one exists on my system and belongs to hplip package.

I think using something like "printer" for icon instead of current value should be enough. For categories, "Utility;" may be used like in hplip.desktop. As for generic name or comment I don't have any suggestions yet.

$ emerge --info hplip
Portage 3.0.13 (python 3.8.6-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.32-r5, 5.4.80-gentoo-r1.54 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.80-gentoo-r1.54-x86_64-Intel-R-_Core-TM-_i5-6500_CPU_@_3.20GHz-with-glibc2.2.5
KiB Mem:    16352916 total,   8059696 free
KiB Swap:    4192252 total,   4192252 free
Timestamp of repository gentoo: Sat, 23 Jan 2021 00:45:01 +0000
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r5::gentoo, 3.8.6-r1::gentoo, 3.9.0-r1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: https://mirror.yandex.ru/gentoo-distfiles/
    priority: -1000
    sync-webrsync-verify-signature: true

dt-overlay-crossdev
    location: /var/db/repos/dt-overlay-crossdev
    masters: gentoo
    priority: 50

dt-overlay-patches
    location: /var/lib/layman/dt-overlay-patches
    sync-type: laymansync
    sync-uri: https://github.com/iDarkTemplar/dt-overlay-patches.git
    masters: gentoo
    priority: 50

dt-overlay-private
    location: /var/db/repos/dt-overlay-private
    masters: gentoo
    priority: 50

dt-overlay-public
    location: /var/lib/layman/dt-overlay-public
    sync-type: laymansync
    sync-uri: https://github.com/iDarkTemplar/dt-overlay-public.git
    masters: gentoo
    priority: 50

rion
    location: /var/lib/layman/rion
    sync-type: laymansync
    sync-uri: https://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

tastytea
    location: /var/lib/layman/tastytea
    sync-type: laymansync
    sync-uri: https://schlomp.space/tastytea/overlay.git
    masters: gentoo
    priority: 50

Installed sets: @alsa, @archive-tools, @audacious, @bootloader, @devel-packages, @devel-tools, @devel-tools-x11, @fcitx, @filesystem-tools, @filesystem-tools-android, @fonts, @fonts-extra, @fortune, @gstreamer, @hardware-tools, @hardware-tools-x11, @ibus, @image-tools, @kde5, @language-tools, @mail-server, @media, @media-converters, @mingw, @network-analyzers, @network-tools, @network-tools-extra, @opengl-devel, @opengl-utils, @pidgin, @portage-tools, @portage-tools-dev, @portage-tools-extra, @power-utils, @printers, @psi, @pulseaudio, @qt5-meta, @qt6-meta, @system-admin-utils, @system-admin-utils-extra, @system-daemons, @system-daemons-extra, @system-utils, @system-utils-extra, @tesseract, @text-utils, @virtualbox, @vpn, @wine, @x11-core, @x11-extras, @x11-utils
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -fwrapv"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -fwrapv"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --binpkg-respect-use=y --autounmask=n --complete-graph=y --keep-going"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="binpkg-docompress binpkg-dostrip binpkg-logs distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://mirror.leaseweb.com/gentoo/ http://mirror.netcologne.de/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ ftp://mirror.yandex.ru/gentoo-distfiles/ http://mirror.bytemark.co.uk/gentoo/ http://gentoo.supp.name/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.soeasyto.com/distfiles.gentoo.org/"
INSTALL_MASK="     /etc/systemd /lib*/systemd /usr/lib*/systemd /usr/lib*/python*/test "
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 amr apm ares bash-completion bidi bluetooth bluray branding bzip2 c++0x cairo caps cdda cdio cdr cleartype cli cracklib crypt cue cups cxx dbus designer dga dirac dri dts dvd dvdr elogind emboss encode exif faad fbcon fcitx4 ffmpeg filecaps flac fontconfig fontforge freetype fribidi gif gme gmp gpm gtk gtkstyle gui ibus iconv icu idn imlib inotify ipv6 jadetex jpeg kde lcms libass libdvdcss libglvnd libtirpc lzma lzo mad matroska midi mmap mng mp3 mp4 mpeg multilib ncurses network nfs nls nptl offensive ogg openal opengl openmp opus pam pango pch pcmcia pcntl pcre pdf pic plasma plymouth png policykit posix postproc ppds private-headers projectm pulseaudio qml qt5 raw readline schroedinger seccomp sftp sndfile sockets spell split-usr ssl startup-notification svg system-cairo system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite tcpd tga theora threads tiff truetype udev udisks unicode upower usb utils vaapi vdpau vorbis vpx vulkan wavpack wma wxwidgets x264 xattr xcb xcomposite xft xinerama xpm xscreensaver xv xvid zlib zstd" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes f16c mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby26" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="vesa vga nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-print/hplip-3.20.11::gentoo was built with the following:
USE="X hpcups kde libnotify policykit qt5 static-ppds -doc -fax -hpijs -libressl -libusb0 -minimal -parport -scanner -snmp" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_8 -python3_7"
Comment 1 Daniel Pielmeier gentoo-dev 2021-01-24 16:20:13 UTC
What about the patch from the linked upstream bug. Would this be sufficient?
Comment 2 i.Dark_Templar 2021-01-24 18:51:43 UTC
I don't have any file named 'hp_logo.*' in /usr/share/pixmaps or /usr/share/icons. Thus, "Icon=hp_logo" shouldn't make any change for better in my case.

I only have it here:

$ equery f hplip | grep hp_logo
/usr/share/hplip/data/images/128x128/hp_logo.png
/usr/share/hplip/data/images/16x16/hp_logo.png
/usr/share/hplip/data/images/256x256/hp_logo.png
/usr/share/hplip/data/images/32x32/hp_logo.png
/usr/share/hplip/data/images/64x64/hp_logo.png

I don't think those files would be found unless absolute path is used.

I think it's desired to have some GenericName and Comment if possible, better "Name" value might be good too.
Comment 3 Daniel Pielmeier gentoo-dev 2021-01-25 12:43:04 UTC
(In reply to i.Dark_Templar from comment #2)
> I don't have any file named 'hp_logo.*' in /usr/share/pixmaps or
> /usr/share/icons. Thus, "Icon=hp_logo" shouldn't make any change for better
> in my case.
> 
> I only have it here:
> 
> $ equery f hplip | grep hp_logo
> /usr/share/hplip/data/images/128x128/hp_logo.png
> /usr/share/hplip/data/images/16x16/hp_logo.png
> /usr/share/hplip/data/images/256x256/hp_logo.png
> /usr/share/hplip/data/images/32x32/hp_logo.png
> /usr/share/hplip/data/images/64x64/hp_logo.png
> 
> I don't think those files would be found unless absolute path is used.
> 
> I think it's desired to have some GenericName and Comment if possible,
> better "Name" value might be good too.

You see this trivial bug is open for more than one year upstream.

What about creating a working proposal for the Desktop file and attach it here. I will gladly apply it in Gentoo.
Comment 4 i.Dark_Templar 2021-01-25 17:02:29 UTC
Created attachment 684645 [details, diff]
hp-uiscan-desktop-file-gentoo-bug-766653.patch

I've created this patch some time after reporting this bug and currently using it.
Comment 5 Larry the Git Cow gentoo-dev 2021-01-25 18:24:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bd4548e67441ac9a7e4d752d314b89bf07f5a7a

commit 0bd4548e67441ac9a7e4d752d314b89bf07f5a7a
Author:     Daniel Pielmeier <billie@gentoo.org>
AuthorDate: 2021-01-25 18:23:36 +0000
Commit:     Daniel Pielmeier <billie@gentoo.org>
CommitDate: 2021-01-25 18:23:36 +0000

    net-print/hplip: Fix hp-uiscan desktop file.
    
    Thanks to i.Dark_Templar for the report and patch.
    
    Closes: https://bugs.gentoo.org/766653
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    RepoMan-Options: --force
    Signed-off-by: Daniel Pielmeier <billie@gentoo.org>

 net-print/hplip/Manifest                |   1 +
 net-print/hplip/hplip-3.20.11-r1.ebuild | 288 ++++++++++++++++++++++++++++++++
 2 files changed, 289 insertions(+)
Comment 6 Daniel Pielmeier gentoo-dev 2021-01-25 18:25:37 UTC
(In reply to i.Dark_Templar from comment #4)
> Created attachment 684645 [details, diff] [details, diff]
> hp-uiscan-desktop-file-gentoo-bug-766653.patch
> 
> I've created this patch some time after reporting this bug and currently
> using it.

Thank you for the patch. This is in hplip-3.20.11-r1.