gnome session management in a gtk-perl app



Hello!

I'm trying to put a little perl script to initiate with gnome, using gnome-session. Had sucess to do so, but now the splash screen doesn't go away nor I can logout normally. This is my /usr/share/gnome/default.session

[Default]
num_clients=7
0,id=default0
0,Priority=60
0,RestartCommand=pam-panel-icon --sm-client-id default0
1,id=default1
1,Priority=10
1,RestartCommand=gnome-wm --default-wm gnome-wm --sm-client-id default1
2,id=default2
2,Priority=40
2,RestartCommand=gnome-panel --sm-client-id default2
3,id=default3
3,Priority=40
3,RestartCommand=nautilus --no-default-window --sm-client-id default3
4,id=default4
4,Priority=50
4,RestartCommand=eggcups --sm-client-id default4
5,id=default5
5,Priority=40
5,RestartCommand=magicdev --sm-client-id default5
6,id=default6
6,RestartCommand=/tmp/signals.pl

Googled it and discovered that my script must communicate with gnome-session to know when go out. This works fine too. Just followed the examples/session-management.pl in Gnome2-1.023 tarball. =)

Discovered also that starting gnome-session with --purge-delay=2000 make things behave as expected. My script runs nice now. But it doesn`t means that it has completed the conversation with the session manager, means that session manager stoped waiting for my script after 2 seconds. =\

What I want to know is: Which is the Right Way to put my script to talk to gnome-session ?

Thanks in advance.

Attached is session-management.pl, just in case you don't have one at hand =)

--
motobói


Attachment: session-management.pl
Description: Perl program



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]