Use XDG autostart to launch indicator

Bug #667273 reported by Luca Ferretti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Indicator
Fix Released
Undecided
Unassigned

Bug Description

Currently the UbuntuOne indicator needs to be manually launched. Could be good use the XDG autostart spec[1] and gnome-session facilities to automatically launch it at login.

Basically, all you need is move installed .desktop from /usr/share/applications (i.e. $XDG_DATA_DIRS/applications/) to /etc/xdg/autostart (i.e. $XDG_CONFIG_DIRS).
This will make also Ubuntu One Indicator entry appears in Startup Applications preferences tool, allowing users to enable/disable.

In order to avoid launching U1 Indicator when the user doesn't have an U1 account, you could use the same trick available in
/etc/xdg/autostart/ubuntuone-launch.desktop, i.e. use

    Exec=/bin/sh -c '[ -d "$HOME/Ubuntu One" ] && ubuntuone-indicator'

as Exec key (unless this check is yet perfomed in ubuntone-indicator itself).

Please also note that ubuntuone-launch.desktop is using "X-GNOME-Autostart-Delay=30", so you could delay u1-indicator launch too in order to avoid loading immediately at login (slowing down login itself)

[1] http://standards.freedesktop.org/autostart-spec/autostart-spec-0.5.html

Revision history for this message
Roman Yepishev (rye) wrote :

My original intention to prevent autostarting was to prevent early startup of syncdaemon that would have caused even more login slowdowns. Now that is fixed I can create autostart entry.

The question is whether to add it globally or for the user upon initial application startup?

At the moment I see occasional (though rare) crashes of ubuntuone-indicator due to BadMatch X error. That's actually the reason why indicator does not hide itself when idle. If it is not shown then it must have crashed.

I think I should set ubuntuone-indicator to auto-restart after failures but that would clash with existing entries for ubuntuone-indicator (most likely) so I will need to handle the existing .desktop file in autostart directory too.

Roman Yepishev (rye)
Changed in one-indicator:
status: New → Fix Committed
Roman Yepishev (rye)
Changed in one-indicator:
status: Fix Committed → Fix Released
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.