1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2025-10-17 17:01:01 +00:00
holgerjust.de/source/articles/2010/sane-opensolaris-settings.md

2.0 KiB

title author date lang tags cover cover_license layout
Sane Opensolaris Settings Holger Just 2010-02-05 12:46 UTC :en Technology 2010/sane-opensolaris-settings/cover.jpg Cover Image ["Sunset in the Park"](https://unsplash.com/photos/ocwmWiNAWGs) by [Jake Givens](https://unsplash.com/@jakegivens), [CC Zero 1.0](https://unsplash.com/license) post

Opensolaris has done some huge steps towards being usable by a normal person. Sadly there are still some things lacking sane defaults which I try to provide here. I will try to update this post if I stumble over more of these hiccups.

READMORE

Correct colors on exit of an ncurses program

If an ncurses program (like nano) exits, the default xterm-color does not properly restore the colors of the terminal. The background color is shown in a dark gray. For a quick relieve you can issue a short

tput rs1

As this is rather cumbersome, I think it is better to adjust out terminfo definitions.

TERM=xterm-color infocmp > /tmp/xterm-color.src
sed -i -e 's/op=\\E\[100m,/op=\\E\[m,/' /tmp/xterm-color.src
pfexec tic -v /tmp/xterm-color.src
rm /tmp/xterm-color.src

The solution is from the Opensolaris Bug, the rough steps from Peter Harvey.

Fixing some key bindings

By default some essential key bindings do not work properly. This can be fixed by just reassigning them. The following statement has to be run as root.

cat >> /etc/profile <<BASH
# home key
bind '"\e[1~":beginning-of-line'
# del key
bind '"\e[3~":delete-char'
# end key
bind '"\e[4~":end-of-line'
# pgup key
bind '"\e[5~":history-search-forward'
# pgdn key
bind '"\e[6~":history-search-backward'
BASH

You have to logout and login again for these settings to take effect. Alternatively you could just enter the individual bind statements into your current terminal.

The bindings are from Epiphanic Networks' Wikka.