Autostart from DBus (for gtg_new_task)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTG |
Fix Released
|
Low
|
Luca Invernizzi |
Bug Description
As set up, gtg_new_task only works if gtg is already running. This is unnecessary and can be fixed with simple changes to that script and addition of a .service file.
Add file: /usr/share/
"""
[D-BUS Service]
Name=org.GTG
Exec=/usr/bin/gtg
"""
and change the get_task() function of gtg_new_task to
"""
def get_task() :
#We will connect on the session bus
bus = dbus.SessionBus()
liste = bus.list_names()
busname = "org.GTG"
remote_object = bus.get_
timi = dbus.Interface(
#Calling the method
timi.
"""
The existing code searches for an already existing bus rather than trying to connect automatically so wouldn't work with just the addition of the .service file above.
(I don't know if .service files are meant to be provided by applications or distributions)
Related branches
Changed in gtg: | |
importance: | Undecided → Low |
milestone: | none → 0.3 |
status: | New → Confirmed |
Changed in gtg: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Luca Invernizzi (invernizzi) |
Changed in gtg: | |
milestone: | 0.3 → 0.2.2 |
Changed in gtg: | |
status: | Fix Committed → Fix Released |
It works well, thanks!