[gtk-server] Re: busy loop on startup with fifo method

  • From: Frantisek Dufka <dufkaf@xxxxxxxxx>
  • To: Peter van Eerten <administrator@xxxxxxxxxxxxxx>
  • Date: Tue, 17 Apr 2007 11:14:08 +0200

Peter van Eerten wrote:

Therefore, I would recommend using the IPC interface instead. It is one of the reasons that this interface exists at all, because I wanted to have a good protocol for BASH as well.

Well, if I understood it correctly IPC method means executing gtk-server executable for each gtk call. Not very good for more calls on slower devices like Nokia N770, process forking and dynamic linking on startup takes time. FIFO method means just writing to file descriptor without executing anything (read and echo are internal shell commands).

But your first suggestion is a good idea, I think. I am already working on 2.1.4 and will make the necessary changes according to your remarks.

Thanks. The pre-created fifo method seems a bit easier to me. Maybe with forking to background it would be harder to kill gtk-server on shell script exit. But maybe not. Well at least you need to find out its PID.

I'm currently examining gtk-server for simple shell scripting with GUI on Nokia 770. So far I am not sure how useful/powerful it is. The startup speed is excellent - 1 second or less until simple window is shown. Also the calculator example with glade (bash-isms removed :-) starts in ~1 second and works :-) Python with pygtk takes 3-4 seconds for simple window (=almost unusable).

But with gtk-server I'm afraid I need to write lot of gtk code for simple things. Would be nice to have some simple dialog calls builtin in gtk-server like zenity has

Gtk-server is better than zenity/dialog because it can be scripted and runs continuously on background. Zenity just shows dialog and exits which is not enough for something with main window. Some mix between those two would be nice. Or is it easy to write shell wrappers/funcions for same basic dialogs like zenity has?


Other related posts: