Hi

fbterm uses some weird escape sequence to set 256 colours instead of the
normal \033[38;5;Nm ANSI ones which are currently hardcoded into tmux.

tmux could now probably use setaf and setab from terminfo for 256
colours instead of hardcoding these, please see if this works:


diff --git a/tty.c b/tty.c
index 98f603f..13a9cd2 100644
--- a/tty.c
+++ b/tty.c
@@ -1586,8 +1586,15 @@ tty_try_256(struct tty *tty, u_char colour, const char 
*type)
            !(tty->term_flags & TERM_256COLOURS))
                return (-1);
 
+#if 0
        xsnprintf(s, sizeof s, "\033[%s;5;%hhum", type, colour);
        tty_puts(tty, s);
+#else
+       if (*type == '3')
+               tty_putcode1(tty, TTYC_SETAF, colour);
+       else
+               tty_putcode1(tty, TTYC_SETAB, colour);
+#endif
        return (0);
 }
 



On Wed, Jan 15, 2014 at 09:28:50PM -0800, Lawrence Jacob Siebert wrote:
>    On Linux Mint (largely based on Ubuntu) I can switch to a virtual tty
>    console with Ctrl Alt F1. *I can use a program called fbterm to get 256
>    colors using a framebuffer (it requires a minor tweak in my kernel
>    settings in grub, but that's it)... and screen works with it, so I can get
>    256 colors in screen in the console.
>    But try as I might, I can't figure out how to do this in tmux. *And I love
>    tmux, so I'd prefer to use it instead of screen, if at all possible. *
>    Can anyone give me some help? *
>    Thanks,
>    Lawrence Siebert
>    About Me:*[1]http://about.me/lawrencesiebert
>    Constantly Coding:*[2]http://constantcoding.blogspot.com
> 
> References
> 
>    Visible links
>    1. http://about.me/lawrencesiebert
>    2. http://constantcoding.blogspot.com/

> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk

> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to