You are not logged in.

#1 2014-01-23 16:24:25

idomeneo
Member
Registered: 2013-07-19
Posts: 25

Formatting problems in the shell console (without X)

For instance, Midnight Commander works great in urxvt, but when I try to open it in the shell, it's a mess - the character set appears to be Greek, the colors I set in .config/mc/ini are not being applied, and there is sever artifacting.
(Also, many of the commands are not usable, but perhaps they are not supposed to work in the shell?)
And I would also like to apply the colors and fonts I've set in Xresrources to apply to the shell as well.

The nearest information I can find refers to config files that don't exist on my 2013 Arch, plus I thought locale settings would at least get the charsets right.

How do I set colors, fonts and charsets in the shell, and make it more "full-featured" in general?

Offline

#2 2014-01-23 16:29:10

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

Re: Formatting problems in the shell console (without X)

Xresources, as the name implies, are resources for X.  They are not used in the console.  An X server needs to be running to even read in the file.

Console colors can be set with the propery codes, though.  Here's an excerpt from my bashrc

	echo -en "\e]P0181818" #black
	echo -en "\e]P8000000" #darkgrey
	echo -en "\e]P1a62a3e" #darkred
	echo -en "\e]P9f04758" #red
	echo -en "\e]P238912b" #darkgreen
	echo -en "\e]PA60aa2b" #green
	echo -en "\e]P3b27d12" #brown
	echo -en "\e]PBddb62b" #yellow
	echo -en "\e]P4355c9a" #darkblue
	echo -en "\e]PC45a3e6" #blue
	echo -en "\e]P57c4f9f" #darkmagenta
	echo -en "\e]PDc953ef" #magenta
	echo -en "\e]P6258f8f" #darkcyan
	echo -en "\e]PE60c6c8" #cyan
	echo -en "\e]P7aab8b8" #lightgrey
	echo -en "\e]PFd0d0d0" #white

That is within a conditional block that applies to "linux" consoles (eg tty).

As for your other problems, you'll have to give more detail.  Are you using 256 colors in MC?  The tty does not use 256 colors, so that will fail.  You could use a frame buffer terminal if you really need 256 colors (e.g. fbterm).

The other errors are most likely the result of setting the TERM variable.  When in the tty what does "echo $TERM" return?


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

Online

#3 2014-01-23 16:41:46

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Formatting problems in the shell console (without X)

The console doesn't use the same fonts as X.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2014-01-23 16:42:14

idomeneo
Member
Registered: 2013-07-19
Posts: 25

Re: Formatting problems in the shell console (without X)

"echo $TERM" in the tty returns "rxvt-unicode"

I don't mean that Xresources should apply to the shell, I want to take some of the settings I have in Xresources and apply them to the shell as well, such as the terminus font I use for urxvt.

Last edited by idomeneo (2014-01-23 16:45:17)

Offline

#5 2014-01-23 16:53:49

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

Re: Formatting problems in the shell console (without X)

That setting of TERM is likely the cause of several of the problems.  Figure out where you have set that (eg bashrc) and remove it.

EDIT: in addition to the color codes above, you can set the font in a tty, here's another line from my bashrc within the same tty conditional to also use terminus:

	setfont ter-u216n.psf.gz

Last edited by Trilby (2014-01-23 16:54:52)


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

Online

#6 2014-01-23 17:32:25

idomeneo
Member
Registered: 2013-07-19
Posts: 25

Re: Formatting problems in the shell console (without X)

Thanks for the color advice.
Where did you get this informantion? I want to set more things, now, like how to display bold headings (it's not the same as in the terminal)

Removing the TERM setting from bashrc didn't make any difference, though.

Offline

Board footer

Powered by FluxBB