#1005818 task-lxde-desktop: libreoffice is used as default pdf reader

#1005818#5
Date:
2022-02-15 16:12:09 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

On a fresh installation of bullseye libreoffice is started when clicking
on a pdf file.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I tried to adjust "Default applications for LXDE Session" in the
configuration setting.  Unfortunately nearly all settings are
set to "disabled" and I can not change anything here.

I also tried to change manually the following:

~$ diff -u .config/lxsession-default-apps/settings.conf_save .config/lxsession-default-apps/settings.conf
--- .config/lxsession-default-apps/settings.conf_save	2022-02-15 16:35:32.730001667 +0100
+++ .config/lxsession-default-apps/settings.conf	2022-02-15 16:41:12.822627295 +0100
@@ -12,7 +12,7 @@
 terminal_manager/available=
 audio_player/available=
 video_player/available=
-pdf_reader/available=
+pdf_reader/available=evince
 image_display/available=
 text_editor/available=
 archive/available=
@@ -34,7 +34,7 @@
 terminal_manager/installed=XTerm,xterm,mini.xterm,/usr/share/applications/debian-xterm.desktop,;UXTerm,uxterm,mini.xterm,/usr/share/applications/debian-uxterm.desktop,;Terminal emulator,/usr/bin/x-terminal-emulator,terminal,/usr/share/applications/lxde-x-terminal-emulator.desktop,;Multilingual Terminal,mlterm,mlterm-icon-24colors-1,/usr/share/applications/mlterm.desktop,;LXTerminal,lxterminal,lxterminal,/usr/share/applications/lxterminal.desktop,;Thai X terminal,txiterm,xiterm+thai,/usr/share/applications/xiterm+thai.desktop,;Rxvt Color Unicode Terminal,urxvt,urxvt_48x48.xpm,/usr/share/applications/rxvt-unicode.desktop,;
 audio_player/installed=LXMusic simple music player,lxmusic,lxmusic,/usr/share/applications/lxmusic.desktop,;mpv Media Player,mpv,mpv,/usr/share/applications/mpv.desktop,;PulseAudio-Lautstärkeregler,pavucontrol,multimedia-volume-control,/usr/share/applications/pavucontrol.desktop,;Im SMPlayer einreihen,smplayer,smplayer,/usr/share/applications/smplayer_enqueue.desktop,;SMPlayer,smplayer,smplayer,/usr/share/applications/smplayer.desktop,;VLC Media Player,/usr/bin/vlc,vlc,/usr/share/applications/vlc.desktop,;Audacity,env,audacity,/usr/share/applications/audacity.desktop,;Audacious,audacious,audacious,/usr/share/applications/audacious.desktop,;Ripper X,ripperx,ripperx,/usr/share/applications/ripperx.desktop,;K3b,k3b,k3b,/usr/share/applications/org.kde.k3b.desktop,;Cheese,cheese,org.gnome.Cheese,/usr/share/applications/org.gnome.Cheese.desktop,;OBS Studio,obs,com.obsproject.Studio,/usr/share/applications/com.obsproject.Studio.desktop,;
 video_player/installed=LXMusic simple music player,lxmusic,lxmusic,/usr/share/applications/lxmusic.desktop,;mpv Media Player,mpv,mpv,/usr/share/applications/mpv.desktop,;PulseAudio-Lautstärkeregler,pavucontrol,multimedia-volume-control,/usr/share/applications/pavucontrol.desktop,;Im SMPlayer einreihen,smplayer,smplayer,/usr/share/applications/smplayer_enqueue.desktop,;SMPlayer,smplayer,smplayer,/usr/share/applications/smplayer.desktop,;VLC Media Player,/usr/bin/vlc,vlc,/usr/share/applications/vlc.desktop,;Audacity,env,audacity,/usr/share/applications/audacity.desktop,;Audacious,audacious,audacious,/usr/share/applications/audacious.desktop,;Ripper X,ripperx,ripperx,/usr/share/applications/ripperx.desktop,;K3b,k3b,k3b,/usr/share/applications/org.kde.k3b.desktop,;Cheese,cheese,org.gnome.Cheese,/usr/share/applications/org.gnome.Cheese.desktop,;OBS Studio,obs,com.obsproject.Studio,/usr/share/applications/com.obsproject.Studio.desktop,;
-pdf_reader/installed=Bildbetrachter,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;Dokumentenbetrachter,evince,org.gnome.Evince,/usr/share/applications/org.gnome.Evince.desktop,;Druckvorschau,evince-previewer,document-print-preview,/usr/share/applications/org.gnome.Evince-previewer.desktop,;Feh,feh,image-viewer,/usr/share/applications/feh.desktop,;
+pdf_reader/installed=evince,Bildbetrachter,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;Dokumentenbetrachter,evince,org.gnome.Evince,/usr/share/applications/org.gnome.Evince.desktop,;Druckvorschau,evince-previewer,document-print-preview,/usr/share/applications/org.gnome.Evince-previewer.desktop,;Feh,feh,image-viewer,/usr/share/applications/feh.desktop,;
 image_display/installed=Bildbetrachter,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;Dokumentenbetrachter,evince,org.gnome.Evince,/usr/share/applications/org.gnome.Evince.desktop,;Druckvorschau,evince-previewer,document-print-preview,/usr/share/applications/org.gnome.Evince-previewer.desktop,;Feh,feh,image-viewer,/usr/share/applications/feh.desktop,;
 text_editor/installed=Mousepad,mousepad,org.xfce.mousepad,/usr/share/applications/mousepad.desktop,;Vim,vim,gvim,/usr/share/applications/vim.desktop,;Emacs (GUI),/usr/bin/emacs,emacs,/usr/share/applications/emacs.desktop,;Emacs (Terminal),/usr/bin/emacs,emacs,/usr/share/applications/emacs-term.desktop,;Midnight Commander editor,mcedit,MidnightCommander,/usr/share/applications/mcedit.desktop,;
 archive/installed=Xarchiver,xarchiver,xarchiver,/usr/share/applications/xarchiver.desktop,;


I did also another attempt via mime settings:

$ cat /etc/mailcap.order
###############################################################################
#
#  Mailcap.order:  This file allows a system-wide override of MIME program
#  preferences.  See the mailcap.order(5) man page for more information.
#
#  After modifying this file, be sure to run /usr/sbin/update-mime (as root)
#  to propagate the changes into the /etc/mailcap file.
#
################################################################################

evince:image/pdf
evince:application/pdf


   * What was the outcome of this action?

No change after editing the user config file neither editing
/etc/mailcap.order and running update-mime afterwards.

   * What outcome did you expect instead?

I expect a sensible, quickly starting pdf viewer as default - for
example evince as I tried to add.


Kind regards
    Andreas.

#1005818#10
Date:
2022-05-08 17:59:02 UTC
From:
To:
Andreas Tille <andreas@an3as.eu> wrote (Tue, 15 Feb 2022 17:12:09 +0100):

Since evince is automatically installed, it's "just" a matter of setting
evince as the default application for PDF - as you already have tried to :-)

I managed to get this done easily by right-clicking on the PDF file, choose
"Open with...", then select the app "Document Viewer" (this is evince) from
"Office" section, set the checkbox for "Set selected application as default
action for this file type" - and you are done.

So, this is basically not an installation problem, the installation was
successful. And therefore this is nothing, that can be done in tasksel
(this bug being reported against tasksel) on this.

I did another test install with XFCE desktop environment, and there this
problem did not exist. Installed PDF viewer was here Atril (from the MATE
environment).

So, it's after all an problem either with LXDE (the environment) or with
evince | libreoffice (the packages).

I will reassign this bug to LXDE for now.

@LXDE people: please reassign accordingly, if you think different.


Holger

#1005818#19
Date:
2022-05-08 18:58:22 UTC
From:
To:
Am Sun, May 08, 2022 at 07:59:02PM +0200 schrieb Holger Wansing:

Sure.

... and this should be done as system default for users convenience.

Hope it can be fixed there.  BTW, I'm not 100% sure whether some unusual
default is also for xfce4 where I have seen starting Gimp to display
PDF.

Kind regards

      Andreas.

#1005818#24
Date:
2022-05-12 13:42:08 UTC
From:
To:
Well, if evince is installed then it should exist in the XDG MIME
database and therefore it should be present in the "Open with ..." file
manager menu. Although which application will be launched on simple Open
action is defined by order:
1) use user defined default application for that MIME type
2) use system defined default application for that MIME type
3) use last registered for that MIME type by user
4) use last registered for that MIME type by system

When (1) is used - this is what we do when we associate some file with
some application, as it was said.

Usage of (2) is Debian-wide, you know, and it definitely has no relation
to LXDE package but rather to evince package (which may set system-wide
default to evince at installation and drop it at removal).

I see nothing what could be done in regards of (3) and (4) as we cannot
determine order in which packages (and especially user applications such
as WINE ones) are installed, and there is no preference order in terms of
XDG MIME database.

Please, clarify what we can do in that regard, and probably we should
reassign this issue to evince package instead if we decide it should be
set as system default.

Thanks.

#1005818#29
Date:
2022-05-12 14:36:04 UTC
From:
To:
Although it appears there is another way to make that, just for LXDE,
using file /etc/xdg/lxde-mimeapps.list. May be it will be the best way
after all.