GNOME Bugzilla – Bug 448817
Being able to configure autostart from orca's settings?
Last modified: 2008-05-21 22:01:11 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...
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.
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).
*** Bug 515196 has been marked as a duplicate of this bug. ***
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."
First coarse pass at GNOME 2.24 planning.
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.
Created attachment 110869 [details] [review] Revision #2. Version that uses the variables in platform.py
(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.
> 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.
Whoops - you're right. Nice job!
After testing this on a couple machines as well as talking with Rich about the intended behavior I think this looks good.
So where are we with this one? I think Will and Mike like it. Shall I check it in and move it to "[pending]"?
(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.
Okay. Understood. Patch committed. Moving to "[pending]" for now. Thanks.
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.