After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 448817 - Being able to configure autostart from orca's settings?
Being able to configure autostart from orca's settings?
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Low enhancement
: 2.24.0
Assigned To: Rich Burridge
Orca Maintainers
: 515196 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-06-18 15:53 UTC by Samuel Thibault
Modified: 2008-05-21 22:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revision #1. (7.69 KB, patch)
2008-05-13 16:23 UTC, Rich Burridge
none Details | Review
Revision #2. (7.74 KB, patch)
2008-05-13 19:18 UTC, Rich Burridge
committed Details | Review
Extra patch to prevent traceback with application preferences. (929 bytes, patch)
2008-05-21 22:01 UTC, Rich Burridge
none Details | Review

Description Samuel Thibault 2007-06-18 15:53:18 UTC
Hi,

Maybe orca's setting panel should include an "autostart" checkbox that enables orca in the gnome session startup list?  That way, all people would have to do right after distribution installation is running orca by hand once and then select "autostart" during the initial orca configuration, and then they're done...
Comment 1 Willie Walker 2007-06-18 16:02:41 UTC
Having an option in Orca to tell it to configure autostart somewhere is definitely a very interesting idea.  The problem is figuring out what the appropriate "somewhere" is.  Right now, there seem to be at least two competing "somewheres", which include the gnome-session autostart stuff as well as the accessibility preferences stuff.
Comment 2 Samuel Thibault 2007-06-18 16:07:37 UTC
Well, the "somewhere" should be a place where the user automatically gets when starting orca for the first time, since it is something he will most often want to enable. Alternatively, this could be in the usual gnome-session autostart stuff, and orca would have a dedicated first-start box that will enable it there (I hope gconf permits such cross-configuration).
Comment 3 Willie Walker 2008-02-08 13:56:38 UTC
*** Bug 515196 has been marked as a duplicate of this bug. ***
Comment 4 Willie Walker 2008-02-08 13:58:07 UTC
Another possibility (from Chris Norman in duplicate bug 515196):

"I think that it would be easier for new users to get orca after login if there
was a checkbox for it in the main preferences for it. Something like: "Activate
orca upon login", which automatically changed to appropriate value, as it is
quite a challenge, even for an experienced computer user to dig through the
menus to find the actual setting."

Comment 5 Willie Walker 2008-03-11 14:06:48 UTC
First coarse pass at GNOME 2.24 planning.
Comment 6 Rich Burridge 2008-05-13 16:23:58 UTC
Created attachment 110860 [details] [review]
Revision #1.

Here's the first cut at implementing this feature. I think I've
got it working nicely (at least on my Ubuntu Hardy system), but
it's possible that this isn't going to work on other Linux systems
or OpenSolaris.

Perhaps Joanie and/or Will can try this first. Or if you are
adventurous, just go for it.

There is a new checkbox on the General pane of the Orca Preferences.
It's the last one (label: "Start Orca when you login").

If you enable (check) it, then it'll copy the
/usr/share/applications/orca.desktop file under ~/.config/autostart
(creating that directory if it doesn't exist).

If you disable (uncheck) it, then it'll remove 
~/.config/autostart/orca.desktop.

It plays nicely with the gnome-session-properties application, but as
Will points out, there is another way that you can enable Orca at
startup; with the gnome-default-application-properties application.

This change doesn't play well with that application, but having
said that, that application doesn't play well with 
gnome-session-properties, so I think that is a separate problem 
that perhaps should be fixed in the
gnome-default-application-properties application. I'm also not
sure if gnome-default-application-properties is present on all systems.
Comment 7 Rich Burridge 2008-05-13 19:18:47 UTC
Created attachment 110869 [details] [review]
Revision #2.

Version that uses the variables in platform.py
Comment 8 Willie Walker 2008-05-15 19:14:25 UTC
(In reply to comment #7)
> Created an attachment (id=110869) [edit]
> Revision #2.
> 
> Version that uses the variables in platform.py
> 

I tried this and it works well for me -- thanks!  It also occurred to me that we should handle the case where the user doesn't have a writable home directory.  In this case, a simple try/except around the attempt to create/delete the file should be fine.

In the larger case, I wonder if we should even allow the preferences dialog to be brought up and/or if we should allow settings changes to be more temporary.  The only use case I can think of for this, however, is the login screen where gdm might not have a writable directory.  The amount of work we might need to do to support temporary settings changes for this one use case seems like it might not be worth the effort.
Comment 9 Rich Burridge 2008-05-15 19:41:32 UTC
> It also occurred to me that
> we should handle the case where the user doesn't have a writable home
> directory.  In this case, a simple try/except around the attempt to
> create/delete the file should be fine.

Isn't there already a try/except block around all that code,
that just return a status of false if it can't do any of:

            os.chdir(autostartDir)
            os.mkdir(autostartDir)
            shutil.copy(systemDesktopFile, userDesktopFile)
            os.remove(userDesktopFile)

?

If that's not what you meant, can you explain in more detail?

Thanks.
Comment 10 Willie Walker 2008-05-15 20:18:14 UTC
Whoops - you're right.  Nice job!
Comment 11 Mike Pedersen 2008-05-20 18:11:49 UTC
After testing this on a couple machines as well as talking with Rich about the intended behavior I think this looks good. 
Comment 12 Rich Burridge 2008-05-20 23:19:47 UTC
So where are we with this one? I think Will and Mike like it.
Shall I check it in and move it to "[pending]"?
Comment 13 Willie Walker 2008-05-21 11:29:56 UTC
(In reply to comment #12)
> So where are we with this one? I think Will and Mike like it.
> Shall I check it in and move it to "[pending]"?

I think it is OK to check this in because it solves a problem that comes up on the list frequently.  The open issues are these, but we can resolve those 'under the covers' without requiring a string change:

1) There are multiple ways to select the autostart of AT's.  This patch chooses one of them, which is the generic GNOME approach.

2) The RedHat folks are looking to redo the approach for autostarting AT's: http://blogs.gnome.org/mccann/2008/05/19/ease-of-access/.  We should monitor this activity and potentially modify our 'under the covers' work to match if appropriate.
Comment 14 Rich Burridge 2008-05-21 16:58:28 UTC
Okay. Understood. Patch committed. Moving to "[pending]" for now.

Thanks.
Comment 15 Rich Burridge 2008-05-21 22:01:11 UTC
Created attachment 111305 [details] [review]
Extra patch to prevent traceback with application preferences.

If we are pressing Apply or OK from an application 
preferences dialog (rather than the general Orca 
preferences), then there won't be a general pane, 
so we won't be able to adjust the login checkbox. 
Just catch the failure and carry on.

Patch committed. Bug still FIXED.