diff -Nru icewm-1.2.14pre1.orig/src/genpref.cc icewm-1.2.14pre1/src/genpref.cc --- icewm-1.2.14pre1.orig/src/genpref.cc 2003-11-01 11:43:13.000000000 +0100 +++ icewm-1.2.14pre1/src/genpref.cc 2003-11-09 10:11:04.000000000 +0100 @@ -60,6 +60,9 @@ int main() { #ifndef NO_CONFIGURE printf("# preferences(%s) - generated by genpref\n\n", VERSION); + if (getenv("HOME_ETC") != NULL) + printf("# This file should be copied to /etc/icewm/ or $HOME_ETC/.icewm/ directory\n"); + else printf("# This file should be copied to /etc/icewm/ or $HOME/.icewm/ directory\n"); printf("# NOTE: All settings are commented out by default, be sure to\n" "# uncomment them if you change them!\n\n"); diff -Nru icewm-1.2.14pre1.orig/src/icesound.cc icewm-1.2.14pre1/src/icesound.cc --- icewm-1.2.14pre1.orig/src/icesound.cc 2003-11-01 11:43:13.000000000 +0100 +++ icewm-1.2.14pre1/src/icesound.cc 2003-11-09 10:13:06.000000000 +0100 @@ -159,7 +159,7 @@ char * YAudioInterface::findSample(char const * basename) { static char const * paths[] = { IceSound::samples, - strJoin(getenv("HOME"), "/.icewm/sounds/", NULL), + strJoin(getenv("HOME_ETC") != NULL ? getenv("HOME_ETC") : getenv("HOME"), "/.icewm/sounds/", NULL), strJoin(CFGDIR, "/sounds/", NULL), strJoin(LIBDIR, "/sounds/", NULL) }; diff -Nru icewm-1.2.14pre1.orig/src/themes.cc icewm-1.2.14pre1/src/themes.cc --- icewm-1.2.14pre1.orig/src/themes.cc 2003-11-01 11:43:13.000000000 +0100 +++ icewm-1.2.14pre1/src/themes.cc 2003-11-09 10:15:47.000000000 +0100 @@ -25,11 +25,12 @@ extern char *configArg; void setDefaultTheme(const char *theme) { - const char *confDir = strJoin(getenv("HOME"), "/.icewm", NULL); + const char *h = getenv("HOME_ETC"); + const char *confDir = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm", NULL); mkdir(confDir, 0777); delete[] confDir; - const char *themeConfNew = strJoin(getenv("HOME"), "/.icewm/theme.new.tmp", NULL); - const char *themeConf = strJoin(getenv("HOME"), "/.icewm/theme", NULL); + const char *themeConfNew = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm/theme.new.tmp", NULL); + const char *themeConf = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm/theme", NULL); int fd = open(themeConfNew, O_RDWR | O_TEXT | O_CREAT | O_TRUNC | O_EXCL, 0666); #warning "do proper escaping" const char *buf = strJoin("Theme=\"", theme, "\"\n", NULL); diff -Nru icewm-1.2.14pre1.orig/src/yapp.cc icewm-1.2.14pre1/src/yapp.cc --- icewm-1.2.14pre1.orig/src/yapp.cc 2003-11-01 11:43:13.000000000 +0100 +++ icewm-1.2.14pre1/src/yapp.cc 2003-11-09 10:18:51.000000000 +0100 @@ -381,7 +381,8 @@ const char *env = getenv("ICEWM_PRIVCFG"); if (NULL == env) { - env = getenv("HOME"); + env = getenv("HOME_ETC"); + if (env == NULL) env = getenv("HOME"); strcpy(cfgdir, env ? env : ""); strcat(cfgdir, "/.icewm"); } else {