GTK+ is supposed to use glib. There is a nice g_get_home_dir function in glib wich is a nice portable replacement for getenv("HOME") wich is used in gtkrc.c ChangeLog entry: 1999-01-23 Marin Purgar - PMC * gtkrc.c (gtk_rc_append_default_module_path): use g_get_home_dir instead of getenv("HOME")