Bug 492681 - xdg-desktop-portal-kde breaks printing with Inkscape
Summary: xdg-desktop-portal-kde breaks printing with Inkscape
Status: REPORTED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-05 14:48 UTC by Tobias Leupold
Modified: 2024-09-17 07:21 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Leupold 2024-09-05 14:48:07 UTC
Hi all,

when printing somehting with Inkscape and xdg-desktop-portal-kde is active, the printed output is way too small. This seems to be a regression, as everything worked okay using the Plasma 5 version.

Having exported GTK_USE_PORTAL=1 via ~/.config/plasma-workspace/env/exports.sh, when I try to print a 10x10cm square, the printed output is 48x48mm. When I do the same without the export, the printed output is the size it should be.

I see this both on my Gentoo desktop and my Artix notebook, both running Plasma 6.1.4, using Inkscape 1.3.2 – so I don't think this is a distribution-specific issue.

I'll gladly help to track this down! Thank for fixing this, so I can get native Firefox file dialogs back ;-)

Cheers, Tobias
Comment 1 Nate Graham 2024-09-16 19:26:23 UTC
Interesting, that is very strange.
Comment 2 TraceyC 2024-09-16 19:45:28 UTC
I can confirm this behavior on Plasma-dev, both Wayland and X11 sessions

Steps to reproduce:
- Installed Discord via repo package
- Installed DiscordCanary via flathub-beta

1. Launched Discord, checked icon in Icons-Only-Task-Manager
Icon is correct - the blue Discord icon
2. Pinned the Discord icon
3. Launched Discord Canary
Initially it showed a separate, yellow icon as expected.
The blue icon was highlighted, I clicked on it. This brought up the Discord Canary window. The yellow icon disappeared. Both windows were grouped under the blue icon now.
4. Closed both versions of Discord and started up Canary
During launch, the yellow icon was shown in the task bar. After it completed loading, the icon changed to the blue icon.


**Notes**
I can also reproduce this behavior with Firefox, on 6.1.5, using two different profiles with different .desktop files. This issue has persisted since 6.0 at least.

I have a pinned icon on the taskbar per profile.
Personal - regular Firefox icon
Work - all white Firefox icon

After launching Firefox with the Personal profile, it correctly shows the windows when interacting with its icon in the taskbar
After launching a new Firefox window with the Work profile:
- The icon for the Work profile is still correctly pinned to the task manager
- All windows from both profiles are grouped under the icon for the Personal profile
Comment 3 TraceyC 2024-09-16 20:33:40 UTC
Apologies, my last reply was for a different bug.

For this bug:
I am unable to reproduce this behavior on Plasma-dev (Wayland)
Inkscape 1.3.2

Steps to reproduce

1. Execute `export GTK_USE_PORTAL=1`
2. Launch Inkscape
3. Create a 10x10cm square and print
4. Execute `export GTK_USE_PORTAL=0`
5. Print the file again

The printout was the same for either. The printed square was 9.5cm square

I noticed that a 10x10mm square printed at about 48mm

Are there more specific steps you're following to enable xdg-desktop-portal-kde maybe?
Comment 4 Tobias Leupold 2024-09-17 07:21:37 UTC
I already wondered ;-)

I set the variables in .config/plasma-workspace/env/exports.sh, containing "export GTK_USE_PORTAL=1".

But it also works if started from the console, i.e running "GTK_USE_PORTAL=1 inkscape" vs. "inkscape". Notice the changed print dialog!

I can reliably reproduce this using Inkscape 1.3.2, xdg-desktop-portal 1.18.4 and xdg-desktop-portal-kde 6.1.4, running Plasma on X11.