F40 issue with opening files in Text Editor via xdg-open bash scripts

Problem

#!/usr/bin/env bash
xdg-open file_1.csv
xdg-open file_2.csv
xdg-open file_3.csv
xdg-open file_4.csv
xdg-open file_5.csv

After upgrading from F39 to F40 on Silverblue, I’ve encountered a problem with all my scripts, similar to the one described above. It appears that although all the files are being opened during the process, once it’s completed, only a few of the last ones are visible in the Text Editor. Typically, only the last two files are opened, sometimes four of them, and I’ve been unable to discern why some files are opened while others are not…

Notably, the same bash scripts worked perfectly on F39.

Cause

Not yet known.

Related Issues

Bugzilla report: #NNNN

Workarounds

None yet.

From Proposed Common Issues to Ask Fedora

I cannot reproduce this with the gedit text editor. The issue could be specific to “Text editor” (gnome-text-editor). You could try similar scripts that open e.g. in a browser to see whether the problem also occurs with different applications on your system.

#!/usr/bin/env bash
xdg-open pic_1.png
xdg-open pic_2.png
xdg-open pic_3.png
xdg-open pic_4.png
xdg-open pic_5.png

I have just reproduced this with Eye of GNOME . Only pic_1.png and pic_2.png were opened. Why!?

I will use gedit as a workaround. Perhaps the issue with xdg-open is somehow related to applications installed as flatpaks.

(By the way, gedit looks better for my use case. :smiley:)

You could be right that this is an issue with flatpak. Testing with epubs, which on my system are associated with Foliate installed as a flatpak, only two of the five files were opened. It can work by inserting sleep commandsas a workaround (I used 0.3)

1 Like