protonscr

Indicate download progress in task bar through Unity Launcher API

steamopen Feature RequestSteam client
ValveSoftware/steam-for-linux#4777 · opened 2016-12-27 by kbroulik · updated 2023-05-26 · 7 comments · github
Kkbroulik 2016-12-27 github

Your system information

  • Steam client version: 1482202190
  • Distribution (e.g. Ubuntu): kde neon (based on Ubuntu 16.04 LTS)
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

On Windows, Steam client indicates download progress in taskbar. The same same could be done on Linux using the Unity Launcher API which is supported by both Unity and KDE Plasma 5. You can find the documentation here [1].

Basically, it's just a matter of emitting a DBus signal, e.g.
/com/steam/UnityLauncher (path)
com.canonical.Unity.LauncherEntry (interface)
Update (name)
with a signature of "sa{sv}" with the following arguments:
string(s) "application://steam.desktop" (desktop file name of steam
client)
variant map(a{sv}) { "progress-visible": true, "progress": 0.5 }

This is what this would look like on KDE Plasma 5:
screenshot_20161227_123036

PPlagman 2016-12-30 github

If you had an example of a dbus-send commandline that did the correct thing on KDE and Unity desktops, I could take a quick stab at it.

Kkbroulik 2016-12-30 github

Unfortunately you cannot send a{sv} through dbus-send ("Also, dbus-send does not permit empty containers or nested containers (e.g. arrays of variants)."), here's the corresponding gdbus call:

gdbus emit --session --object-path /com/steam/UnityLauncher --signal com.canonical.Unity.LauncherEntry.Update "application://steam.desktop" "{'progress-visible': <true>, 'progress': <0.5>}"
PPlagman 2016-12-30 github

Thanks, gdbus should be fine too, but I'm not really seeing much success using that command. I started Steam through the applications menu in my KDE session, so the desktop should be well aware that the running app corresponds to steam.desktop, but the command isn't doing much of anything to the taskbar entry on my end. Running Kubuntu 16.10 here. Do you know if that's supposed to be supported there?

Aask-compu 2017-06-29 github

will this ever be added to steam?

Sssokolow 2017-08-08 github

@Plagman This StackOverflow answer says that it's supported from Plasma 5.6 onward and packages.ubuntu.com says that 16.10 has Plasma 5.7, so it should be supported.

That answer also has instructions for making it work in a Qt application that you could double-check against to see if anything stands out.

Failing that, you could try the KJob API which mixes progress dialogs in with the libnotify popups. I'm still on a Lubuntu/Kubuntu 14.04 LTS hybrid, so I don't know if any KDE 5 applications use it, but it's gotta still be supported for compatibility with the KDE 4 applications that haven't been ported yet.

Kkbroulik 2019-04-21 github

Given it's been two years, it's likely it works in a more recent Plasma version? Running the command I pasted earlier works just fine here. I just checked the git code and the application:/ prefix was only supported from Plasma 5.8 onwards which explains why it didn't work on your Kubuntu 16.10. Sorry about that and the late reply :)

Aask-compu 2023-05-26 github

Unfortunately you cannot send a{sv} through dbus-send ("Also, dbus-send does not permit empty containers or nested containers (e.g. arrays of variants)."), here's the corresponding gdbus call:

gdbus emit --session --object-path /com/steam/UnityLauncher --signal com.canonical.Unity.LauncherEntry.Update "application://steam.desktop" "{'progress-visible': <true>, 'progress': <0.5>}"

tested this command on Kubuntu 22.04 and it seems to work

Nothing extracted yet.