Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, February 15, 2014

National Characterset for Ubuntu Console

About Locales

It is not an in-depth guide but rather a briefing which I used to write down the most essential things about customizing locales.
Despite the post is focused on Polish locale, you might find it helpful because the procedure is similar for other languages.

Steps

Install possible missing packages. In the new Ubuntu release it is as simple as:

aptitude install language-pack-pl

Which automatically generates appropriate locales.

In older Ubuntu versions:

   aptitude install locale
   aptitude install localedef

lenny: apt-cache install locales-all

 X11

After "locale/language-pack" packages are installed and assuming proper fonts are already here, national characters should be visible without any issue in xterm and similar applications. However it still needs a proper keyboard layout.

For Redhat (Oracle Enterprise Linux) 6.4 it is as simple as going to System -> Preferences -> Keyboard -> Layouts and choosing Polish (or other) layout there, optionally making it the default one.

For Ubuntu 13.10: System Settings -> Text Entry -> Input source to use: pick your national keyboard here, make it default if you prefer.

Console Specific

vim /etc/default/console-setup:

CHARMAP=UTF-8
CODESET=Uni2
XKBLAYOUT=pl (can be in /etc/default/keyboard)

setupcon -v

Locale General

  1. locale (examines standard environment settings for locales)
  2. locale -a (examines what choices are possible)
  3. If there is not Polish locales: locale-gen pl_PL.UTF8 (checkout /etc/locale.gen)
  4. Files:
    • /etc/default/locale - global system locale definition
    • /etc/environment

References

  1. Ubuntu Locale Help

Thursday, February 13, 2014

Ubuntu freezing packages

Recently I decided to move my desktop environment to the latest Ubuntu 13 (Saucy) to gain the latest packages:

root@ubuntu13:~# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
root@ubuntu13:~#

This is not LTS (long term) and it gets its packages updated very often.
From the other side - I'm running it through Oracle VirtualBox and I'm sick of recompiling modules each time the kernel gets updated. Having VirtualBox modules not aligned with the kernel (guest additions) means I'm loosing auto-resize guest display, cannot mount host filesystems and cannot use shared clipboard.

So I need simply ignore updates for a set of packages. And starting with Ubuntu 12 there is a possiblity to mark the packaged on hold. Here is what is enough to gain the goal:

apt-mark hold linux-generic
apt-mark hold linux-firmware
apt-mark hold linux-image-\*
apt-mark hold linux-headers-\*

apt-mark showhold
Nice!

  1. Ubuntu Pinning Howto