Keyboard shortcuts to flatpack apps in Plasma 6

Hi all,
I am using Fedora Kinoite 40 (pre-release) at the moment with Plasmashell 6.03.
In previous setups, using Plasma 5, I used several keyboard shortcuts to open up a spreadsheet with Libreoffice calc. This was done easily with a command like:
libreoffice --calc /
As I see it, 2 things have changed:

  1. the way how to add shortcuts in Plasma 6
  2. I use several flatpacks, among others Libreoffice.
    When I look in the properties of the Libreoffice calc shortcut in the Application launcher I see this on the Application Tab:
    Program: /usr/bin/flatpak
    Arguments: run --branch=stable --arch=x86_64 --command=libreoffice --file-forwarding org.libreoffice.LibreOffice --calc @@u %U @@

I have tried several ways to get that into a shortcut but failed every time, replacing:

  • @@u %U @@ with the location and filename of the spreadsheet
  • %U @@ with the location and filename of the spreadsheet
  • @@ with the location and filename of the spreadsheet

What is the right way of doing this? How do I create a shortcut to open a file using a flatpack app?
Thanks.

I tried using this and it worked properly

flatpak run org.libreoffice.LibreOffice --calc ~/sample.tsv

Thank you for your answer. Would you do me a huge favor and write in detail how you added the shortcut:
what buttons did you click, how did you enter the name of the program together with the name of the file.
I tried using Add new - Command or Script and when I entered the whole command and click on +Add I get an error saying:

Error while communicating with the global shortcuts service

So, please tell me in detail how you did it to make it work.
Thank you so very much.

[EDIT]
I am also working to get Kontact working but that is also a big mess. It can’t connect to KDE Wallett to store my password, I can’t import old mails which have been exported using Kmail in the previous version.
It looks like something is missing or not working in the installation of Kinoite, inside or outside KDE.

Well, I did nothing fancy… I did a small video below.

I had to encode it as GIF to upload it, I hope you can see it.

Maybe you have some installation problem with the hotkey service. I am running openSUSE Argon (openSUSE Leap 15.5 + KDE repos)

sample

If you are using Wayland it could be a setting in “Application Permissions”.
By default global shortcuts are disabled for security reasons.

Thank you very much for your video, you really did a lot to be able to answer me. Unfortunately I don’t need it now (but now know how to do it when I do need it) cause I went back to Fedora 39 with Plasma 5.27.
I had so many problems with the Kontact suite in Plasma 6 that I became angry and just erased the whole thing to start over with the previous version. I really wish the KDE developers spent more time fixing programs instead of inventing more bling-bling. Yes, it looks good, when you found the correct theme for you, but as they say: you can stick a ribbon on a pig but it still is a pig.
Thank you for all you have done for me. It is greatly appreciated and will be used a next time I use flatpacks.

1 Like

You’re welcome, mate. At the end of the day, it is a tool to get things done.

Of course, we all have a desire to use the latest iteration, but IMO getting things done and having our workflow working as expected is more important.

Maybe you can try after Fedora 40 is out of beta.

I can’t tell what prevented your workflow working, but I believe all developers involved, either on KDE or in Fedora packaging, aim to deliver the best experience to us.

BTW, I run openSUSE Argon (Leap+KDE repos), and on KDE6 launch, there were some rough edges. Now I am happy with its state.

Have a nice day =)