--- a/src/modules/loaders/decompress_load.c
+++ b/src/modules/loaders/decompress_load.c
@@ -8,7 +8,7 @@
    ImlibLoader        *loader;
    int                 dest, res;
    const char         *s, *p, *q;
-   char                tmp[] = "/tmp/imlib2_loader_dec-XXXXXX";
+   char                tmp[] = "@TERMUX_PREFIX@/tmp/imlib2_loader_dec-XXXXXX";
    char               *real_ext;
    void               *fdata;
 
--- a/src/modules/loaders/loader_id3.c
+++ b/src/modules/loaders/loader_id3.c
@@ -507,7 +507,7 @@
 
    if (loader)
      {
-        char                tmp[] = "/tmp/imlib2_loader_id3-XXXXXX";
+        char                tmp[] = "@TERMUX_PREFIX@/tmp/imlib2_loader_id3-XXXXXX";
         int                 dest, res;
 
         if ((dest = mkstemp(tmp)) < 0)
--- a/src/modules/loaders/loader_xpm.c
+++ b/src/modules/loaders/loader_xpm.c
@@ -78,11 +78,11 @@
 
    /* look in rgb txt database */
    if (!rgb_txt)
-      rgb_txt = fopen("/usr/share/X11/rgb.txt", "r");
+      rgb_txt = fopen("@TERMUX_PREFIX@/share/X11/rgb.txt", "r");
    if (!rgb_txt)
-      rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r");
+      rgb_txt = fopen("@TERMUX_PREFIX@/X11R6/lib/X11/rgb.txt", "r");
    if (!rgb_txt)
-      rgb_txt = fopen("/usr/openwin/lib/X11/rgb.txt", "r");
+      rgb_txt = fopen("@TERMUX_PREFIX@/openwin/lib/X11/rgb.txt", "r");
    if (!rgb_txt)
       goto done;
 
