Can't open multiple files

Bug #1756894 reported by Toan Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Incomplete
Undecided
Unassigned

Bug Description

Choose multiple pdf files, press enter, just the fisrt file is opened.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Toan,

can you be more specific about the way you use to open those files? Do you start qpdfview and use its "Open in new tab" action and associated file dialog? Or do you use your desktop's file browser? (Also note that "Open" in contrast to "Open in new tab" will not open several files since it is bound to "reuse" the current tab, whereas "Open in new tab" will open new ones.)

Best regards,
Adam

Changed in qpdfview:
status: New → Incomplete
Revision history for this message
Toan Nguyen (dtoan96) wrote :

I used file browser. I already knew how to open multiple files in qpdfview, but the way it's done is inconvenient. I would like to be able to open multiple files from file browser.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

this should definitely be possible as qpdfview has long supported opening several files via the command-line and the file browser has to provide those arguments when starting qpdfview via its desktop file. Could you check if /usr/share/applications/qpdfview.desktop contains a line like

qpdfview --unique %F

? The capital F is important since it means that a list of file names can be supplied. Also which file browser are you using and can you check the desktop file of an application for which this does work as to which placeholder it is using?

Best regards,
Adam

Revision history for this message
Toan Nguyen (dtoan96) wrote :

I use Ubuntu 18.04. As you said, I can select multiple files and choose open with qpdfview without problem. But the strange thing is that if I set qpdfview as default pdf reader, then select multiple files and press enter or choose open, it only opens the first file selected.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

honestly speaking, from what you describe this does sound like a bug in the file manager? It could still be something that is wrong in our desktop file which is why it would be helpful if you could provide the desktop file from an application for which this works on your system. Or the command line that Nautilus calls qpdfview with (e.g. using ps -aux | grep qpdfview if you start qpdfview via the file browser initiallly)?

Best regards,
Adam

Revision history for this message
Toan Nguyen (dtoan96) wrote :

This is the desktop file:

[Desktop Entry]
Type=Application
Terminal=false
Name=qpdfview
Icon=qpdfview
GenericName=tabbed document viewer
Comment=A tabbed document viewer using Qt and the Poppler library.
Categories=Viewer;Office;
Keywords=viewer;document;presentation;pdf;ps;djvu;
TryExec=qpdfview
Exec=qpdfview --unique %F
MimeType=application/pdf;application/x-pdf;text/pdf;text/x-pdf;image/pdf;image/x-pdf;application/postscript;image/vnd.djvu;image/x-djvu;
Actions=ChooseInstance;NonUniqueInstance;

[Desktop Action ChooseInstance]
Name=Choose instance
Exec=qpdfview --unique --choose-instance %F

[Desktop Action NonUniqueInstance]
Name=Non-unique instance
Exec=qpdfview %F

-------------------

This is the result of ps -aux | grep qpdfview (I selected two files name "3_574-577.pdf" and "Chapter 23.pdf" then pressed enter):

dtoan 3837 14.0 1.7 851776 69124 ? Sl 18:07 0:00 qpdfview --unique /home/dtoan/Documents/Chapter 23.pdf
dtoan 3853 0.0 0.0 22664 1032 pts/0 R+ 18:07 0:00 grep --color=auto qpdfview

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

as we can see from ps -aux, only one file name was passed.

Thank you for retrieving the desktop file, which looks correct. Sorry for not being clearer, but I think we need the desktop file of *a different* application for which this works using Nautilus to compare its contents against the file used by qpdfview. This way, I could try to adjust qpdfview's desktop file accordingly, but I do not know what the problem with our current desktop file is (I think it is correct w.r.t. the FDo specification.)

Best regards,
Adam

Revision history for this message
Toan Nguyen (dtoan96) wrote :

Okular works fine with me, it uses this line:
Exec=okular %U

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hhhmmm, according to the specification %U means list of URL whereas %F means list of files. I guess Okular can download URL using KIO and then open the files locally, but qpdfview does not support anything but local files. So maybe Nautilus works correctly for %U but has a bug for %F?

You could try replacing %F by %U and see if that works but I don't think so. I also do not think that I can resolve this and it really might be a bug in Nautilus?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.