According to the discussion on the Gnome VTE bug linked, calling vte_terminal_set_emulation won't work either, unless it happens to be recognized as a supported emulation mode. "xterm-256color" isn't, so this solution wouldn't work.
There doesn't seem to be an obvious, clean way to fix the problem within xfce4-terminal; vte is the one holding all the cards AFAICT. According to discussion on the Gnome VTE bug, vte_terminal_fork_command_full is "just a wrapper" around some other functions, but one of those functions (__vte_pty_spawn) probably isn't safe to call by users.
Perhaps the correct solution should be for vte to revert to its previous behavior, whereby it didn't brutally murder pre-existing TERM settings when the terminal app sets them. If the upstream vte folks don't want to consider this, Ubuntu probably should.
According to the discussion on the Gnome VTE bug linked, calling vte_terminal_ set_emulation won't work either, unless it happens to be recognized as a supported emulation mode. "xterm-256color" isn't, so this solution wouldn't work.
There doesn't seem to be an obvious, clean way to fix the problem within xfce4-terminal; vte is the one holding all the cards AFAICT. According to discussion on the Gnome VTE bug, vte_terminal_ fork_command_ full is "just a wrapper" around some other functions, but one of those functions (__vte_pty_spawn) probably isn't safe to call by users.
Perhaps the correct solution should be for vte to revert to its previous behavior, whereby it didn't brutally murder pre-existing TERM settings when the terminal app sets them. If the upstream vte folks don't want to consider this, Ubuntu probably should.