1 diff -Nru icewm-1.2.14pre1.orig/src/genpref.cc icewm-1.2.14pre1/src/genpref.cc
2 --- icewm-1.2.14pre1.orig/src/genpref.cc 2003-11-01 11:43:13.000000000 +0100
3 +++ icewm-1.2.14pre1/src/genpref.cc 2003-11-09 10:11:04.000000000 +0100
7 printf("# preferences(%s) - generated by genpref\n\n", VERSION);
8 + if (getenv("HOME_ETC") != NULL)
9 + printf("# This file should be copied to /etc/icewm/ or $HOME_ETC/.icewm/ directory\n");
11 printf("# This file should be copied to /etc/icewm/ or $HOME/.icewm/ directory\n");
12 printf("# NOTE: All settings are commented out by default, be sure to\n"
13 "# uncomment them if you change them!\n\n");
14 diff -Nru icewm-1.2.14pre1.orig/src/icesound.cc icewm-1.2.14pre1/src/icesound.cc
15 --- icewm-1.2.14pre1.orig/src/icesound.cc 2003-11-01 11:43:13.000000000 +0100
16 +++ icewm-1.2.14pre1/src/icesound.cc 2003-11-09 10:13:06.000000000 +0100
18 char * YAudioInterface::findSample(char const * basename) {
19 static char const * paths[] = {
21 - strJoin(getenv("HOME"), "/.icewm/sounds/", NULL),
22 + strJoin(getenv("HOME_ETC") != NULL ? getenv("HOME_ETC") : getenv("HOME"), "/.icewm/sounds/", NULL),
23 strJoin(CFGDIR, "/sounds/", NULL),
24 strJoin(LIBDIR, "/sounds/", NULL)
26 diff -Nru icewm-1.2.14pre1.orig/src/themes.cc icewm-1.2.14pre1/src/themes.cc
27 --- icewm-1.2.14pre1.orig/src/themes.cc 2003-11-01 11:43:13.000000000 +0100
28 +++ icewm-1.2.14pre1/src/themes.cc 2003-11-09 10:15:47.000000000 +0100
30 extern char *configArg;
32 void setDefaultTheme(const char *theme) {
33 - const char *confDir = strJoin(getenv("HOME"), "/.icewm", NULL);
34 + const char *h = getenv("HOME_ETC");
35 + const char *confDir = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm", NULL);
38 - const char *themeConfNew = strJoin(getenv("HOME"), "/.icewm/theme.new.tmp", NULL);
39 - const char *themeConf = strJoin(getenv("HOME"), "/.icewm/theme", NULL);
40 + const char *themeConfNew = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm/theme.new.tmp", NULL);
41 + const char *themeConf = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm/theme", NULL);
42 int fd = open(themeConfNew, O_RDWR | O_TEXT | O_CREAT | O_TRUNC | O_EXCL, 0666);
43 #warning "do proper escaping"
44 const char *buf = strJoin("Theme=\"", theme, "\"\n", NULL);
45 diff -Nru icewm-1.2.14pre1.orig/src/yapp.cc icewm-1.2.14pre1/src/yapp.cc
46 --- icewm-1.2.14pre1.orig/src/yapp.cc 2003-11-01 11:43:13.000000000 +0100
47 +++ icewm-1.2.14pre1/src/yapp.cc 2003-11-09 10:18:51.000000000 +0100
49 const char *env = getenv("ICEWM_PRIVCFG");
52 - env = getenv("HOME");
53 + env = getenv("HOME_ETC");
54 + if (env == NULL) env = getenv("HOME");
55 strcpy(cfgdir, env ? env : "");
56 strcat(cfgdir, "/.icewm");