ClementGre / PDF4Teachers

PDF editing software in large quantities. Designed for teachers, this app keeps recorded previous annotations, and offers features like marking scale, PDF conversion, vectorial drawing...
https://pdf4teachers.org/
Apache License 2.0
140 stars 17 forks source link

pdf4teachers 1.4.1 sets as default PDF viewer after upgrade or new installation on Debian bookworm with Gnome 43.6 #172

Open AnthillSudoku opened 10 months ago

AnthillSudoku commented 10 months ago

I upgraded pdf4teacher on 2 debian bookworm machines with Gnome 43.6.

In one of them, the program replaces Gnome's “Document Viewer” as the default PDF viewer. This happened after an upgrade from 1.4.0 to 1.4.1, and I can also reproduce it with a clean install:

apt purge pdf4teachers
apt install pdf4teachers

Since pdf4teacher does not allow to print PDF, it must not be set as the default for PDF without the user's consent

ClementGre commented 7 months ago

PDF4Teachers normally does not registers as the default PDF file viewer. The app just have the property MimeType defined to application/pdf in the file pdf4teachers.desktop.

There is however a --file-associations argument that is passed to the java packager. I removed this argument as it is not needed anymore (the .desktop file is added automatically in a second time).

You can try to install this new built to check if the app is still replacing your default PDF file viewer: https://pdf4teachers.org/data/PDF4Teachers-Linux-02-17.deb

You can still change your default PDF file viewer using xdg-mime default xxx.desktop application/pdf.

AnthillSudoku commented 7 months ago

https://pdf4teachers.org/data/PDF4Teachers-Linux-02-17.deb

Issue persist

ClementGre commented 7 months ago

The postinst file of the .deb installer only contains the line:

xdg-desktop-menu install /opt/pdf4teachers/lib/pdf4teachers-PDF4Teachers.desktop

Witch should not set the app as the default PDF viewer. I can try to remove the line MimeType=application/pdf from the .desktop file but that would remove the option to open a file with PDF4Teachers.

I think this is platform relative as I can't reproduce the issue on Kubuntu. Can you make sure that the Gnome's “Document Viewer” was the default PDF document viewer before installing PDF4Teachers, running xdg-mime query default application/pdf before installing PDF4Teachers.

AnthillSudoku commented 6 months ago

Can you make sure that the Gnome's “Document Viewer” was the default PDF document viewer before installing PDF4Teachers, running xdg-mime query default application/pdf before installing PDF4Teachers.

yes, it's the default for PDF

xdg-mime query default application/pdf

org.gnome.Evince.desktop