1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2025-10-17 17:01:01 +00:00

Add article "Sane Opensolaris Settings"

This commit is contained in:
Holger Just 2016-11-22 17:30:24 +01:00
parent 6e0473e6a4
commit be0ba37163
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,54 @@
---
title: Sane Opensolaris Settings
author: Holger Just
date: 2010-02-05 12:46 UTC
lang: :en
tags: Technology
cover: 2010/sane-opensolaris-settings/cover.jpg
cover_license: '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)'
layout: 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.
## 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
```bash
tput rs1
```
As this is rather cumbersome, I think it is better to adjust out terminfo definitions.
```bash
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](http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6902588), the rough steps from [Peter Harvey](http://blogs.sun.com/peteh/entry/fixing_terminfo_so_that_terminal).
## 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.
```bash
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](http://wiki.epiphanic.org/MiscOpenSolaris).

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB