You are not logged in.

#1 2014-09-08 20:12:52

x-yuri
Member
Registered: 2013-01-06
Posts: 160

[SOLVED] switch to 256 colors when booting from installation image

Hi,

AFAIU, this can be done by specifying kernel parameters. So I pressed tab when boot menu appeared, added "nomodeset" and "vga=ask". But first, I didn't see 256 colors mode there, then even so I chose 640x480x32, `tput colors` said 8. So here I am, asking about help...

P.S. It says, the terminal is "linux". Could I possibly switch to "xterm" or "xterm-256color", if that helps...?

P.P.S. Not sure if it's a proper subforum...

Last edited by x-yuri (2014-12-16 10:06:19)

Offline

#2 2014-09-08 20:38:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] switch to 256 colors when booting from installation image

xterm and xterm-256color are terminal emulators running under X...

What are you trying to achieve? 256 colours in the TTY?


Not an Installation issue, moving to NC.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-09-08 20:40:33

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] switch to 256 colors when booting from installation image

Yes, I'd like to have 256 colors in the TTY. Or at least more than 8 colors.

Offline

#4 2014-09-08 20:43:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] switch to 256 colors when booting from installation image


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-09-09 00:59:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] switch to 256 colors when booting from installation image

fbpad reports 256 tput colors.

Offline

#6 2014-09-09 19:19:05

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] switch to 256 colors when booting from installation image

karol wrote:

fbpad reports 256 tput colors.

Well, not an easy task to do from within archiso image. But I installed it, installed fbpad-256 terminfo entry, ran `export TERM=fbpad-256`, downloaded courr.tf and tried different command like: `FR=/home/yuri/courr.tf SHELL=/bin/bash fbpad`, but none of them worked:

fb_init(): No such file or directory.

Can you tell me what I'm doing wrong? Or what should be done?

Offline

#7 2014-09-09 19:55:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,615
Website

Re: [SOLVED] switch to 256 colors when booting from installation image

I've long been working on various options for 256 color ttys.  I really like yaft (in aur) for it's simplicity.  It works 'out-of-the-box' with no special set up.  However, configuring a different font is a real pain.

I've never tried fbpad, but I am now currently using fbterm. Fbterm initially gave me a lot of frustration as it uses it's own escape sequences for colors - so it was effectively useless.  But I've found running tmux within fbterm completely resolves this.  Set TERM=fbterm, launch fbterm, set TERM=fbterm again within fbterm, then launch tmux.  And you'll be in a 256-color terminal that responds to the same color escape sequences as xterm or urxvt or other terminal emulators.  I've set up all these steps to be run automatically for tty2 in my bashrc.  An excerpt:

if [[ $XDG_VTNR -eq 2 ]]; then
	if [[ $(tty) == "/dev/tty2" ]]; then
		export TERM=fbterm
		_set_tty_colors
		echo -e "\e]P7D0D0D0"
		fbterm && exit
	else
		export TERM=fbterm
		echo -e "\e]P7D0D0D0"
		_set_tty_colors
		tmux && exit
	fi
fi

_set_tty_colors is a local function using commands like the following to set all the colors - it took some trial and error to realize it had to be run at each nested level of this process:

_set_tty_colors() {
	echo -en "\e]P0181818" #black
	echo -en "\e]P8000000" #darkgrey
	echo -en "\e]P1a62a3e" #darkred
	echo -en "\e]P9f04758" #red
...
}

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2014-09-10 05:33:22

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] switch to 256 colors when booting from installation image

Um, fbterm says: "init font error!". Even after I installed xorg-fonts-cyrillic. Am I missing something?

Offline

#9 2014-09-10 10:58:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,615
Website

Re: [SOLVED] switch to 256 colors when booting from installation image

odd, I'm not sure.  Does it fail to start, or just give the error message?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2014-09-11 06:57:46

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] switch to 256 colors when booting from installation image

I tried to list available fonts with fc-list (fontconfig's utility) after installing xorg-fonts-cyrillic, but it listed nothing. So I installed cantarell-fonts, fc-list listed 2 *.otf fonts and fbterm ran successfully. And indeed, its escape sequences seems to be different. But inside tmux, everything becomes fine. Also, you can't specify nomodeset kernel option for fbterm to work.

To give a concrete set of instructions:

# pacman -Syy
# pacman -S vim tmux fbterm cantarell-fonts
# mkdir -p ~/.vim/colors
# curl -o ~/.vim/colors/xoria256.vim http://www.vim.org/scripts/download_script.php?src_id=15762
# fbterm
# TERM=fbterm tmux
# vim
:e ~/.vim/colors/xoria256.vim
:syntax on
:se t_Co=256
:colorscheme xoria256

Or alternative ending:

...
# TERM=fbterm tmux
# TERM=screen-256color vim
:e ~/.vim/colors/xoria256.vim
:syntax on
:colorscheme xoria256

Last edited by x-yuri (2014-09-18 06:22:18)

Offline

Board footer

Powered by FluxBB