You are not logged in.

#1 2009-04-15 22:02:12

jimmy the saint
Member
Registered: 2009-04-10
Posts: 41

[solved]Cannot get tomboy to autostart in openbox - tomboy won't start

So far I'm loving arch. 

I am, however, baning my keyboard around in frustration because I cannot seem to get tomboy to autostart.  This is my current autostart.sh

#set wallpaper
nitrogen --restore &

#lxpanel
(sleep 2s && lxpanel) &

#tomboy
tomboy &

I have tried to make lxpanel sleep more, less and not at all.  I have tried to make tomboy sleep anywhere from 1 to 10 seconds.  I have tried

bash -e "tomboy"

If I run it from a terminal there are no errors to speak of.  I am setting up a test system to see if I can get everything configured the way I need it for school this fall.  This is very frustrating, such a simple thing!  Is there a trick I should know?  I have crungbang installed on my laptop and "tomboy &" works perfectly on it.  What am I missing here?

Thanks
JTS

Last edited by jimmy the saint (2009-04-16 06:05:43)

Offline

#2 2009-04-15 22:54:09

Xappe
Member
Registered: 2008-05-17
Posts: 105

Re: [solved]Cannot get tomboy to autostart in openbox - tomboy won't start

Maybe it starts before openbox (or lxpanel?) is ready? Try to delay it a couple of seconds:

(sleep 3s && tomboy) &


vanum est vobis ante lucem surgere

Offline

#3 2009-04-15 22:56:36

jimmy the saint
Member
Registered: 2009-04-10
Posts: 41

Re: [solved]Cannot get tomboy to autostart in openbox - tomboy won't start

Yeah, I tried that.  I have tried making it sleep for 1 second, and now all the way up to a minute.  I don't understand it.

Offline

#4 2009-04-16 03:11:25

jimmy the saint
Member
Registered: 2009-04-10
Posts: 41

Re: [solved]Cannot get tomboy to autostart in openbox - tomboy won't start

OK, I have been playing with this all dang day and I discovered something interesting.  If tomboy is launched graphically (with terminator or a gui menu) it runs just fine.  If, however, it is launched from a script without the aid of a gui program (for instance in autostart.sh, or by double-clicking on and script that simply launches it) it attempts to open in the background and gets a horrible error.

I created this script

tomboy 2> ~/tbdebug

exit 0

and when it is double-clicked, this is the error output

(/usr/lib/tomboy/Tomboy.exe:15955): GLib-GObject-CRITICAL **: gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

(/usr/lib/tomboy/Tomboy.exe:15955): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

(/usr/lib/tomboy/Tomboy.exe:15955): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
Stacktrace:

  at (wrapper managed-to-native) GConf.Client.gconf_client_get_default () <0x00053>
  at (wrapper managed-to-native) GConf.Client.gconf_client_get_default () <0xffffffff>
  at GConf.Client..ctor () <0x0004b>
  at Tomboy.GConfPreferencesClient..ctor () <0x00027>
  at Tomboy.GnomeFactory.CreatePreferencesClient () <0x0001f>
  at Tomboy.Services..cctor () <0x0006b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at Tomboy.Application.Initialize (string,string,string,string[]) <0xffffffff>
  at Tomboy.Application.Initialize (string,string,string,string[]) <0x0001c>
  at Tomboy.Tomboy.Main (string[]) <0x000af>
  at (wrapper runtime-invoke) Tomboy.Tomboy.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    mono [0x47e650]
    mono [0x4ae8dd]
    /lib/libpthread.so.0 [0x7f6b5c99d920]
    /usr/lib/libgconf-2.so.4 [0x7f6b5ab1ab31]
    /usr/lib/libgconf-2.so.4(gconf_client_get_default+0xc4) [0x7f6b5ab1e834]
    [0x407178e3]

Debug info from gdb:


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

The script works wonderfully if ran in the terminal.  I believe this is the reaason that I cannot get the app to autostart.  I can't figure out a workaround.

Last edited by jimmy the saint (2009-04-16 03:12:41)

Offline

#5 2009-04-16 06:04:46

jimmy the saint
Member
Registered: 2009-04-10
Posts: 41

Re: [solved]Cannot get tomboy to autostart in openbox - tomboy won't start

What is this seven hours later? 

I found a bug report at redhat indicating that tomboy would crash out with a similar error message if nothing was calling on gconf at the time it was executed.  I added the following to my autostart.sh

terminator -e "echo 'welcome to my machine' &exit" &

immediately before the tomboy entry.  My thought is that, since terminator calls on gconf (doesn't it?) if it is open, tomboy should have no issues.  Sure enough, tomboy starts.  The downside is I have a terminal pop open for a second every time I start up now.  Oh well, life is about compromise!  The Redhat bug report said that this bug was fixed in gnome-sharp, but I have a more recent version than the one cited and it still happened to me.

I hope my lost day helps someone else solve their issue.  If anyone else has a suggestion for a tiny app that calls on gconf and is less intrusive than a terminal popping open for a second, I am all ears (or eyes)

JTS

Offline

#6 2009-08-14 18:59:34

LSung000
Member
Registered: 2009-08-14
Posts: 1

Re: [solved]Cannot get tomboy to autostart in openbox - tomboy won't start

It is as you stated, tomboy will throw that error if the gconf daemon has not been started in some manner.

Just to shed some more light on this since I've had to deal with the same problem in my mono apps,

I don't know what the code to tomboy looks like but this is what I'm guessing what basically happens:

If tomboy starts up and can't draw a window cause theres no X running or whatever, it fails the Application.Run() call and gconf never starts. This is why sometimes your script works fine and other times it doesn't. it could also be because you have some other window open that calls up the gconf daemon.

In any case as a fix, tomboy can make a call to Gtk.Init.Check if Application.Run() fails for whatever reason. That'll start up the gconf daemon and won't require X.

Last edited by LSung000 (2009-08-14 19:02:39)

Offline

Board footer

Powered by FluxBB