flathub / org.kde.kate

https://flathub.org/apps/details/org.kde.kate
3 stars 5 forks source link

All files open in windows instead of tabs and same file is opened multiple times. #1

Closed ThanosApostolou closed 4 years ago

ThanosApostolou commented 4 years ago

Each file that I open creates a new window instead of the usual behavior which is to create a new tab. Also, if I open the same file multiple times it opens multiple windows instead of the default behavior which is to bring the opened window to the foreground. The only messages I see are those:

Qt: Session management error: Could not open network socket
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf5.kservice.services: KServiceTypeTrader: serviceType "ThumbCreator" not found

Maybe the "Not connected to D-Bus server" is relevant.

tsdgeos commented 4 years ago

Opening through the file->open? or somehow else?

ThanosApostolou commented 4 years ago

Opening through file-> open works as expected. Problem exists when opening through my file manager or with command line (flatpak run org.kde.kate /path/to/file)

tsdgeos commented 4 years ago

I think that's by flatpak design and can't be fixed.

Paging people that know more than me @aleixpol @grulja

When doing "flatpak run bla" is there any change of reusing a given bla and not starting a new one?

TingPing commented 4 years ago

Single instance mode is ideally implemented using DBus, this just works provided correct naming.

Sometimes applications make lockfiles though which need to be in a place both applications can see (not /tmp in flatpak) and that can usually be solved doing something like --env=TMPDIR=/var/tmp as a workaround.

tsdgeos commented 4 years ago

this just works provided correct naming.

Don't call it correct, because it obviously doesn't work. I would call it "whatever flatpak developers implemented without consulting everyone else that did have this feature already"

TingPing commented 4 years ago

Correct naming as-in their DBus name matches their app-id. If it doesn't I'd still call it not ideal but you can always add --own-name=org.gnome.kate or whatever they used :P.

You can track denied dbus permissions with flatpak run --log-session-bus org.kde.kate.

tsdgeos commented 4 years ago

I am going to give you a free advice, don't use sarcasm and :P on the internet with people you have not met in real life, doesn't translate well.

aleixpol commented 4 years ago

I think that's by flatpak design and can't be fixed.

Paging people that know more than me @aleixpol @grulja

When doing "flatpak run bla" is there any change of reusing a given bla and not starting a new one?

It definitely should work, I though I'd fixed it in KDBusAddons, maybe not. But in general, it's a matter to be able to reach the right dbus signals. I'll look into it eventually.

grulja commented 4 years ago

Running non-flatpaked Kate I see org.kde.kate-xxxx on the session bus, while running flatpaked Kate I see org.kde.kate.kdbus-_y_xxxx. I tried running it even with --socket=session-bus, but that didn't help either. Maybe KDBusAddons are looking for a wrong dbus name? I don't really know how KUniqueApplication (or what we use) is supposed to work.

aleixpol commented 4 years ago

https://phabricator.kde.org/D27208

Kate was not aware of how KDBusService works for flatpak.

aleixpol commented 4 years ago

https://invent.kde.org/kde/kate/commit/5b5c32aa35ea16653421eb637eb407686696d2fd patch landed, should be solved in the next release.

tsdgeos commented 4 years ago

Not really next (19.12.3) but next-next 20.04.0

I'm going to close this anyway since it is as fixed as it can be.

Perkolator commented 9 months ago

Just installed the latest beta (Kate 23.08.3) from Flathub-beta and files opened with my file manager always open in new Kate windows even though the open each document in its own window setting is disabled.