Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Spectacle cannot be invoked by shortcut (hotkey)

  1. #1
    Join Date
    Jan 2016
    Location
    Manchester, UK
    Posts
    279

    Default Spectacle cannot be invoked by shortcut (hotkey)

    Good morning,

    I recently found Spectacle cannot be invoked by shortcuts any more in my KDE Plasma desktop. It's happened since openSUSE Tumbleweed snapshot 20170502 or a little earlier. I cannot be exactly sure because I reinstalled my system using snapshot 20170429. Before this, the shortcuts work very well.

    Also, `Win+PrtScr`, `Meta+PrtSc` and 'Shift+PrtSc` do not work.

    I tried to change the default shortcut from PrtSc (Print) to other like "Ctrl+I". The new shortcut does not work either. But I can start Spectacle from kickstart menu and it works well from there.

    Then I looked into the "Action" tab in the shortcuts settings page, it has following configurations:
    ```
    Remote application: org.kde.Spectacle
    Remote object: /
    Function: StartAgent
    Arguments:
    ```

    Any suggestions to bring the shortcut feature back?

    My environment is,
    Code:
    openSUSE Tumbleweed: 20170510
    KDE Plasma: 5.9.5
    Qt: 5.7.1
    KDE Frameworks: 5.33.0
    Kernel: 4.10.13-1-default
    Regards,
    CnZhx
    Last edited by cnzhx; 13-May-2017 at 01:49. Reason: Add situations including other shortcuts related to Spectacle.
    openSUSE Tumbleweed (usually the latest snapshot) w/ KDE Plasma 5

  2. #2

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Hm, works fine here (42.2, but with the latest KDE packages from the Tumbleweed devel projects).

    The "Action" settings you posted are the same here too.

    Some random things to check:
    Are the shortcuts activated? There is a checkbox next to them in "Custom Shortcuts" that should be filled (you may have to enlarge the window or use the scrollbars to see them though)
    Does spectacle start if you click on the "Call" button in the "Action" tab?
    Do other shortcuts work?
    Does it work on a fresh user account?
    Is kglobalaccel5 running?

    Oh, and just for clarification:
    This is a standard X11 session, right?
    Or are you using Plasma on Wayland?
    Last edited by wolfi323; 13-May-2017 at 02:44.

  3. #3
    Join Date
    Jan 2016
    Location
    Manchester, UK
    Posts
    279

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Thank you, @wolfi323,

    I think I am using a standard X11. (BTW, I tried to find out how to test Wayland but failed to start Plasma on Wayland.)

    Followed your hints, I found that:
    • All entries for the Spectacle are selected in the Shortcuts settings page (with the blue square block).
    • The "call" button in the "Action" tab does not work though.
    • This shortcut in a new user profile works. (I should really learn to use this method but I cannot recall this on a new problem )


    Then, do you happen to know how can I solve this in my current profile? I really don't want to rebuild **all** the configuration files.

    Thanks again for your valuable advice.
    openSUSE Tumbleweed (usually the latest snapshot) w/ KDE Plasma 5

  4. #4

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by cnzhx View Post
    I think I am using a standard X11. (BTW, I tried to find out how to test Wayland but failed to start Plasma on Wayland.)
    You need the package plasma5-session-wayland installed, then you'd get an entry "Plasma5/Wayland" on the login screen.

    But the shortcuts should work on X11.
    And actually I'm not sure if they would work on Wayland currently, because these things have changed completely on Wayland (because only the compositor, i.e. kwin itself, can implement global shortcuts there, i.e. kglobalaccel5 won't work at all).

    The "call" button in the "Action" tab does not work though.
    Ok, so apparently this is the problem, the DBUS service cannot be started.

    As it works on a fresh user account, it doesn't seem to be an installation problem though.

    Hm.
    One thing I could imagine is that the DBUS service already exists for some reason, but doesn't react.
    I would suggest to check if spectacle is already running (in the system monitor that appears when you press Ctrl+ESC e.g.). If it is, try to kill it and see if it helps.

    And maybe try to delete spectacle's config file (~/.config/spectaclerc), though I don't really think that could cause a problem like you describe.

  5. #5
    Join Date
    Jan 2016
    Location
    Manchester, UK
    Posts
    279

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by wolfi323 View Post
    You need the package plasma5-session-wayland installed, then you'd get an entry "Plasma5/Wayland" on the login screen.
    Thanks, I will try this later. I always want to take a look at this new stuff :-)

    Quote Originally Posted by wolfi323 View Post
    Ok, so apparently this is the problem, the DBUS service cannot be started.

    As it works on a fresh user account, it doesn't seem to be an installation problem though.

    Hm.
    One thing I could imagine is that the DBUS service already exists for some reason, but doesn't react.
    I would suggest to check if spectacle is already running (in the system monitor that appears when you press Ctrl+ESC e.g.). If it is, try to kill it and see if it helps.

    And maybe try to delete spectacle's config file (~/.config/spectaclerc), though I don't really think that could cause a problem like you describe.
    I have done some testing but none of them work. Some of following results are answer to your advice/guess.

    • Spectacle is not running when I does not run it from kickstart menu.
    • Spectacle does have nothing to with this.
    • ~/.config/kglobalshortcutsrc has nothing to do with this.
    • ~/.config/khotkeysrc **might** be the config for this, but I do not know how to regenreate this configuration file.


    I guess, it is because the UUID used to identify the call to org.kde.spectacle in `~/.config/khotkeysrc` should be consistent with some other configuration in current user profile. But I could not find the connection or file. I tried to copy and replace this configuration file from the new user directory, and with a reboot, but it doesn't work.
    Last edited by cnzhx; 13-May-2017 at 08:49. Reason: Replace khotkeysrc with a the one from a new profile doesn't work
    openSUSE Tumbleweed (usually the latest snapshot) w/ KDE Plasma 5

  6. #6

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by cnzhx View Post

    • Spectacle does have nothing to with this.
    Spectacle can be run in two ways, as application (e.g. from the application menu), or as background service.
    The latter is used by the pre-defined hotkey, its action "StartAgent" is called via DBUS to open a Spectacle window.

    It is started as background service via "spectacle --dbus". Does it (clicking on "Call" or pressing the keyboard shortcut) work if you run that manually?
    Does org.kde.Spectacle show up in qdbusviewer or qdbusviewer-qt5 when you run it manually like that in a konsole? And does clicking on its "StartAgent" method (to call it) in qdbusviewer open the spectacle window then?



    • ~/.config/kglobalshortcutsrc has nothing to do with this.
    • ~/.config/khotkeysrc **might** be the config for this, but I do not know how to regenreate this configuration file.
    If the "Call" button does not start Spectacle either, the problem is not related at all to the hotkeys/shortcut configs or even the shortcuts daemon IMHO.
    Last edited by wolfi323; 13-May-2017 at 08:59.

  7. #7
    Join Date
    Jan 2016
    Location
    Manchester, UK
    Posts
    279

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by wolfi323 View Post
    Spectacle can be run in two ways, as application (e.g. from the application menu), or as background service.
    The latter is used by the pre-defined hotkey, its action "StartAgent" is called via DBUS to open a Spectacle window.
    Good to know that. I always feel it difficult for me understand dbus related topic.

    Quote Originally Posted by wolfi323 View Post
    It is started as background service via "spectacle --dbus". Does it (clicking on "Call" or pressing the keyboard shortcut) work if you run that manually?
    Does org.kde.Spectacle show up in qdbusviewer or qdbusviewer-qt5 when you run it manually like that in a konsole? And does clicking on its "StartAgent" method (to call it) in qdbusviewer open the spectacle window then?
    I am not sure I get you correctly. Do you mean run `spectacle --dbus` in Konsole? I tried it in Konsole and krunner, and both give me nothing (no response and just a blink cursor in Konsole which can only be terminated by Ctrl+c).

    Update:
    This command does have an effect: after running it, there is a new process `spectacle` in System Monitor but no other effects.

    Here are some results,
    • the "Call" button does not work (no response) and the "Launch D-Bus Browser" button has no effect either.
    • It seems I have no qdbusviewer or qdbusviewer-qt5 package installed in my system. And zypper search for these two names with default repos gives no result.
    Last edited by cnzhx; 13-May-2017 at 09:23. Reason: Add update for new process `spectacle` in System Monitor
    openSUSE Tumbleweed (usually the latest snapshot) w/ KDE Plasma 5

  8. #8

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by cnzhx View Post
    I am not sure I get you correctly. Do you mean run `spectacle --dbus` in Konsole?
    Yes.
    And you need to run it as user, not root (e.g. via su or sudo).

    I tried it in Konsole and krunner, and both give me nothing (no response and just a blink cursor in Konsole which can only be terminated by Ctrl+c).
    Of course, it keeps running and listens to commands via DBUS.
    In other words, you should *not* terminate it with Ctrl+C before you try the other tests (clicking "Call" or running qdbusviewer).

    I probably should have mentioned that, sorry.

    Just to be sure, check again for running spectacle processes (and kill them) before you run it.

    It seems I have no qdbusviewer or qdbusviewer-qt5 package installed in my system. And zypper search for these two names with default repos gives no result.
    qdbusviewer-qt5 is part of the libqt5-qttools package which is required by plasma5-workspace (without it the desktop wouldn't even start), so you definitely should have it installed. qdbusviewer is the Qt4 version and is part of libqt4-x11.

    Btw, you can enter something like "cnf qdbusviewer" to find out which package contains a certain shell command or application.
    Last edited by wolfi323; 13-May-2017 at 09:28.

  9. #9
    Join Date
    Jan 2016
    Location
    Manchester, UK
    Posts
    279

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by wolfi323 View Post
    Of course, it keeps running and listens to commands via DBUS.
    In other words, you should *not* terminate it with Ctrl+C before you try the other tests (clicking "Call" or running qdbusviewer).

    I probably should have mentioned that, sorry.

    Just to be sure, check again for running spectacle processes (and kill them) before you run it.
    Ok, now I performed following tests in sequence,
    • Reboot my system;
    • Run `spectacle --dbus` in Konsole and keep it running;
    • Make sure there is `spectacle` in System Monitor;
    • Navigate to Settings -> Shortcuts and click "call" and "Launch D-Bus Browser" buttons.

    But the buttons give me nothing. Maybe there is something wrong with my D-Bus Browser because I tried to activate the "Launch D-Bus Browser" button in other entry named "Perform D-Bus call 'qdbus org.kde.krunner /App display'", and it does not work either.

    Quote Originally Posted by wolfi323 View Post
    qdbusviewer-qt5 is part of the libqt5-qttools package which is required by plasma5-workspace (without it the desktop wouldn't even start), so you definitely should have it installed. qdbusviewer is the Qt4 version and is part of libqt4-x11.

    Btw, you can enter something like "cnf qdbusviewer" to find out which package contains a certain shell command or application.
    Thanks for these information :-)
    openSUSE Tumbleweed (usually the latest snapshot) w/ KDE Plasma 5

  10. #10

    Default Re: Spectacle cannot be invoked by shortcut (hotkey)

    Quote Originally Posted by cnzhx View Post
    But the buttons give me nothing. Maybe there is something wrong with my D-Bus Browser because I tried to activate the "Launch D-Bus Browser" button in other entry named "Perform D-Bus call 'qdbus org.kde.krunner /App display'", and it does not work either.
    And what about qdbusviewer-qt5?
    Is org.kde.Spectacle listed there?

    The "D-BUS Browser" has nothing to do with whether "Call" or the shortcuts work. Actually this would just run qdbusviewer, which is a tool to display all D-BUS services and their methods and signals... It's not needed at all for proper system operation.
    The problem here is that we renamed the Qt5 qdbusviewer to qdbusviewer-qt5 in openSUSE (to make it not conflict with the Qt4 version), but apparently "forgot" to patch this settings module to run qdbusviewer-qt5 instead. (apparently you do not have qdbusviewer installed, but qdbusviewer-qt5 should be there as mentioned)

    And if DBUS wouldn't work in general, the desktop wouldn't start either.

    Btw, a workaround may be to just assign a shortcut to the spectacle menu entry in the menu editor...
    (or create a new shortcut in the shortcuts settings that runs spectacle normally)
    Last edited by wolfi323; 13-May-2017 at 10:30.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •