should provide an IsUnityRunning() dbus method

Bug #687958 reported by Sebastien Bacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
Invalid
Medium
Unassigned
unity (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Having a IsUnityRunning() interface provided by unity over dbus would be useful for software-center or other applications that will need to check on what desktop they are running to adapt their behaviour.

Tags: bitesize
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

definitively needed, right.

Changed in unity:
status: New → Triaged
Changed in unity (Ubuntu):
status: New → Triaged
Changed in unity:
importance: Undecided → Medium
Changed in unity (Ubuntu):
importance: Undecided → Medium
tags: added: bitesize
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Note that it should be in the panel itself, not the service as the service can live even it unity panel crashed.

Michael Terry (mterry)
Changed in unity:
assignee: nobody → Michael Terry (mterry)
status: Triaged → In Progress
Revision history for this message
Michael Terry (mterry) wrote :

You don't need an actual dbus function call for this, do you? Just check if the name 'com.canonical.Unity' is owned.

Changed in unity:
assignee: Michael Terry (mterry) → nobody
status: In Progress → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

Not sure, I think Didier had concerns about that, Didier?

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Indeed, that doesn't work, the name is owned by the unity-panel-service IIRC. This doesn't mean that the graphic display is there (for instance, if you do disable it after launching it in ccsm, or metacity --replace, or if it crashes…) So the method should be answered by the panel, not the service (or the service should ping the panel…)

Revision history for this message
Paul Sladen (sladen) wrote :

Perhaps you actually want something like isInitialised() or isReady()... this would cope with start-up delays, possibly crashes (yes, these happen).

Revision history for this message
Alex Launi (alexlauni) wrote :

I don't understand why checking if com.canonical.Unity is owned doesn't work. That name is *not* owned by the Unity panel service.

Revision history for this message
Alex Launi (alexlauni) wrote :

@Didier, you are thinking of com.canonical.Unity.Panel.Service, not com.canonical.Unity.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote : Re: [Bug 687958] Re: should provide an IsUnityRunning() dbus method

Completely agree with Alex. Check if com.canonical.Unity is owned. If
this doesn't work for some reason, then that's the thing we need to
fix.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I didn't know that one, ok, make sense then :) Thanks guys!

Changed in unity (Ubuntu):
status: Triaged → Invalid
Changed in unity:
status: Incomplete → Invalid
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

For reference:

The relevant DBus method is org.freedesktop.DBus.NameHasOwner(in s
name) -> out b has_owner

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.