Closed kuang-da closed 3 years ago
I was going to ask the same.
I have the exact same issue.
What may be the cause of this behaviour?
Maybe a socket that cannot be found. I guess it leaves the socket somewhere and, when a new instance starts, it checks whether the socket exists in the well-known path. A popular locations is /tmp/
which, by default, is not shared among multiple instances.
usually there is a --env=TMPDIR=/var/tmp
to make this work with Qt apps. Not sure if that would work in that case, but it's clearly not there.
For me, I switched to .deb
installation and it works. But still curious about how to fix it under Flathub.
At least there is a socket in /tmp/
:
[📦 net.codeindustry.MasterPDFEditor ~]$ ls -la /tmp/
total 0
drwxr-xr-x 3 muelli muelli 100 Mai 14 13:19 .
drwxr-xr-x 12 muelli muelli 340 Mai 14 13:19 ..
srwxr-xr-x 1 muelli muelli 0 Mai 14 13:19 mastersingleapp-master-534c-3e8
-rw-r--r-- 1 muelli muelli 0 Mai 14 13:19 mastersingleapp-master-534c-3e8-lockfile
drwxr-xr-x 2 muelli muelli 60 Mai 14 13:19 .X11-unix
[📦 net.codeindustry.MasterPDFEditor ~]$
so yeah, overriding TMPDIR could work well. Best to specify an application specific directory to not leak other data into the app.
So what's the fix for this?
you can try to run with --env=TMPDIR=/var/tmp
I have added that to /var/lib/flatpak/app/net.codeindustry.MasterPDFEditor/current/active/export/share/applications/net.codeindustry.MasterPDFEditor.desktop
but now MasterPDF doesn't run at all.
Here is the content of the file now:
[Desktop Entry]
Name=Master PDF Editor 5
Comment=Edit PDF files
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=masterpdfeditor5 --file-forwarding net.codeindustry.MasterPDFEditor --env=TMPDIR=/var/tmp @@ %f @@
Terminal=false
Icon=net.codeindustry.MasterPDFEditor
Type=Application
Categories=Office;Graphics;
MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;
X-Flatpak=net.codeindustry.MasterPDFEditor
you shouldn't be editing the .desktop. I believe the command doesn't work as it doesn't expect --env=
where you put it.
Use Flatseal instead to change that kind of parameter. https://flathub.org/apps/details/com.github.tchx84.Flatseal
you shouldn't be editing the .desktop. I believe the command doesn't work as it doesn't expect
--env=
where you put it.Use Flatseal instead to change that kind of parameter. https://flathub.org/apps/details/com.github.tchx84.Flatseal
It works! Thank you :)
Can we put that in the YAML file under `finish-args:'?
Hi,
I noticed that the MasterPDF could not open a file in the new tab even though I have checked the corresponding entry in the setting page and restarted the software as follows.
It seems that WPS has a similar issue but not sure whether there are similar problems under the hood.
Maybe I should tweak the flatseal? But I am not sure which knob shall I touch.
Any advice on this? Thank you very much!