1

I'm trying to integrate my JS code with unity using low level dbus messaging. I'm able to set launcher icon properties (progress, count, menu etc) for known .desktop files ( for example, "gnome-terminal.desktop" ) Also, I can create my own .desktop file, but it's only visible in launcher if I drag & drop it from /usr/share/applications onto launcher. If I just click on .desktop file, new window causes opening new entry on launcher not associated with that .desktop file. I think I'm missing some step where I tell some service ( Registrar? ) that the window I created is part of my .desktop

script started by clicking on desktop icon (no .desktop icon in launcher menu, "unknown icon" window icon for new window: screen shot 2014-09-30 at 12 36 50 pm

Drag & drop .desktop file to launcher. Now have two icons, and results of LauncherEntry progress updates visible on the first one. screen shot 2014-09-30 at 12 37 51 pm

So the question is "how do I tell unity that my window belongs to that .desktop file"

my script and .desktop file: https://gist.github.com/sidorares/8d0587e384176f1be83d (I'm using node-x11, node-dbus and node-dbusmenu)

1

Found answer by looking at bamf source - you need to set _NET_WM_DESKTOP_FILE property to be full path to desktop file.

  • Thanks Andrey very much for this question and solution. So if I change the desktop file to be full path, then it will change the icon in the launcher right away? And will _NET_WM_ICON propery have to be set to change the icon in the alt+tab panel? – Noitidart Nov 25 '14 at 1:16
  • Hi @AndreySidorov I have a desktop.file that launches a window. The iconpath is a name in the themes i added, its name is "profilist_beta". I overwrite the icons in the /home/noit/share/icons/hicons/##_##/apps/profilist_beta.png and then the desktop file on the desktop refreshes the icon, however the alt+tab and unity bar dont take the menu. Will this solution you shared, of setting the _NET_WM_DESKTOP_FILE to the path of the desktop file make the windows take? – Noitidart Jan 10 '15 at 8:02
  • here is a screencast of my dilemma. It also shows a smaller issue in that the desktop file icon does not update till I click/select the icon. Youtube :: Delay Dynamically Updating Desktop File and Dependents – Noitidart Jan 10 '15 at 8:31
  • For the issue where the icon doesnt update of the desktop file till you click the desktop file or select it. I found clicking on a file epxlorer window also updates the desktop file icon. Just wanted to let you know in case it would give you better understandng :) – Noitidart Jan 10 '15 at 9:18
  • 1
    don't know :) try and see – Andrey Sidorov Mar 5 '15 at 1:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.