I am brand new to pthreads but fairly competant with gtk (which I presume uses pthreads internally).

Anyway, I was happy this morning when I tried putting a gtk_main_loop in a function started as a thread and it worked -- for one instance. I can kind of vaguely intuit why, and was wondering if there really is no way around that, or if anyone had some pthread related tip (pretty much all of my pthreading knowledge is demonstrated here, ie. it's close to null).

Of course, I only really need one gtk thread, since I could make as many windows as I want from there. But it would actually be easier, and more satisfying to my sense of freedom, to spawn them seperately.
Code:
#include <gtk/gtk.h>
#include <pthread.h>

typedef char string_[256];

string_ Message="hello world";

void *gtkthing (void *title) {
	GtkWidget *window, *vbox, *info, *update;
	printf("gtkthing()...\n");
	
	gtk_init(NULL,NULL);
	window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_title(GTK_WINDOW(window),(const gchar*)title);
	gtk_window_set_default_size(GTK_WINDOW(window),300,400);

	vbox=gtk_vbox_new(FALSE,0);
	gtk_container_add(GTK_CONTAINER(window),vbox);
	info=gtk_label_new((const gchar*)Message);
	gtk_box_pack_start(GTK_BOX(vbox),info,TRUE,TRUE,0);

	gtk_widget_show_all(window);
	gtk_main();	
	pthread_exit(NULL);
}

int main() {
	string_ titles[2]={"first","second"};
	pthread_t th[3];
	
	if (pthread_create(&th[0],NULL,gtkthing,(void*)titles[0])) puts("ERROR");
/*	if (pthread_create(&th[1],NULL,gtkthing,(void*)titles[1])) puts("ERROR"); */
	
	pthread_exit(NULL);
	return 0;			
}