… | |
… | |
852 | |
852 | |
853 | #if ENABLE_PERL |
853 | #if ENABLE_PERL |
854 | rootwin_ev.start (display, display->root); |
854 | rootwin_ev.start (display, display->root); |
855 | #endif |
855 | #endif |
856 | |
856 | |
857 | set_colorfgbg (); |
857 | init_done = 1; |
858 | |
858 | |
859 | init_command (cmd_argv); |
859 | init_command (cmd_argv); |
860 | |
860 | |
861 | if (pty->pty >= 0) |
861 | if (pty->pty >= 0) |
862 | pty_ev.start (pty->pty, ev::READ); |
862 | pty_ev.start (pty->pty, ev::READ); |
… | |
… | |
906 | /*----------------------------------------------------------------------*/ |
906 | /*----------------------------------------------------------------------*/ |
907 | void |
907 | void |
908 | rxvt_term::init_env () |
908 | rxvt_term::init_env () |
909 | { |
909 | { |
910 | char *val; |
910 | char *val; |
|
|
911 | char *env_display; |
|
|
912 | char *env_windowid; |
|
|
913 | char *env_colorfgbg; |
|
|
914 | char *env_term; |
911 | |
915 | |
912 | #ifdef DISPLAY_IS_IP |
916 | #ifdef DISPLAY_IS_IP |
913 | /* Fixup display_name for export over pty to any interested terminal |
917 | /* Fixup display_name for export over pty to any interested terminal |
914 | * clients via "ESC[7n" (e.g. shells). Note we use the pure IP number |
918 | * clients via "ESC[7n" (e.g. shells). Note we use the pure IP number |
915 | * (for the first non-loopback interface) that we get from |
919 | * (for the first non-loopback interface) that we get from |
… | |
… | |
932 | |
936 | |
933 | env_display = (char *)rxvt_malloc (strlen (val) + 9); |
937 | env_display = (char *)rxvt_malloc (strlen (val) + 9); |
934 | |
938 | |
935 | sprintf (env_display, "DISPLAY=%s", val); |
939 | sprintf (env_display, "DISPLAY=%s", val); |
936 | |
940 | |
|
|
941 | env_windowid = (char *)rxvt_malloc (21); |
937 | sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent); |
942 | sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent); |
938 | |
943 | |
939 | /* add entries to the environment: |
944 | /* add entries to the environment: |
940 | * @ DISPLAY: in case we started with -display |
945 | * @ DISPLAY: in case we started with -display |
941 | * @ WINDOWID: X window id number of the window |
946 | * @ WINDOWID: X window id number of the window |
… | |
… | |
945 | * @ COLORFGBG: fg;bg color codes |
950 | * @ COLORFGBG: fg;bg color codes |
946 | */ |
951 | */ |
947 | putenv (env_display); |
952 | putenv (env_display); |
948 | putenv (env_windowid); |
953 | putenv (env_windowid); |
949 | |
954 | |
950 | if (env_colorfgbg) |
955 | env_colorfgbg = get_colorfgbg (); |
951 | putenv (env_colorfgbg); |
956 | putenv (env_colorfgbg); |
952 | |
957 | |
953 | #ifdef RXVT_TERMINFO |
958 | #ifdef RXVT_TERMINFO |
954 | putenv ("TERMINFO=" RXVT_TERMINFO); |
959 | putenv ("TERMINFO=" RXVT_TERMINFO); |
955 | #endif |
960 | #endif |
956 | |
961 | |