GTG

State of the 'Start GTG on every login' checkbox doesn't survive gtg restart

Bug #533318 reported by mrk
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
High
Luca Invernizzi

Bug Description

State of the 'Start GTG on every login' checkbox doesn't survive gtg restart.
Indeed it resets after every calling of the Preference pane.

This is may be somehow related with bug #533157.

It would be great to see this included into 0.2.4.

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Hi mrk,
This bug is not related to the one you're mentioning, but it could be caused by your machine configuration.
Could you please check that, when you choose to autostart gtg at login, a file is created ( ~/.config/autostart/gtg.desktop), and the same file is removed when you uncheck that option?
Are you using Gnome?

Changed in gtg:
status: New → Confirmed
assignee: nobody → Luca Invernizzi (invernizzi)
importance: Undecided → High
milestone: none → 0.2.4
Revision history for this message
mrk (cvs-src) wrote :

Hello!
File gtg.desktop is not created when i check this option.

[mrk@smeshariki2 ~]> ls -los ~/.config/ | grep autostart
2 drwxr-xr-x 2 mrk mrk - 512 23 фев 20:23 autostart

[mrk@smeshariki2 ~]> ls -laos | grep config
     2 drwxr-x--- 18 mrk mrk - 512 23 фев 20:23 .config
     2 drwxr-x--- 2 mrk mrk - 1536 23 фев 22:08 .fontconfig

So it seems not permission related.
I'll try to dig into it later this day and then tell you. May be it some FreeBSD specific issue )

PS. Yes, i use Gnome 2.28.2 and log into it with gdm.

Revision history for this message
mrk (cvs-src) wrote :

I've just checked this case with strace and it doesn't looks to me that it ever trying to create gtg.desktop in /home/mrk/.config/autostart/ when i check the option. But when i uncheck it checks if this file is available in right place:

stat("/home/mrk/.config/autostart/gtg.desktop", 0xbfbfc5a8) = -1 ENOENT (No such file or directory)

When i check this option it's try to stat in /usr/local/lib/python2.6/site-packages/:

stat("/usr/local/lib/python2.6/site-packages/gtg.desktop", 0xbfbfc5a8) = -1 ENOENT (No such file or directory)

May be it take you some hint about the problem.

Revision history for this message
mrk (cvs-src) wrote :

A bug is in preferences.py in on_autostart_toggled(). I've patch it with some debug and what i see:

autostart_path: /home/mrk/.config/autostart/gtg.desktop
this_directory: /usr/local/lib/python2.6/site-packages/GTG/taskbrowser
fullpath: /usr/local/lib/python2.6/site-packages/gtg.desktop
desktop_file_path: /usr/local/lib/python2.6/applications/gtg.desktop

So it tries to create symlink like:

ln -s /usr/local/lib/python2.6/applications/gtg.desktop /home/mrk/.config/autostart/gtg.desktop

or (if os.symlink() not exists copy /usr/local/lib/python2.6/applications/gtg.desktop into /home/mrk/.config/autostart)

So i now try to make a patch for this.

Revision history for this message
mrk (cvs-src) wrote :

This patch works for me.
But detecting desktop-file location this way is ugly. I will try to rework it in future.
I've also fix some whitespace while here.

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Thanks for the patch!
I agree that detecting the location of gtg.desktop that way is not nice, but I see only three choices:
- embed gtg.desktop in the code (or copy the file in the code tree)
- have a smarter packaging (which duplicates the file)
- find the file in the directory tree.

I preferred the last one as it's the most maintainable, but a nicer way it's surely welcome.

Changed in gtg:
status: Confirmed → Fix Committed
Changed in gtg:
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.