Adding shortcuts to Systemsettings

Hi, when I add a shortcut in Systemsettings I get the following error message:

Error while communicating with the global shortcuts service

What I do is this:
In Systemsettings - Keyboard - Shortcuts I click

Add new

and then select

Command or script

A pop-up opens and I copy-paste the command which is the code to start Libreoffice --calc with a spreadsheet.
No matter which one I use (I have 5 of them) I get the error message. Also when I just type the name of another program or script this happens.

What do I need to do to not get the error message which also blocks further input of shortcuts?

Your distribution should have set up the kglobalaccel package/service to run in the background in a Plasma session. Please check whether that package is installed on your system. Assuming that it is, I would check journalctl -S today for recent system log messages. You may find some relevant error messages in the log that point you toward why the service isn’t running.

Hello, thank you for your answer.
I see there are 4 packages installed in my Fedora 40 KDE edition:

I used this command:
journalctl -S today |grep kglobalaccel > journal.txt

In the text file I see this:

May 10 07:27:29 Fedora-KDE systemd[1816]: Starting plasma-kglobalaccel.service - KDE Global Shortcuts Server…
May 10 07:27:29 Fedora-KDE systemd[1816]: Started plasma-kglobalaccel.service - KDE Global Shortcuts Server.
May 10 07:28:43 Fedora-KDE systemsettings[3573]: org.kde.kcm_keys: “org.kde.kglobalaccel.NoSuchComponent” “The component ‘libreoffice-5.desktop’ doesn’t exist.”

When I check if the service is running, I see this:

sudo systemctl status plasma-kglobalaccel.service
Unit plasma-kglobalaccel.service could not be found.

In the thread: I come across the “/etc/xdg/autostart” directory.
In there I see:

-rw-r–r–. 1 root root 1.4K Apr 16 02:00 kglobalacceld.desktop

Its contents is:

cat kglobalacceld.desktop
[Desktop Entry]
Name=Global Shortcuts
Name[ar]=اختصارات عامة
Name[ast]=Atayos globales
Name[bg]=Глобални клавишни комбинации
Name[ca]=Dreceres globals
Name[ca@valencia]=Dreceres globals
Name[cs]=Globální zkratky
Name[de]=Globale Kurzbefehle
Name[en_GB]=Global Shortcuts
Name[eo]=Ĉieaj Ŝparvojoj
Name[es]=Atajo de teclado globales
Name[eu]=Lasterbide globalak
Name[fa]=میان‌بر های چهانی
Name[fi]=Työpöydänlaajuiset pikanäppäimet
Name[fr]=Raccourcis globaux
Name[gl]=Atallos globais
Name[hu]=Globális gyorsbillentyűk
Name[ia]=Vias Breve Global
Name[it]=Scorciatoie globali
Name[ka]=გლობალური მალსახმობები
Name[ko]=전역 단축키მ
Name[nl]=Globale sneltoetsen
Name[nn]=Globale snarvegar
Name[pl]=Skróty globalne
Name[pt_BR]=Atalhos globais
Name[ro]=Scurtături globale
Name[ru]=Глобальные комбинации клавиш
Name[sa]=वैश्विक संक्षिप्तमार्गाः
Name[sk]=Globálne skratky
Name[sl]=Globalne bližnjice
Name[ta]=முழுதளாவிய சுருக்குவழிகள்л
Name[tr]=Global Kısayollar
Name[uk]=Загальні скорочення
Name[x-test]=xxGlobal Shortcutsxx

Is this info you expected or is something wrong? To me it is a jibberish.

Thank you very much for your help.

This asks for a system service. plasma-kglobalaccel.service is started on the user/session bus, so use this invocation instead:

systemctl --user status plasma-kglobalaccel.service

But the fact that systemd has apparently started it, according to your logs, is an indication that the problem might be elsewhere. The “NoSuchComponent” error could be related, one would have to know more about the inner workings about kglobalaccel though than I do at the moment.

Hello again, I have tried the command you gave me:

systemctl --user status plasma-kglobalaccel.service
○ plasma-kglobalaccel.service - KDE Global Shortcuts Server
Loaded: loaded (/usr/lib/systemd/user/plasma-kglobalaccel.service; static)
Drop-In: /usr/lib/systemd/user/service.d
Active: inactive (dead) since Sat 2024-05-11 06:38:38 CEST; 1h 11min ago
Process: 2125 ExecStart=/usr/libexec/kglobalacceld (code=exited, status=0/SUCCESS)
Main PID: 2125 (code=exited, status=0/SUCCESS)
CPU: 42ms

May 11 06:38:38 Fedora-KDE systemd[1858]: Starting plasma-kglobalaccel.service - KDE Global Shortcuts Server.>
May 11 06:38:38 Fedora-KDE systemd[1858]: Started plasma-kglobalaccel.service - KDE Global Shortcuts Server.
The service is loaded but inactive since directly after boot.

I just manually re-started it and it is inactive straight away, meaning in this case after 36mS.

Is this a bug and if so should I report it t

Thanks again for your help

Hi, I just tried your use case here locally. My plasma-kglobalaccel.service is also “inactive (dead)”, I figure it just gets started on demand when another program (KWin and/or settings) asks for it. However, in my setup I’m not seeing the same error if I make a new “Command or script” for libreoffice --calc. The application starts as intended.

I’m sure there is a bug somewhere, but I don’t know enough about the code to pinpoint it. Sorry for not being more helpful here. I think opening a bug report would be reasonable thing to do, I could see either the Fedora or KDE bug trackers being a good next step. Unless someone more knowledgeable shows up here and has a good idea.

Hi, thank you very much for all you’ve done.

I will file a bugreport in both addresses. Hopefully somebody finds out what is the cause.
Thanks again, have a great weekend, or what is left of it.

1 Like

Yeah, this current Apple like settings… :tired_face: :tired_face: :tired_face:

On Wayland kglobalaccel is not a standalone process but part of the compositor, so it’s expected to not be running

I have just found out when I create a new user and log in as that user it does work. I can add shortcuts. In my normal user it doesn’t work.
It must be something in my environment, but what?

Hi, do you have an idea what could be wrong in my setup? As I wrote when using a different user it works, with other people on the Fedora forum, where I also have this thread active, it works.
What is causing this behavior?

I thought I had found the reason, but after some time it turned it is not it.

Since many years I use a keyboard layout called Eurkey, it can be added to your keyboard in the KDE settings. This layout makes it possible to use characters like ä, ü, ö, ï, ë, ß, ñ, etc. Just a combination of the right Ctrl key with a certain letter.
When adding shortcuts worked in a different user environment I started thinking what is different? I found the Eurkey keyboard layout.

I logged in into my own user account, removed the layout and rebooted. It then worked.
I added the layout again and it still worked. So, it is not that.

I now did a complete re-install, which takes only a few hours and I could add shortcuts, added the keyboard layout and am a happy Fedora KDE user again.
Difficult to say what is the reason, must have been something in my former account, but what?
I now close this thread because I have a nice working computer and can go on with my business.
Thanks for the help. Bye

1 Like