Bug 454000 - current activity information doesn't change
Summary: current activity information doesn't change
Status: RESOLVED NOT A BUG
Alias: None
Product: kactivitymanagerd
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.24.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-18 16:29 UTC by Yuuki Harano
Modified: 2022-08-17 04:53 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuuki Harano 2022-05-18 16:29:29 UTC
SUMMARY

I want to get the name of the current activity via dbus.
But I always get the same information.

STEPS TO REPRODUCE

While running the following code, I should get the current activity information:
----
while :; do
CurrentActivity=$(dbus-send --session --dest=org.kde.ActivityManager \
  --type=method_call --print-reply=literal /ActivityManager/Activities \
  org.kde.ActivityManager.Activities.CurrentActivity | tr -d "[:blank:]")

dbus-send --session --dest=org.kde.ActivityManager --type=method_call \
  --print-reply /ActivityManager/Activities \
  org.kde.ActivityManager.Activities.ActivityInformation \
  "string:$CurrentActivity"

sleep 1
done
----

OBSERVED RESULT

I always get the following output:
----
method return time=1652890189.574943 sender=:1.16 -> destination=:1.3398 serial=3376 reply_serial=2
   struct {
      string "4904d430-4ad8-40bf-80bf-ab19fb833260"
      string "Default"
      string ""
      string ""
      int32 2
   }
----

After switching focus or starting another app, the output does not change.

EXPECTED RESULT

The command outputs the correct information.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

Wayland.
Comment 1 Eric Edlund 2022-08-14 16:31:28 UTC
The script works for me. I copied it right into my terminal on wayland. Still broken for you?
Comment 2 Yuuki Harano 2022-08-15 11:58:16 UTC
Yes, it is still broken.
I ran the script again, but always got the following result.

```
method return time=1660564057.531871 sender=:1.19 -> destination=:1.608 serial=548 reply_serial=2
   struct {
      string "4904d430-4ad8-40bf-80bf-ab19fb833260"
      string "Default"
      string ""
      string ""
      int32 2
   }
```
Comment 3 Eric Edlund 2022-08-15 20:49:34 UTC
Are you on the latest version of plasma? 5.25.4
Comment 4 Yuuki Harano 2022-08-16 15:24:41 UTC
I updated to 5.25.4 now, but still the same.

----
luna:~ % pacman -Qs plasma | grep local/plasma-
local/plasma-browser-integration 5.25.4-1 (plasma)
local/plasma-desktop 5.25.4-1 (plasma)
local/plasma-disks 5.25.4-1 (plasma)
local/plasma-firewall 5.25.4-1 (plasma)
local/plasma-framework 5.97.0-1 (kf5)
local/plasma-integration 5.25.4-1 (plasma)
local/plasma-nm 5.25.4-1 (plasma)
local/plasma-pa 5.25.4-1 (plasma)
local/plasma-sdk 5.25.4-1 (plasma)
local/plasma-systemmonitor 5.25.4-1 (plasma)
local/plasma-thunderbolt 5.25.4-1 (plasma)
local/plasma-vault 5.25.4-1 (plasma)
local/plasma-wayland-session 5.25.4-1
local/plasma-workspace 5.25.4-1 (plasma)
local/plasma-workspace-wallpapers 5.25.4-1 (plasma)
luna:~ % 
----

----
method return time=1660663193.116811 sender=:1.19 -> destination=:1.162 serial=128 reply_serial=2
   struct {
      string "4904d430-4ad8-40bf-80bf-ab19fb833260"
      string "Default"
      string ""
      string ""
      int32 2
   }
----
Comment 5 Ivan Čukić 2022-08-16 16:09:08 UTC
- Does Plasma react to activity change?
- What do you get when you try to change the current activity via dbus?
- What do you get when you list all activities via dbus?
Comment 6 Yuuki Harano 2022-08-17 04:53:04 UTC
I'm very very sorry!  I have misunderstood "activity".
I have thought it is something like "application".

Now, I created a new activity, switched between it and the default,
and I could get the current activity name.

----
method return time=1660711391.549389 sender=:1.20 -> destination=:1.170 serial=196 reply_serial=2
   struct {
      string "4b80d0b3-7c4a-4b31-b537-1f5b3d6d729b"
      string "Mine2"
      string ""
      string "activities"
      int32 2
   }
----

I'm closing this issue.